mirror of
https://github.com/lxsang/antos-frontend.git
synced 2024-12-26 01:18:21 +01:00
Minor improvement
- Use arrow up key on File widget to navigate to parent directory - Application will trigger a "launched" event when opened
This commit is contained in:
parent
f97a45be15
commit
b2ce9ec978
Binary file not shown.
@ -1070,12 +1070,6 @@ namespace OS {
|
||||
return reject(d);
|
||||
}
|
||||
FileDialog.last_opened = path;
|
||||
if (!dir.isRoot()) {
|
||||
const p = dir.parent();
|
||||
p.filename = "[..]";
|
||||
p.type = "dir";
|
||||
d.result.unshift(p);
|
||||
}
|
||||
return resolve(d.result);
|
||||
})
|
||||
.catch((e: Error): void => reject(__e(e)));
|
||||
@ -1188,6 +1182,18 @@ namespace OS {
|
||||
if (this.data && this.data.hidden) {
|
||||
return (fileview.showhidden = this.data.hidden);
|
||||
}
|
||||
|
||||
$(this.scheme).on("keyup", (evt)=>{
|
||||
if(evt.which === 38)
|
||||
{
|
||||
const currdir = fileview.path.asFileHandle();
|
||||
if (currdir.isRoot()) {
|
||||
return;
|
||||
}
|
||||
const p = currdir.parent();
|
||||
return fileview.path = p.path;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -128,6 +128,7 @@ namespace OS {
|
||||
app.scheme.uify(app.observable, true);
|
||||
app.main();
|
||||
app.show();
|
||||
app.observable.trigger("launched",undefined);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -372,6 +372,15 @@ namespace OS {
|
||||
}
|
||||
});
|
||||
$(this.scheme).on("keyup", (evt)=>{
|
||||
if(evt.which === 38)
|
||||
{
|
||||
if (this.currdir.isRoot()) {
|
||||
return;
|
||||
}
|
||||
const p = this.currdir.parent();
|
||||
this.favo.selected = -1;
|
||||
return this.view.path = p.path;
|
||||
}
|
||||
if(!evt.ctrlKey)
|
||||
{
|
||||
this.view.multiselect = false;
|
||||
|
Loading…
Reference in New Issue
Block a user