mirror of
https://github.com/lxsang/antos-frontend.git
synced 2024-11-08 05:58:22 +01:00
update VFS API
This commit is contained in:
parent
86a94a817a
commit
66e96cc0db
Binary file not shown.
@ -388,7 +388,8 @@ namespace OS {
|
||||
if (v.filename[0] === "." && !this.showhidden) {
|
||||
return;
|
||||
}
|
||||
v.text = v.filename;
|
||||
if(!v.text)
|
||||
v.text = v.filename;
|
||||
if (v.text.length > 10) {
|
||||
v.text = v.text.substring(0, 9) + "...";
|
||||
}
|
||||
@ -412,7 +413,8 @@ namespace OS {
|
||||
if (v.filename[0] === "." && !this.showhidden) {
|
||||
return;
|
||||
}
|
||||
v.text = v.filename;
|
||||
if(!v.text)
|
||||
v.text = v.filename;
|
||||
v.iconclass = v.iconclass ? v.iconclass : v.type;
|
||||
const row = [
|
||||
v,
|
||||
@ -467,7 +469,8 @@ namespace OS {
|
||||
if (v.filename[0] === "." && !this.showhidden) {
|
||||
return undefined;
|
||||
}
|
||||
v.text = v.filename;
|
||||
if(!v.text)
|
||||
v.text = v.filename;
|
||||
if (v.type === "dir") {
|
||||
v.nodes = [];
|
||||
v.open = false;
|
||||
|
@ -1356,11 +1356,17 @@ namespace OS {
|
||||
constructor(path: string) {
|
||||
super(path);
|
||||
if (this.basename) {
|
||||
let v: any = OS.setting.system.packages[this.basename];
|
||||
v.type = "app";
|
||||
v.mime = "antos/app";
|
||||
v.size = 0;
|
||||
this.info = v as FileInfoType;
|
||||
let v = OS.setting.system.packages[this.basename];
|
||||
this.info = {} as FileInfoType;
|
||||
for(const p in v)
|
||||
{
|
||||
this.info[p] = v[p];
|
||||
}
|
||||
|
||||
this.info.type = "app";
|
||||
this.info.mime = "antos/app";
|
||||
this.info.size = 0;
|
||||
this.info.text = v.name;
|
||||
}
|
||||
this.ready = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user