fix: minor UI bugs on File and Setting apps

This commit is contained in:
DanyLE 2023-07-18 10:43:42 +02:00 committed by Dany LE
parent 984cdae438
commit a86da11532
6 changed files with 17 additions and 18 deletions

View File

@ -6,6 +6,7 @@ This application is included in the AntOS delivery as system application and
cannot be removed/uinstalled by regular user cannot be removed/uinstalled by regular user
## Change logs ## Change logs
- v0.1.10-b: improve file favorite behaviour
- v0.1.9-b: use "column"/"row" for UI direction names - v0.1.9-b: use "column"/"row" for UI direction names
- v0.1.8-b: use system css variables in theme - v0.1.8-b: use system css variables in theme
- v0.1.7-b: fix - file grid view double click event hanling on diffent cells of a row - v0.1.7-b: fix - file grid view double click event hanling on diffent cells of a row

View File

@ -252,15 +252,20 @@ namespace OS {
const matched = this.favo.data.map((e,i) => { const matched = this.favo.data.map((e,i) => {
return { return {
path: e.path, path: e.path,
index:i index:i,
} }
}) })
.filter(e => { .filter(e => {
return dir.path.startsWith(e.path as string); return dir.path.startsWith(e.path as string);
})
.sort((x,y) => {
if(x.path.length < y.path.length) return 1;
if(x == y) return 0;
return -1;
}); });
if(matched.length != 0) if(matched.length != 0)
{ {
//console.log(matched[0]); // get the longest matched
this.favo.selected = matched[0].index; this.favo.selected = matched[0].index;
} }
} }
@ -482,7 +487,6 @@ namespace OS {
} }
private mnFile(): GUI.BasicItemType{ private mnFile(): GUI.BasicItemType{
//console.log file
const arr: GUI.BasicItemType = { const arr: GUI.BasicItemType = {
text: "__(File)", text: "__(File)",
nodes: [ nodes: [

View File

@ -6,7 +6,7 @@
"author": "Xuan Sang LE", "author": "Xuan Sang LE",
"email": "xsang.le@gmail.com" "email": "xsang.le@gmail.com"
}, },
"version":"0.1.9-b", "version":"0.1.10-b",
"category":"System", "category":"System",
"iconclass":"fa fa-hdd-o", "iconclass":"fa fa-hdd-o",
"mimes":["dir"], "mimes":["dir"],

View File

@ -10,6 +10,7 @@ In case of system anormaly after the modification, the system settings can be re
by simply removing the setting file by simply removing the setting file
## Change logs ## Change logs
- v0.1.5-b: fix VFS setting dialog bugs
- v0.1.4-b: use system css variables in theme - v0.1.4-b: use system css variables in theme
- v0.1.2-b: minor bug fix on UI - v0.1.2-b: minor bug fix on UI
- v0.1.2-b: add README - v0.1.2-b: add README

View File

@ -96,25 +96,18 @@ namespace OS {
} }
VFSSettingDialog.scheme = `\ VFSSettingDialog.scheme = `\
<afx-app-window width='250' height='180' apptitle = "__(Mount Points)"> <afx-app-window width='250' height='200' apptitle = "__(Mount Points)">
<afx-vbox> <afx-vbox padding="10">
<afx-hbox> <afx-hbox>
<div data-width = "10" ></div>
<afx-vbox> <afx-vbox>
<div data-height="10" ></div> <afx-input label= "__(Name)" data-id="txtName"></afx-input>
<afx-label data-height="30" text = "__(Name)" ></afx-label> <afx-input label= "__(Path)" data-id="txtPath"></afx-input>
<input type = "text" data-id= "txtName" ></input>
<div data-height="3" ></div>
<afx-label data-height="30" text = "__(Path)" ></afx-label>
<input type = "text" data-id= "txtPath" ></input>
<div data-height="10" ></div>
<afx-hbox data-height="30"> <afx-hbox data-height="30">
<div ></div> <div ></div>
<afx-button data-id = "btnOk" text = "__(Ok)" data-width = "40" ></afx-button> <afx-button data-id = "btnOk" text = "__(Ok)" data-width = "content" ></afx-button>
<afx-button data-id = "btnCancel" text = "__(Cancel)" data-width = "50" ></afx-button> <afx-button data-id = "btnCancel" text = "__(Cancel)" data-width = "content" ></afx-button>
</afx-hbox> </afx-hbox>
</afx-vbox> </afx-vbox>
<div data-width = "10" ></div>
</afx-hbox> </afx-hbox>
</afx-vbox> </afx-vbox>
</afx-app-window>\ </afx-app-window>\

View File

@ -6,7 +6,7 @@
"author": "Xuan Sang LE", "author": "Xuan Sang LE",
"email": "xsang.le@gmail.com" "email": "xsang.le@gmail.com"
}, },
"version":"0.1.4-b", "version":"0.1.5-b",
"category":"System", "category":"System",
"iconclass":"fa fa-wrench", "iconclass":"fa fa-wrench",
"mimes":["none"] "mimes":["none"]