@huyooo/file-explorer-frontend-vue 0.4.12 → 0.4.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -202,7 +202,7 @@ onUnmounted(() => {
202
202
  .file-info-dialog-overlay {
203
203
  position: fixed;
204
204
  inset: 0;
205
- background: rgba(0, 0, 0, 0.4);
205
+ background: var(--huyooo-overlay);
206
206
  display: flex;
207
207
  align-items: center;
208
208
  justify-content: center;
@@ -216,15 +216,15 @@ onUnmounted(() => {
216
216
  }
217
217
 
218
218
  .file-info-dialog {
219
- background: #ffffff;
220
- border: 1px solid #e0e0e0;
219
+ background: var(--huyooo-panel-bg);
220
+ border: 1px solid var(--huyooo-border);
221
221
  border-radius: 12px;
222
222
  width: 420px;
223
223
  max-width: 90vw;
224
224
  max-height: 80vh;
225
225
  display: flex;
226
226
  flex-direction: column;
227
- box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
227
+ box-shadow: var(--huyooo-menu-shadow);
228
228
  animation: file-info-slideIn 0.2s ease-out;
229
229
  }
230
230
 
@@ -239,14 +239,7 @@ onUnmounted(() => {
239
239
  }
240
240
  }
241
241
 
242
- /* 深色模式 */
243
- @media (prefers-color-scheme: dark) {
244
- .file-info-dialog {
245
- background: #2d2d2d;
246
- border-color: #404040;
247
- box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
248
- }
249
- }
242
+ /* 深色模式由全局 data-theme + token 负责,这里不再写组件内 @media */
250
243
 
251
244
  /* 头部 */
252
245
  .file-info-dialog-header {
@@ -254,15 +247,11 @@ onUnmounted(() => {
254
247
  align-items: center;
255
248
  justify-content: space-between;
256
249
  padding: 16px 20px;
257
- border-bottom: 1px solid #e0e0e0;
250
+ border-bottom: 1px solid var(--huyooo-border);
258
251
  gap: 12px;
259
252
  }
260
253
 
261
- @media (prefers-color-scheme: dark) {
262
- .file-info-dialog-header {
263
- border-bottom-color: #404040;
264
- }
265
- }
254
+ /* 深色模式由 token 负责 */
266
255
 
267
256
  .file-info-dialog-title {
268
257
  display: flex;
@@ -275,17 +264,13 @@ onUnmounted(() => {
275
264
  .file-info-dialog-name {
276
265
  font-size: 16px;
277
266
  font-weight: 600;
278
- color: #1a1a1a;
267
+ color: var(--huyooo-text);
279
268
  white-space: nowrap;
280
269
  overflow: hidden;
281
270
  text-overflow: ellipsis;
282
271
  }
283
272
 
284
- @media (prefers-color-scheme: dark) {
285
- .file-info-dialog-name {
286
- color: #e0e0e0;
287
- }
288
- }
273
+ /* 深色模式由 token 负责 */
289
274
 
290
275
  .file-info-dialog-close {
291
276
  display: flex;
@@ -295,7 +280,7 @@ onUnmounted(() => {
295
280
  height: 28px;
296
281
  border: none;
297
282
  background: transparent;
298
- color: #666;
283
+ color: var(--huyooo-text-muted);
299
284
  border-radius: 6px;
300
285
  cursor: pointer;
301
286
  flex-shrink: 0;
@@ -303,19 +288,11 @@ onUnmounted(() => {
303
288
  }
304
289
 
305
290
  .file-info-dialog-close:hover {
306
- background: #f0f0f0;
307
- color: #333;
291
+ background: var(--huyooo-muted);
292
+ color: var(--huyooo-text);
308
293
  }
309
294
 
310
- @media (prefers-color-scheme: dark) {
311
- .file-info-dialog-close {
312
- color: #888;
313
- }
314
- .file-info-dialog-close:hover {
315
- background: #404040;
316
- color: #e0e0e0;
317
- }
318
- }
295
+ /* 深色模式由 token 负责 */
319
296
 
320
297
  /* 内容 */
321
298
  .file-info-dialog-content {
@@ -338,15 +315,11 @@ onUnmounted(() => {
338
315
  gap: 6px;
339
316
  width: 90px;
340
317
  flex-shrink: 0;
341
- color: #666;
318
+ color: var(--huyooo-text-muted);
342
319
  font-size: 13px;
343
320
  }
344
321
 
345
- @media (prefers-color-scheme: dark) {
346
- .file-info-label {
347
- color: #888;
348
- }
349
- }
322
+ /* 深色模式由 token 负责 */
350
323
 
351
324
  .file-info-label svg {
352
325
  flex-shrink: 0;
@@ -354,32 +327,25 @@ onUnmounted(() => {
354
327
 
355
328
  .file-info-value {
356
329
  flex: 1;
357
- color: #1a1a1a;
330
+ color: var(--huyooo-text);
358
331
  font-size: 13px;
359
332
  word-break: break-all;
360
333
  line-height: 1.4;
361
334
  }
362
335
 
363
- @media (prefers-color-scheme: dark) {
364
- .file-info-value {
365
- color: #e0e0e0;
366
- }
367
- }
336
+ /* 深色模式由 token 负责 */
368
337
 
369
338
  .file-info-value--path {
370
339
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', monospace;
371
340
  font-size: 12px;
372
- background: #f5f5f5;
341
+ background: var(--huyooo-code-bg);
342
+ color: var(--huyooo-code-text);
373
343
  padding: 4px 8px;
374
344
  border-radius: 4px;
375
345
  user-select: all;
376
346
  }
377
347
 
378
- @media (prefers-color-scheme: dark) {
379
- .file-info-value--path {
380
- background: #383838;
381
- }
382
- }
348
+ /* 深色模式由 token 负责 */
383
349
 
384
350
  /* 图标样式 */
385
351
  .file-info-icon {
@@ -389,35 +355,35 @@ onUnmounted(() => {
389
355
  }
390
356
 
391
357
  .file-info-icon--folder {
392
- color: #dcb67a;
358
+ color: var(--huyooo-filetype-folder);
393
359
  }
394
360
 
395
361
  .file-info-icon--image {
396
- color: #7ec699;
362
+ color: var(--huyooo-filetype-image);
397
363
  }
398
364
 
399
365
  .file-info-icon--video {
400
- color: #c678dd;
366
+ color: var(--huyooo-filetype-video);
401
367
  }
402
368
 
403
369
  .file-info-icon--music {
404
- color: #e06c75;
370
+ color: var(--huyooo-filetype-music);
405
371
  }
406
372
 
407
373
  .file-info-icon--document {
408
- color: #61afef;
374
+ color: var(--huyooo-filetype-document);
409
375
  }
410
376
 
411
377
  .file-info-icon--code {
412
- color: #98c379;
378
+ color: var(--huyooo-filetype-code);
413
379
  }
414
380
 
415
381
  .file-info-icon--archive {
416
- color: #d19a66;
382
+ color: var(--huyooo-filetype-archive);
417
383
  }
418
384
 
419
385
  .file-info-icon--file {
420
- color: #abb2bf;
386
+ color: var(--huyooo-filetype-file);
421
387
  }
422
388
 
423
389
  /* 底部 */
@@ -425,14 +391,10 @@ onUnmounted(() => {
425
391
  display: flex;
426
392
  justify-content: flex-end;
427
393
  padding: 12px 20px;
428
- border-top: 1px solid #e0e0e0;
394
+ border-top: 1px solid var(--huyooo-border);
429
395
  }
430
396
 
431
- @media (prefers-color-scheme: dark) {
432
- .file-info-dialog-footer {
433
- border-top-color: #404040;
434
- }
435
- }
397
+ /* 深色模式由 token 负责 */
436
398
 
437
399
  .file-info-dialog-btn {
438
400
  padding: 6px 16px;
@@ -441,12 +403,12 @@ onUnmounted(() => {
441
403
  font-size: 13px;
442
404
  cursor: pointer;
443
405
  transition: all 0.15s ease;
444
- background: #007aff;
406
+ background: var(--huyooo-primary);
445
407
  color: white;
446
408
  }
447
409
 
448
410
  .file-info-dialog-btn:hover {
449
- background: #0066d6;
411
+ background: var(--huyooo-primary-hover, var(--huyooo-primary));
450
412
  }
451
413
  </style>
452
414
 
@@ -213,13 +213,13 @@ const handleEscapeKey = (e: KeyboardEvent) => {
213
213
  /* 表头 - 更紧凑 */
214
214
  .file-list-header {
215
215
  font-size: 11px;
216
- color: #86868b;
216
+ color: var(--huyooo-text-muted);
217
217
  font-weight: 500;
218
218
  text-transform: uppercase;
219
219
  letter-spacing: 0.3px;
220
220
  position: sticky;
221
221
  top: 0;
222
- background: rgba(255, 255, 255, 0.92);
222
+ background: var(--huyooo-panel-bg);
223
223
  backdrop-filter: blur(8px);
224
224
  -webkit-backdrop-filter: blur(8px);
225
225
  z-index: 10;
@@ -228,7 +228,7 @@ const handleEscapeKey = (e: KeyboardEvent) => {
228
228
 
229
229
  .file-list-header-cell {
230
230
  padding: 6px 12px;
231
- border-bottom: 1px solid rgba(0, 0, 0, 0.08);
231
+ border-bottom: 1px solid var(--huyooo-border);
232
232
  cursor: pointer;
233
233
  text-align: left;
234
234
  font-weight: 500;
@@ -236,7 +236,7 @@ const handleEscapeKey = (e: KeyboardEvent) => {
236
236
  }
237
237
 
238
238
  .file-list-header-cell:hover {
239
- background: rgba(0, 0, 0, 0.04);
239
+ background: var(--huyooo-muted-hover);
240
240
  }
241
241
 
242
242
  .file-list-header-cell--name {
@@ -273,36 +273,36 @@ const handleEscapeKey = (e: KeyboardEvent) => {
273
273
 
274
274
  /* 奇数行 - 轻微斑马纹 */
275
275
  .file-list-row--odd {
276
- background: rgba(0, 0, 0, 0.015);
276
+ background: color-mix(in srgb, var(--huyooo-muted) 20%, transparent);
277
277
  }
278
278
 
279
279
  /* 悬停效果 */
280
280
  .file-list-row--even:hover,
281
281
  .file-list-row--odd:hover {
282
- background: rgba(0, 0, 0, 0.04);
282
+ background: var(--huyooo-muted-hover);
283
283
  }
284
284
 
285
285
  /* 选中状态 - macOS 风格整行高亮 */
286
286
  .file-list-row--selected {
287
- background: #007aff;
287
+ background: var(--huyooo-primary);
288
288
  color: white;
289
289
  }
290
290
 
291
291
  .file-list-row--selected:hover {
292
- background: #0066d6;
292
+ background: var(--huyooo-primary-hover, var(--huyooo-primary));
293
293
  }
294
294
 
295
295
  /* 拖拽悬停 */
296
296
  .file-list-row--drag-over {
297
- background: rgba(0, 122, 255, 0.15);
298
- border-bottom-color: rgba(0, 122, 255, 0.3);
297
+ background: var(--huyooo-focus-ring);
298
+ border-bottom-color: var(--huyooo-primary);
299
299
  }
300
300
 
301
301
  /* 单元格 - 更紧凑的行高 */
302
302
  .file-list-cell {
303
303
  padding: 4px 12px;
304
304
  white-space: nowrap;
305
- color: #6e6e73;
305
+ color: var(--huyooo-text-muted);
306
306
  vertical-align: middle;
307
307
  height: 28px;
308
308
  }
@@ -318,14 +318,14 @@ const handleEscapeKey = (e: KeyboardEvent) => {
318
318
 
319
319
  /* 选中时单元格颜色 */
320
320
  .file-list-cell--selected {
321
- color: rgba(255, 255, 255, 0.75);
321
+ color: var(--huyooo-on-primary-muted);
322
322
  }
323
323
 
324
324
  /* 大小列 - 等宽字体 */
325
325
  .file-list-cell--size {
326
326
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
327
327
  font-size: 11px;
328
- color: #8e8e93;
328
+ color: var(--huyooo-text-disabled);
329
329
  font-variant-numeric: tabular-nums;
330
330
  }
331
331
 
@@ -334,7 +334,7 @@ const handleEscapeKey = (e: KeyboardEvent) => {
334
334
  overflow: hidden;
335
335
  text-overflow: ellipsis;
336
336
  flex: 1;
337
- color: #1d1d1f;
337
+ color: var(--huyooo-text);
338
338
  cursor: default;
339
339
  font-weight: 400;
340
340
  }
@@ -351,71 +351,14 @@ const handleEscapeKey = (e: KeyboardEvent) => {
351
351
  flex: 1;
352
352
  font-size: 13px;
353
353
  padding: 2px 6px;
354
- border: 1px solid #007aff;
354
+ border: 1px solid var(--huyooo-primary);
355
355
  border-radius: 4px;
356
356
  outline: none;
357
- box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
358
- background: white;
357
+ box-shadow: 0 0 0 3px var(--huyooo-focus-ring);
358
+ background: var(--huyooo-surface-2);
359
+ color: var(--huyooo-text);
359
360
  cursor: text;
360
361
  }
361
362
 
362
- /* 深色模式支持 */
363
- @media (prefers-color-scheme: dark) {
364
- .file-list-header {
365
- background: rgba(28, 28, 30, 0.92);
366
- color: #98989d;
367
- }
368
-
369
- .file-list-header-cell {
370
- border-bottom-color: rgba(255, 255, 255, 0.08);
371
- }
372
-
373
- .file-list-header-cell:hover {
374
- background: rgba(255, 255, 255, 0.04);
375
- }
376
-
377
- .file-list-row--odd {
378
- background: rgba(255, 255, 255, 0.02);
379
- }
380
-
381
- .file-list-row--even:hover,
382
- .file-list-row--odd:hover {
383
- background: rgba(255, 255, 255, 0.06);
384
- }
385
-
386
- .file-list-row--selected {
387
- background: #0a84ff;
388
- }
389
-
390
- .file-list-row--selected:hover {
391
- background: #0077ed;
392
- }
393
-
394
- .file-list-row--drag-over {
395
- background: rgba(10, 132, 255, 0.2);
396
- border-bottom-color: rgba(10, 132, 255, 0.4);
397
- }
398
-
399
- .file-list-cell {
400
- color: #98989d;
401
- }
402
-
403
- .file-list-cell--size {
404
- color: #6e6e73;
405
- }
406
-
407
- .file-list-name {
408
- color: #f5f5f7;
409
- }
410
-
411
- .file-list-name--selected {
412
- color: white;
413
- }
414
-
415
- .file-list-rename-input {
416
- background: #1c1c1e;
417
- border-color: #0a84ff;
418
- color: #f5f5f7;
419
- }
420
- }
363
+ /* 深色模式由 token 负责 */
421
364
  </style>
@@ -298,15 +298,15 @@ defineExpose({
298
298
  align-items: center;
299
299
  justify-content: center;
300
300
  height: 100%;
301
- color: rgb(156, 163, 175);
301
+ color: var(--huyooo-text-disabled);
302
302
  gap: 16px;
303
303
  }
304
304
 
305
305
  .file-list-view-spinner {
306
306
  width: 32px;
307
307
  height: 32px;
308
- border: 3px solid rgba(156, 163, 175, 0.2);
309
- border-top-color: rgb(59, 130, 246);
308
+ border: 3px solid color-mix(in srgb, var(--huyooo-text-disabled) 20%, transparent);
309
+ border-top-color: var(--huyooo-primary);
310
310
  border-radius: 50%;
311
311
  animation: spin 0.8s linear infinite;
312
312
  }
@@ -63,9 +63,9 @@ const handleNavigate = (item: SidebarItem) => {
63
63
  <style scoped>
64
64
  .file-sidebar {
65
65
  width: 12rem;
66
- background: rgba(243, 244, 246, 0.5);
66
+ background: var(--huyooo-muted);
67
67
  backdrop-filter: blur(24px);
68
- border-right: 1px solid rgba(229, 231, 233, 0.5);
68
+ border-right: 1px solid var(--huyooo-border);
69
69
  display: flex;
70
70
  flex-direction: column;
71
71
  padding-top: 2rem;
@@ -88,12 +88,12 @@ const handleNavigate = (item: SidebarItem) => {
88
88
  }
89
89
 
90
90
  .file-sidebar::-webkit-scrollbar-thumb {
91
- background: rgba(0, 0, 0, 0.2);
91
+ background: var(--huyooo-scrollbar);
92
92
  border-radius: 3px;
93
93
  }
94
94
 
95
95
  .file-sidebar::-webkit-scrollbar-thumb:hover {
96
- background: rgba(0, 0, 0, 0.3);
96
+ background: var(--huyooo-scrollbar-hover);
97
97
  }
98
98
 
99
99
  .file-sidebar-section {
@@ -106,7 +106,7 @@ const handleNavigate = (item: SidebarItem) => {
106
106
  margin-bottom: 0.5rem;
107
107
  font-size: 0.75rem;
108
108
  font-weight: 600;
109
- color: rgb(107, 114, 128);
109
+ color: var(--huyooo-text-muted);
110
110
  text-transform: uppercase;
111
111
  letter-spacing: 0.05em;
112
112
  }
@@ -133,26 +133,26 @@ const handleNavigate = (item: SidebarItem) => {
133
133
  cursor: pointer;
134
134
  font-size: 0.875rem;
135
135
  font-weight: 500;
136
- color: rgb(75, 85, 99);
136
+ color: var(--huyooo-text-muted);
137
137
  transition: all 200ms;
138
138
  /* no-drag 已由 section 继承 */
139
139
  }
140
140
 
141
141
  .file-sidebar-item:hover {
142
- background: rgba(229, 231, 233, 0.5);
143
- color: black;
142
+ background: var(--huyooo-muted-hover);
143
+ color: var(--huyooo-text);
144
144
  }
145
145
 
146
146
  .file-sidebar-item--active {
147
- background: rgba(209, 213, 219, 0.6);
148
- color: black;
147
+ background: var(--huyooo-muted-hover);
148
+ color: var(--huyooo-text);
149
149
  }
150
150
 
151
151
  .file-sidebar-item-icon {
152
- color: rgb(107, 114, 128);
152
+ color: var(--huyooo-text-muted);
153
153
  }
154
154
 
155
155
  .file-sidebar-item-icon--active {
156
- color: rgb(37, 99, 235);
156
+ color: var(--huyooo-primary);
157
157
  }
158
158
  </style>