@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.
- package/dist/index.html +5 -4
- 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
|
-
|
|
784
|
-
|
|
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;
|