feat: links to folders open as folders, on machines and SSH hosts, with their own icon; deleting a link leaves what it leads to

This commit is contained in:
redtea committed 2026-10-16 09:34:32 +03:00
1 parent 4da1cc4200
commit 055020c3bb
6 files changed
+60 -7

No files matched your search

+3 -1
View File
@@ -708,7 +708,9 @@
async function del(e) {
// The pane asked about, whatever another pane does meanwhile.
const pane = cur;
const ok = await UI.confirm(e.is_dir ? 'Удалить папку «' + e.name + '» со всем содержимым?' : 'Удалить файл «' + e.name + '»?', {ok: 'Удалить', danger: true});
// A link goes alone: what it leads to stays.
const ok = await UI.confirm(e.link ? 'Удалить ссылку «' + e.name + '»? То, куда она ведёт, останется.'
: e.is_dir ? 'Удалить папку «' + e.name + '» со всем содержимым?' : 'Удалить файл «' + e.name + '»?', {ok: 'Удалить', danger: true});
if (!ok) return;
const r = await pane.src.op(e.is_dir ? 'deltree' : 'delete', {path: join(pane.cwd, e.name)});
r.ok ? (toast('удалено'), pane.go(pane.cwd)) : toast(r.error||'ошибка', true);