@wendongfly/myhi 1.0.88 → 1.0.89

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.
Files changed (2) hide show
  1. package/dist/index.html +5 -4
  2. package/package.json +1 -1
package/dist/index.html CHANGED
@@ -525,10 +525,10 @@
525
525
  }
526
526
  if (data.dir) {
527
527
  _userDir = data.dir;
528
- // 默认填入绑定目录,隐藏最近目录和盘符栏(防止跳到其他路径)
528
+ // 默认填入绑定目录,隐藏盘符栏,保留最近目录
529
529
  document.getElementById('inp-cwd').value = data.dir;
530
- document.getElementById('recent-dirs').style.display = 'none';
531
530
  document.getElementById('drive-bar').style.display = 'none';
531
+ renderRecentDirs();
532
532
  }
533
533
  }).catch(() => {});
534
534
 
@@ -780,8 +780,9 @@
780
780
  container.innerHTML = '';
781
781
  const dirs = getRecentDirs();
782
782
  const sorted = Object.entries(dirs).sort((a, b) => b[1] - a[1]);
783
- if (!sorted.length) return;
784
- sorted.forEach(([path]) => {
783
+ const filtered = _userDir ? sorted.filter(([path]) => path.startsWith(_userDir)) : sorted;
784
+ if (!filtered.length) return;
785
+ filtered.forEach(([path]) => {
785
786
  const btn = document.createElement('button');
786
787
  // 只显示最后一级目录名
787
788
  const short = path.replace(/[\\/]$/, '').split(/[\\/]/).pop() || path;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wendongfly/myhi",
3
- "version": "1.0.88",
3
+ "version": "1.0.89",
4
4
  "description": "Web-based terminal sharing with chat UI — control your terminal from phone via LAN/Tailscale",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",