mirror of
https://github.com/lxsang/antos-frontend.git
synced 2024-12-27 01:38:21 +01:00
Bug fix + improvement:
- About dialog now can display package README file - Fix: double click handling on grid view - add README to packages - support source map in release version
This commit is contained in:
parent
6cbb463f6f
commit
2fd4bb5c96
11
Makefile
11
Makefile
@ -185,7 +185,12 @@ pkgar:
|
|||||||
uglify:
|
uglify:
|
||||||
# sudo npm install $(UGLIFYJS) -g
|
# sudo npm install $(UGLIFYJS) -g
|
||||||
#
|
#
|
||||||
$(UGLIFYJS) $(BUILDDIR)/scripts/antos.js --compress --mangle --output $(BUILDDIR)/scripts/antos.js
|
mv $(BUILDDIR)/scripts/antos.js $(BUILDDIR)/scripts/antos_src.js
|
||||||
|
cp $(BUILDDIR)/scripts/antos_src.js ./
|
||||||
|
$(UGLIFYJS) antos_src.js --compress --mangle --output antos.js --source-map "url='antos.js.map'"
|
||||||
|
mv antos.js* $(BUILDDIR)/scripts/
|
||||||
|
rm antos_src.js
|
||||||
|
|
||||||
# uglify tags
|
# uglify tags
|
||||||
# npm install $(UGLIFYCSS) -g
|
# npm install $(UGLIFYCSS) -g
|
||||||
# uglify the css
|
# uglify the css
|
||||||
@ -196,7 +201,9 @@ uglify:
|
|||||||
|
|
||||||
for d in $(packages); do\
|
for d in $(packages); do\
|
||||||
echo "Uglifying $$d";\
|
echo "Uglifying $$d";\
|
||||||
test -f $(BUILDDIR)/packages/$$d/main.js && $(UGLIFYJS) $(BUILDDIR)/packages/$$d/main.js --compress --mangle --output $(BUILDDIR)/packages/$$d/main.js;\
|
test -f $(BUILDDIR)/packages/$$d/main.js && \
|
||||||
|
$(UGLIFYJS) $(BUILDDIR)/packages/$$d/main.js \
|
||||||
|
--compress --mangle --output $(BUILDDIR)/packages/$$d/main.js;\
|
||||||
test -f $(BUILDDIR)/packages/$$d/main.css && $(UGLIFYCSS) --output $(BUILDDIR)/packages/$$d/main.css $(BUILDDIR)/packages/$$d/main.css;\
|
test -f $(BUILDDIR)/packages/$$d/main.css && $(UGLIFYCSS) --output $(BUILDDIR)/packages/$$d/main.css $(BUILDDIR)/packages/$$d/main.css;\
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Binary file not shown.
@ -17,6 +17,7 @@
|
|||||||
//along with this program. If not, see https://www.gnu.org/licenses/.
|
//along with this program. If not, see https://www.gnu.org/licenses/.
|
||||||
namespace OS {
|
namespace OS {
|
||||||
export namespace GUI {
|
export namespace GUI {
|
||||||
|
declare var showdown: any;
|
||||||
/**
|
/**
|
||||||
* the SubWindow class is the abstract prototype of all
|
* the SubWindow class is the abstract prototype of all
|
||||||
* modal windows or dialogs definition in AntOS
|
* modal windows or dialogs definition in AntOS
|
||||||
@ -957,14 +958,25 @@ namespace OS {
|
|||||||
if (!mt.info) {
|
if (!mt.info) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const rows = [];
|
const rows = [
|
||||||
for (let k in mt.info) {
|
[{ text: __("Author") }, { text: mt.info.author }],
|
||||||
const v = mt.info[k];
|
[{ text: __("Email") }, { text: mt.info.email }]
|
||||||
rows.push([{ text: k }, { text: v }]);
|
];
|
||||||
}
|
|
||||||
const grid = this.find("mygrid") as tag.GridViewTag;
|
const grid = this.find("mygrid") as tag.GridViewTag;
|
||||||
grid.header = [{ text: "", width: 100 }, { text: "" }];
|
grid.header = [{ text: "", width: 100 }, { text: "" }];
|
||||||
grid.rows = rows;
|
grid.rows = rows;
|
||||||
|
`pkg://${mt.pkgname?mt.pkgname:mt.app}/README.md`
|
||||||
|
.asFileHandle()
|
||||||
|
.read()
|
||||||
|
.then(async (data) => {
|
||||||
|
let _ = await API.requires("os://scripts/showdown.min.js");
|
||||||
|
const converter = new showdown.Converter();
|
||||||
|
const html = converter.makeHtml(data);
|
||||||
|
const el = this.find("read-me");
|
||||||
|
$(el).html(html);
|
||||||
|
$("img", el).css("width", "100%");
|
||||||
|
})
|
||||||
|
.catch(e => {});
|
||||||
(this.find("btnCancel") as tag.ButtonTag).onbtclick = (
|
(this.find("btnCancel") as tag.ButtonTag).onbtclick = (
|
||||||
_e
|
_e
|
||||||
): void => {
|
): void => {
|
||||||
@ -976,7 +988,7 @@ namespace OS {
|
|||||||
* Scheme definition
|
* Scheme definition
|
||||||
*/
|
*/
|
||||||
AboutDialog.scheme = `\
|
AboutDialog.scheme = `\
|
||||||
<afx-app-window data-id = 'about-window' width='300' height='200'>
|
<afx-app-window data-id = 'about-window' width='450' height='400'>
|
||||||
<afx-vbox>
|
<afx-vbox>
|
||||||
<div style="text-align:center; margin-top:10px;" data-height="50">
|
<div style="text-align:center; margin-top:10px;" data-height="50">
|
||||||
<h3 style = "margin:0;padding:0;">
|
<h3 style = "margin:0;padding:0;">
|
||||||
@ -984,11 +996,12 @@ namespace OS {
|
|||||||
</h3>
|
</h3>
|
||||||
<i><p style = "margin:0; padding:0" data-id = 'mydesc'></p></i>
|
<i><p style = "margin:0; padding:0" data-id = 'mydesc'></p></i>
|
||||||
</div>
|
</div>
|
||||||
<afx-hbox>
|
<afx-hbox data-height="60">
|
||||||
<div data-width="10"></div>
|
<div data-width="10"></div>
|
||||||
<afx-grid-view data-id = 'mygrid'></afx-grid-view>
|
<afx-grid-view data-id = 'mygrid'></afx-grid-view>
|
||||||
</afx-hbox>
|
</afx-hbox>
|
||||||
|
<div data-id="read-me" style="overflow-x: hidden; overflow-y: auto;"></div>
|
||||||
|
<div data-height="10"></div>
|
||||||
<afx-hbox data-height="30">
|
<afx-hbox data-height="30">
|
||||||
<div ></div>
|
<div ></div>
|
||||||
<afx-button data-id = "btnCancel" text = "__(Cancel)" data-width = "60" ></afx-button>
|
<afx-button data-id = "btnCancel" text = "__(Cancel)" data-width = "60" ></afx-button>
|
||||||
|
@ -259,7 +259,7 @@ namespace OS {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Ant.__e = function (e: Error): Error {
|
Ant.__e = function (e: Error): Error {
|
||||||
const reason = new Error(e.toString());
|
const reason = new Error(e.toString().replace(/^Error: /g, ""));
|
||||||
reason.stack += "\nCaused By:\n" + e.stack;
|
reason.stack += "\nCaused By:\n" + e.stack;
|
||||||
return reason;
|
return reason;
|
||||||
};
|
};
|
||||||
|
@ -507,14 +507,16 @@ namespace OS {
|
|||||||
if (v.filename[0] === "." && !this.showhidden) {
|
if (v.filename[0] === "." && !this.showhidden) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(!v.text)
|
|
||||||
v.text = v.filename;
|
|
||||||
|
|
||||||
v.iconclass = v.iconclass ? v.iconclass : v.type;
|
v.iconclass = v.iconclass ? v.iconclass : v.type;
|
||||||
if(v.icon)
|
if(v.icon)
|
||||||
v.iconclass = undefined;
|
v.iconclass = undefined;
|
||||||
const row = [
|
const row = [
|
||||||
v,
|
{
|
||||||
|
text: v.filename,
|
||||||
|
icon: v.icon,
|
||||||
|
iconclass: v.iconclass,
|
||||||
|
data: v
|
||||||
|
},
|
||||||
{
|
{
|
||||||
text: v.mtime,
|
text: v.mtime,
|
||||||
data: v,
|
data: v,
|
||||||
@ -720,7 +722,7 @@ namespace OS {
|
|||||||
($(e.data.item).children()[0] as GridCellPrototype)
|
($(e.data.item).children()[0] as GridCellPrototype)
|
||||||
.data as API.FileInfoType
|
.data as API.FileInfoType
|
||||||
);
|
);
|
||||||
this._selectedFiles = e.data.items.map( x => ($(x).children()[0] as GridCellPrototype).data as API.FileInfoType);
|
this._selectedFiles = e.data.items.map( x => ($(x).children()[0] as GridCellPrototype).data.data as API.FileInfoType);
|
||||||
};
|
};
|
||||||
tree.ontreeselect = (e) => {
|
tree.ontreeselect = (e) => {
|
||||||
this.fileselect(e.data.item.data as API.FileInfoType);
|
this.fileselect(e.data.item.data as API.FileInfoType);
|
||||||
@ -731,7 +733,7 @@ namespace OS {
|
|||||||
this.filedbclick(e.data.item.data as API.FileInfoType);
|
this.filedbclick(e.data.item.data as API.FileInfoType);
|
||||||
};
|
};
|
||||||
grid.oncelldbclick = (e) => {
|
grid.oncelldbclick = (e) => {
|
||||||
this.filedbclick(e.data.item.data as API.FileInfoType);
|
this.filedbclick(e.data.item.data.data as API.FileInfoType);
|
||||||
};
|
};
|
||||||
tree.ontreedbclick = (e) => {
|
tree.ontreedbclick = (e) => {
|
||||||
this.filedbclick(e.data.item.data as API.FileInfoType);
|
this.filedbclick(e.data.item.data as API.FileInfoType);
|
||||||
|
@ -4,7 +4,7 @@ libfiles =
|
|||||||
|
|
||||||
cssfiles = main.css
|
cssfiles = main.css
|
||||||
|
|
||||||
copyfiles = scheme.html package.json
|
copyfiles = scheme.html package.json README.md
|
||||||
|
|
||||||
|
|
||||||
PKG_NAME=Files
|
PKG_NAME=Files
|
||||||
|
9
src/packages/Files/README.md
Normal file
9
src/packages/Files/README.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# Files
|
||||||
|
|
||||||
|
Base AntOS file explorer application.
|
||||||
|
|
||||||
|
This application is included in the AntOS delivery as system application and
|
||||||
|
cannot be removed/uinstalled by regular user
|
||||||
|
|
||||||
|
## Change logs
|
||||||
|
- v0.1.7-b: fix - file grid view double click event hanling on diffent cells of a row
|
@ -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.6-b",
|
"version":"0.1.7-b",
|
||||||
"category":"System",
|
"category":"System",
|
||||||
"iconclass":"fa fa-hdd-o",
|
"iconclass":"fa fa-hdd-o",
|
||||||
"mimes":["dir"],
|
"mimes":["dir"],
|
||||||
|
@ -4,7 +4,7 @@ libfiles =
|
|||||||
|
|
||||||
cssfiles = main.css
|
cssfiles = main.css
|
||||||
|
|
||||||
copyfiles = scheme.html package.json
|
copyfiles = scheme.html package.json README.md
|
||||||
|
|
||||||
|
|
||||||
PKG_NAME=MarketPlace
|
PKG_NAME=MarketPlace
|
||||||
|
8
src/packages/MarketPlace/README.md
Normal file
8
src/packages/MarketPlace/README.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# Market Place
|
||||||
|
|
||||||
|
AntOS original application store.
|
||||||
|
This application is icluded in the AntOS delivery
|
||||||
|
and cannot be removed/uinstalled by regular user
|
||||||
|
|
||||||
|
## Change logs
|
||||||
|
- v0.2.5-b: add README.md
|
@ -7,7 +7,7 @@
|
|||||||
"author": "Xuan Sang LE",
|
"author": "Xuan Sang LE",
|
||||||
"email": "xsang.le@gmail.com"
|
"email": "xsang.le@gmail.com"
|
||||||
},
|
},
|
||||||
"version":"0.2.4-a",
|
"version":"0.2.5-a",
|
||||||
"category":"System",
|
"category":"System",
|
||||||
"iconclass":"fa fa-shopping-bag",
|
"iconclass":"fa fa-shopping-bag",
|
||||||
"mimes":["none"],
|
"mimes":["none"],
|
||||||
|
@ -4,3 +4,6 @@ Defaut text editor which is included in each AntOS release.
|
|||||||
It has very barebone features: open/edit/save text file.
|
It has very barebone features: open/edit/save text file.
|
||||||
|
|
||||||
Text/Code editor with fancy features can be optionally installed via the Market Place
|
Text/Code editor with fancy features can be optionally installed via the Market Place
|
||||||
|
|
||||||
|
## Change logs
|
||||||
|
-v0.1.1-b: update README
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"author": "Xuan Sang LE",
|
"author": "Xuan Sang LE",
|
||||||
"email": "mrsang@iohub.dev"
|
"email": "mrsang@iohub.dev"
|
||||||
},
|
},
|
||||||
"version": "0.1.0-b",
|
"version": "0.1.1-b",
|
||||||
"category": "Utility",
|
"category": "Utility",
|
||||||
"iconclass": "bi bi-pen",
|
"iconclass": "bi bi-pen",
|
||||||
"mimes": [
|
"mimes": [
|
||||||
|
@ -4,7 +4,7 @@ libfiles =
|
|||||||
|
|
||||||
cssfiles = main.css
|
cssfiles = main.css
|
||||||
|
|
||||||
copyfiles = scheme.html package.json
|
copyfiles = scheme.html package.json README.md
|
||||||
|
|
||||||
|
|
||||||
PKG_NAME=Setting
|
PKG_NAME=Setting
|
||||||
|
13
src/packages/Setting/README.md
Normal file
13
src/packages/Setting/README.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Setting: AntOS system setting and configuration
|
||||||
|
|
||||||
|
GUI based system setting application for AntOS.
|
||||||
|
|
||||||
|
In-depth system settings can be found and modified in .settings.json file stored in HOME directory
|
||||||
|
of current user.
|
||||||
|
|
||||||
|
CAUTION:without using the Setting application, users can modify .settings.json with their own risk.
|
||||||
|
In case of system anormaly after the modification, the system settings can be reset to default
|
||||||
|
by simply removing the setting file
|
||||||
|
|
||||||
|
## Change logs
|
||||||
|
-v0.1.2-b: add README
|
@ -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.1-a",
|
"version":"0.1.2-b",
|
||||||
"category":"System",
|
"category":"System",
|
||||||
"iconclass":"fa fa-wrench",
|
"iconclass":"fa fa-wrench",
|
||||||
"mimes":["none"]
|
"mimes":["none"]
|
||||||
|
@ -4,7 +4,7 @@ libfiles =
|
|||||||
|
|
||||||
cssfiles = main.css
|
cssfiles = main.css
|
||||||
|
|
||||||
copyfiles = package.json scheme.html
|
copyfiles = package.json scheme.html README.md
|
||||||
|
|
||||||
|
|
||||||
PKG_NAME=Syslog
|
PKG_NAME=Syslog
|
||||||
|
6
src/packages/Syslog/README.md
Normal file
6
src/packages/Syslog/README.md
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# Syslog: System notification management and service
|
||||||
|
|
||||||
|
Provide system wise notification service (Push Notification)
|
||||||
|
|
||||||
|
## Change logs
|
||||||
|
-v0.1.2-b: add README
|
@ -13,7 +13,7 @@
|
|||||||
"credit": "dedicated to some one here",
|
"credit": "dedicated to some one here",
|
||||||
"licences": "GPLv3"
|
"licences": "GPLv3"
|
||||||
},
|
},
|
||||||
"version": "0.1.1-a",
|
"version": "0.1.2-b",
|
||||||
"category": "System",
|
"category": "System",
|
||||||
"iconclass": "fa fa-bug",
|
"iconclass": "fa fa-bug",
|
||||||
"mimes": []
|
"mimes": []
|
||||||
|
Loading…
Reference in New Issue
Block a user