浏览器下载插件
This commit is contained in:
@@ -5,7 +5,8 @@
|
||||
}
|
||||
|
||||
body {
|
||||
width: 340px;
|
||||
width: 420px;
|
||||
max-height: 560px;
|
||||
font-family: system-ui, -apple-system, 'Segoe UI', 'Microsoft YaHei', sans-serif;
|
||||
font-size: 13px;
|
||||
color: #1f2937;
|
||||
@@ -13,14 +14,17 @@ body {
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 14px;
|
||||
padding: 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-height: 560px;
|
||||
}
|
||||
|
||||
header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
margin-bottom: 12px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.logo {
|
||||
@@ -40,6 +44,48 @@ header {
|
||||
color: #6b7280;
|
||||
}
|
||||
|
||||
/* Tab 切换 */
|
||||
.tabs {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 1px solid #e5e7eb;
|
||||
}
|
||||
|
||||
.tab {
|
||||
flex: 1;
|
||||
padding: 6px 10px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-bottom: 2px solid transparent;
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
color: #6b7280;
|
||||
transition: color 0.15s, border-color 0.15s;
|
||||
}
|
||||
|
||||
.tab:hover {
|
||||
color: #1f2937;
|
||||
}
|
||||
|
||||
.tab.active {
|
||||
color: #111827;
|
||||
border-bottom-color: #111827;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.panel {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.panel.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* 状态条 */
|
||||
.status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -47,7 +93,7 @@ header {
|
||||
padding: 6px 10px;
|
||||
border-radius: 6px;
|
||||
background: #f3f4f6;
|
||||
margin-bottom: 12px;
|
||||
margin-bottom: 10px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
@@ -58,19 +104,15 @@ header {
|
||||
background: #9ca3af;
|
||||
}
|
||||
|
||||
.dot.ok {
|
||||
background: #10b981;
|
||||
}
|
||||
|
||||
.dot.fail {
|
||||
background: #ef4444;
|
||||
}
|
||||
.dot.ok { background: #10b981; }
|
||||
.dot.fail { background: #ef4444; }
|
||||
|
||||
/* 表单 */
|
||||
.field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
margin-bottom: 10px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.field span {
|
||||
@@ -97,14 +139,12 @@ header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
margin-bottom: 8px;
|
||||
margin-bottom: 6px;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.checkbox input {
|
||||
cursor: pointer;
|
||||
}
|
||||
.checkbox input { cursor: pointer; }
|
||||
|
||||
.actions {
|
||||
display: flex;
|
||||
@@ -123,9 +163,7 @@ header {
|
||||
transition: background 0.15s, border-color 0.15s;
|
||||
}
|
||||
|
||||
.actions button:hover {
|
||||
background: #f9fafb;
|
||||
}
|
||||
.actions button:hover { background: #f9fafb; }
|
||||
|
||||
.actions button.primary {
|
||||
background: #111827;
|
||||
@@ -133,6 +171,284 @@ header {
|
||||
border-color: #111827;
|
||||
}
|
||||
|
||||
.actions button.primary:hover {
|
||||
background: #1f2937;
|
||||
.actions button.primary:hover { background: #1f2937; }
|
||||
|
||||
/* 嗅探面板 */
|
||||
.sniff-toolbar {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
margin-bottom: 8px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.sniff-toolbar button,
|
||||
.sniff-toolbar select {
|
||||
padding: 5px 8px;
|
||||
font-size: 11px;
|
||||
border: 1px solid #d1d5db;
|
||||
background: #ffffff;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.sniff-toolbar button:hover { background: #f9fafb; }
|
||||
|
||||
/* 资源类型子 Tab */
|
||||
.sniff-tabs {
|
||||
display: flex;
|
||||
gap: 2px;
|
||||
margin-bottom: 8px;
|
||||
background: #f3f4f6;
|
||||
border-radius: 6px;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.sniff-tab {
|
||||
flex: 1;
|
||||
padding: 5px 8px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
font-size: 11px;
|
||||
cursor: pointer;
|
||||
color: #6b7280;
|
||||
transition: background 0.15s, color 0.15s;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.sniff-tab:hover {
|
||||
color: #1f2937;
|
||||
}
|
||||
|
||||
.sniff-tab.active {
|
||||
background: #ffffff;
|
||||
color: #111827;
|
||||
font-weight: 500;
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,0.05);
|
||||
}
|
||||
|
||||
.sniff-tab-count {
|
||||
font-size: 10px;
|
||||
padding: 1px 5px;
|
||||
border-radius: 8px;
|
||||
background: #e5e7eb;
|
||||
color: #6b7280;
|
||||
min-width: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sniff-tab.active .sniff-tab-count {
|
||||
background: #111827;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.sniff-list {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
border: 1px solid #e5e7eb;
|
||||
border-radius: 6px;
|
||||
background: #fafafa;
|
||||
max-height: 380px;
|
||||
}
|
||||
|
||||
.sniff-list .empty {
|
||||
padding: 24px 10px;
|
||||
text-align: center;
|
||||
color: #9ca3af;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.sniff-item {
|
||||
padding: 8px 10px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
transition: background 0.12s;
|
||||
}
|
||||
|
||||
.sniff-item:hover {
|
||||
background: #f3f4f6;
|
||||
}
|
||||
|
||||
.sniff-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.sniff-item-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.sniff-badge {
|
||||
font-size: 10px;
|
||||
padding: 1px 6px;
|
||||
border-radius: 3px;
|
||||
color: #ffffff;
|
||||
font-weight: 500;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.sniff-filename {
|
||||
flex: 1;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
color: #1f2937;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.sniff-size {
|
||||
font-size: 10px;
|
||||
color: #6b7280;
|
||||
font-family: 'JetBrains Mono', monospace;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.sniff-url {
|
||||
font-size: 10px;
|
||||
color: #9ca3af;
|
||||
font-family: 'JetBrains Mono', monospace;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.sniff-actions {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.sniff-actions button {
|
||||
font-size: 10px;
|
||||
padding: 3px 8px;
|
||||
border: 1px solid #d1d5db;
|
||||
background: #ffffff;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.sniff-actions button:hover { background: #f3f4f6; }
|
||||
|
||||
.sniff-actions button.dl {
|
||||
background: #111827;
|
||||
color: #ffffff;
|
||||
border-color: #111827;
|
||||
}
|
||||
|
||||
.sniff-actions button.dl:hover { background: #1f2937; }
|
||||
|
||||
.sniff-stats {
|
||||
margin-top: 6px;
|
||||
font-size: 10px;
|
||||
color: #6b7280;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* 嗅探项:图片缩略图 */
|
||||
.sniff-thumb {
|
||||
width: 100%;
|
||||
max-height: 120px;
|
||||
object-fit: cover;
|
||||
border-radius: 4px;
|
||||
margin-top: 4px;
|
||||
cursor: pointer;
|
||||
background: #f3f4f6;
|
||||
}
|
||||
|
||||
.sniff-preview-btn {
|
||||
font-size: 10px;
|
||||
padding: 3px 8px;
|
||||
border: 1px solid #d1d5db;
|
||||
background: #ffffff;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.sniff-preview-btn:hover { background: #f3f4f6; }
|
||||
|
||||
/* 预览浮层 */
|
||||
.preview-overlay {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.85);
|
||||
z-index: 1000;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.preview-overlay.active {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.preview-content {
|
||||
position: relative;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.preview-close {
|
||||
position: absolute;
|
||||
top: -8px;
|
||||
right: -8px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border-radius: 50%;
|
||||
background: #ffffff;
|
||||
border: none;
|
||||
font-size: 16px;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
box-shadow: 0 2px 6px rgba(0,0,0,0.3);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.preview-close:hover { background: #f3f4f6; }
|
||||
|
||||
.preview-body {
|
||||
max-width: 380px;
|
||||
max-height: 440px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.preview-body img {
|
||||
max-width: 380px;
|
||||
max-height: 440px;
|
||||
object-fit: contain;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.preview-body video {
|
||||
max-width: 380px;
|
||||
max-height: 440px;
|
||||
border-radius: 4px;
|
||||
background: #000;
|
||||
}
|
||||
|
||||
.preview-info {
|
||||
color: #ffffff;
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
max-width: 380px;
|
||||
word-break: break-all;
|
||||
background: rgba(0,0,0,0.5);
|
||||
padding: 4px 8px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user