@wendongfly/zihi 1.1.2 → 1.1.4

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.
package/dist/files.html CHANGED
@@ -57,8 +57,11 @@
57
57
  text-decoration: none; display: flex; align-items: center; gap: 0.3rem;
58
58
  }
59
59
  .back-btn:active { border-color: var(--accent); color: var(--accent); }
60
- .logo { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.5px; }
61
- .logo span { color: var(--accent); }
60
+ .logo { display: inline-flex; align-items: center; gap: 0.08em; font-size: 1.35rem; font-weight: 800; letter-spacing: -0.5px; user-select: none; }
61
+ .logo .bolt { display: inline-block; width: 0.85em; height: 1em; position: relative; top: 0.02em; filter: drop-shadow(0 0 4px rgba(249,115,22,0.5)); }
62
+ .logo .zi { color: var(--text); }
63
+ .logo .hi { color: var(--accent); }
64
+ .logo .sub { color: var(--muted); font-weight: 600; margin-left: 0.15em; }
62
65
  .header-right { display: flex; align-items: center; gap: 0.6rem; }
63
66
  .hdr-btn {
64
67
  background: none; border: 1px solid var(--border); color: var(--muted);
@@ -253,7 +256,7 @@
253
256
  <div id="header">
254
257
  <div class="header-left">
255
258
  <a id="back-link" href="/" class="back-btn">&larr;</a>
256
- <div class="logo">we<span>Hi</span> Files</div>
259
+ <div class="logo"><svg class="bolt" viewBox="0 0 32 32" fill="none"><defs><linearGradient id="zg" x1="0" y1="0" x2="0.3" y2="1"><stop offset="0%" stop-color="#ffba08"/><stop offset="100%" stop-color="#f97316"/></linearGradient></defs><polygon points="3,2 29,2 29,7 19,7 22,13 17,15 21,25 29,25 29,30 3,30 3,25 14,25 11,19 16,17 12,7 3,7" fill="url(#zg)"/></svg><span class="zi">i</span><span class="hi">Hi</span><span class="sub">Files</span></div>
257
260
  </div>
258
261
  <div class="header-right">
259
262
  <span id="user-name" style="font-size:0.8rem;color:var(--muted)"></span>
@@ -573,8 +576,9 @@ function closeUploadSheet() {
573
576
 
574
577
  function handleFiles(files) {
575
578
  if (!files.length) return;
579
+ const copy = Array.from(files);
576
580
  closeUploadSheet();
577
- uploadFiles(files);
581
+ uploadFiles(copy);
578
582
  }
579
583
 
580
584
  async function uploadFiles(files) {
package/dist/icon.png CHANGED
Binary file
package/dist/icon.svg CHANGED
@@ -1,4 +1,33 @@
1
1
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192 192" width="192" height="192">
2
- <rect width="192" height="192" rx="32" fill="#0d1117"/>
3
- <text x="96" y="128" text-anchor="middle" font-family="Arial, sans-serif" font-weight="bold" font-size="96" fill="#f97316">Zi</text>
2
+ <defs>
3
+ <linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%">
4
+ <stop offset="0%" style="stop-color:#0d1117"/>
5
+ <stop offset="100%" style="stop-color:#161b22"/>
6
+ </linearGradient>
7
+ <linearGradient id="glow" x1="0%" y1="0%" x2="100%" y2="100%">
8
+ <stop offset="0%" style="stop-color:#f97316"/>
9
+ <stop offset="50%" style="stop-color:#fb923c"/>
10
+ <stop offset="100%" style="stop-color:#f59e0b"/>
11
+ </linearGradient>
12
+ </defs>
13
+ <!-- Background -->
14
+ <rect width="192" height="192" rx="40" fill="url(#bg)"/>
15
+ <!-- Glow circle behind -->
16
+ <circle cx="96" cy="92" r="52" fill="#f9731610"/>
17
+ <!-- Fun Z shape - like a lightning/dance zigzag -->
18
+ <path d="M 58 52 L 128 52 L 72 108 L 134 108" fill="none" stroke="url(#glow)" stroke-width="14" stroke-linecap="round" stroke-linejoin="round"/>
19
+ <!-- Sparkle dots - party vibe -->
20
+ <circle cx="142" cy="44" r="5" fill="#f97316" opacity="0.9"/>
21
+ <circle cx="152" cy="62" r="3" fill="#fb923c" opacity="0.7"/>
22
+ <circle cx="46" cy="118" r="3" fill="#fb923c" opacity="0.7"/>
23
+ <circle cx="38" cy="100" r="4" fill="#f97316" opacity="0.6"/>
24
+ <!-- Winking face on the Z -->
25
+ <circle cx="104" cy="76" r="3.5" fill="#fbbf24"/>
26
+ <path d="M 86 74 Q 89 70 92 74" fill="none" stroke="#fbbf24" stroke-width="2.5" stroke-linecap="round"/>
27
+ <!-- Cheeky smile -->
28
+ <path d="M 85 84 Q 96 94 107 84" fill="none" stroke="#fbbf24" stroke-width="2.5" stroke-linecap="round"/>
29
+ <!-- "Hi" text - small, playful -->
30
+ <text x="118" y="148" font-family="Arial,sans-serif" font-weight="800" font-size="32" fill="#f97316" opacity="0.85" letter-spacing="-1">Hi</text>
31
+ <!-- Small wave hand -->
32
+ <text x="62" y="152" font-size="26" opacity="0.8">&#x1F44B;</text>
4
33
  </svg>
package/dist/index.html CHANGED
@@ -58,11 +58,24 @@
58
58
  border-bottom: 1px solid var(--border);
59
59
  }
60
60
  .logo {
61
+ display: inline-flex;
62
+ align-items: center;
63
+ gap: 0.08em;
61
64
  font-size: 1.35rem;
62
- font-weight: 700;
65
+ font-weight: 800;
63
66
  letter-spacing: -0.5px;
67
+ user-select: none;
64
68
  }
65
- .logo span { color: var(--accent); }
69
+ .logo .bolt {
70
+ display: inline-block;
71
+ width: 0.9em;
72
+ height: 0.9em;
73
+ position: relative;
74
+ top: 0.02em;
75
+ filter: drop-shadow(0 0 4px rgba(249,115,22,0.5));
76
+ }
77
+ .logo .zi { color: var(--text); }
78
+ .logo .hi { color: var(--accent); }
66
79
  #conn-dot {
67
80
  width: 8px; height: 8px;
68
81
  border-radius: 50%;
@@ -415,11 +428,11 @@
415
428
  <body>
416
429
  <div id="app">
417
430
  <div id="header">
418
- <div class="logo">we<span>Hi</span></div>
431
+ <div class="logo"><svg class="bolt" viewBox="0 0 32 32" fill="none"><defs><linearGradient id="zg" x1="0" y1="0" x2="0.3" y2="1"><stop offset="0%" stop-color="#ffba08"/><stop offset="100%" stop-color="#f97316"/></linearGradient></defs><polygon points="3,2 29,2 29,7 19,7 22,13 17,15 21,25 29,25 29,30 3,30 3,25 14,25 11,19 16,17 12,7 3,7" fill="url(#zg)"/></svg><span class="zi">i</span><span class="hi">Hi</span></div>
419
432
  <div style="display:flex;align-items:center;gap:0.6rem">
420
433
  <span id="user-name" style="font-size:0.8rem;color:var(--muted)"></span>
421
434
  <button id="usage-btn" onclick="showUsage()" style="background:none;border:1px solid var(--border);color:var(--muted);font-size:0.75rem;padding:0.3rem 0.6rem;border-radius:6px;cursor:pointer;width:auto">用量</button>
422
- <button id="logout-btn" onclick="doLogout()" style="display:none;background:none;border:1px solid var(--border);color:var(--muted);font-size:0.75rem;padding:0.3rem 0.6rem;border-radius:6px;cursor:pointer;width:auto">退出</button>
435
+ <button id="logout-btn" onclick="doLogout()" style="background:none;border:1px solid var(--border);color:var(--muted);font-size:0.75rem;padding:0.3rem 0.6rem;border-radius:6px;cursor:pointer;width:auto">退出</button>
423
436
  <div id="conn-dot"></div>
424
437
  </div>
425
438
  </div>
@@ -525,10 +538,7 @@
525
538
  // 加载当前用户信息(独占模式显示用户名、退出按钮、锁定目录)
526
539
  let _userDir = null;
527
540
  fetch('/api/me').then(r => r.json()).then(data => {
528
- if ((data.exclusive || data.hasUsers) && data.name) {
529
- document.getElementById('user-name').textContent = data.name;
530
- document.getElementById('logout-btn').style.display = '';
531
- }
541
+ if (data.name) document.getElementById('user-name').textContent = data.name;
532
542
  if (data.dir) {
533
543
  _userDir = data.dir;
534
544
  // 默认填入绑定目录,隐藏盘符栏,保留最近目录