mirror of
https://github.com/antos-rde/antosdk-apps.git
synced 2024-12-25 11:48:21 +01:00
About: fix content padding is not correct on some browser
This commit is contained in:
parent
8e15115dc6
commit
2af909117d
@ -4,6 +4,10 @@ This is an example project, generated by AntOS Development Kit
|
|||||||
It is used to show the change logs of the current AntOS version
|
It is used to show the change logs of the current AntOS version
|
||||||
|
|
||||||
## Change logs
|
## Change logs
|
||||||
|
|
||||||
|
### v0.0.5-a
|
||||||
|
* Fix cotent padding is not correct on some browsers
|
||||||
|
|
||||||
### v0.0.4-a
|
### v0.0.4-a
|
||||||
* Add color style to link
|
* Add color style to link
|
||||||
* Fix some minor bugs
|
* Fix some minor bugs
|
@ -1,10 +1,16 @@
|
|||||||
<afx-app-window apptitle="__(About AntOS)" width="450" height="500" data-id="About">
|
<afx-app-window apptitle="__(About AntOS)" width="450" height="500" data-id="About">
|
||||||
<afx-vbox >
|
<afx-vbox >
|
||||||
<div data-id="container" style="padding:10px;overflow:auto;"></div>
|
<div data-height="10"></div>
|
||||||
<afx-hbox data-height="30" style="text-align: right;">
|
<afx-hbox data-id="wrapper">
|
||||||
|
<div data-width="10"></div>
|
||||||
|
<div data-id="container"></div>
|
||||||
|
<div data-width="10"></div>
|
||||||
|
</afx-hbox>
|
||||||
|
<div data-height="5"></div>
|
||||||
|
<afx-hbox data-height="23" style="text-align: right;">
|
||||||
<afx-button data-id="btnclose" text="__(Close)"></afx-button>
|
<afx-button data-id="btnclose" text="__(Close)"></afx-button>
|
||||||
<div data-width="5"></div>
|
<div data-width="5"></div>
|
||||||
</afx-hbox>
|
</afx-hbox>
|
||||||
<div data-height="5"></div>
|
<div data-height="10"></div>
|
||||||
</afx-vbox>
|
</afx-vbox>
|
||||||
</afx-app-window>
|
</afx-app-window>
|
@ -4,6 +4,10 @@ This is an example project, generated by AntOS Development Kit
|
|||||||
It is used to show the change logs of the current AntOS version
|
It is used to show the change logs of the current AntOS version
|
||||||
|
|
||||||
## Change logs
|
## Change logs
|
||||||
|
|
||||||
|
### v0.0.5-a
|
||||||
|
* Fix cotent padding is not correct on some browsers
|
||||||
|
|
||||||
### v0.0.4-a
|
### v0.0.4-a
|
||||||
* Add color style to link
|
* Add color style to link
|
||||||
* Fix some minor bugs
|
* Fix some minor bugs
|
@ -5,3 +5,12 @@ afx-app-window[data-id = "About"] a:hover
|
|||||||
{
|
{
|
||||||
color:#df3154;
|
color:#df3154;
|
||||||
}
|
}
|
||||||
|
afx-app-window[data-id = "About"] afx-hbox[data-id="wrapper"]
|
||||||
|
{
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y:auto;
|
||||||
|
}
|
||||||
|
afx-app-window[data-id = "About"] div[data-id="container"]
|
||||||
|
{
|
||||||
|
text-align: justify;
|
||||||
|
}
|
@ -6,7 +6,7 @@
|
|||||||
"author": "Xuan Sang LE",
|
"author": "Xuan Sang LE",
|
||||||
"email": "xsang.le@gmail.com"
|
"email": "xsang.le@gmail.com"
|
||||||
},
|
},
|
||||||
"version":"0.0.4-a",
|
"version":"0.0.5-a",
|
||||||
"category":"Other",
|
"category":"Other",
|
||||||
"iconclass":"fa fa-question-circle",
|
"iconclass":"fa fa-question-circle",
|
||||||
"mimes":["none"],
|
"mimes":["none"],
|
||||||
|
@ -1,10 +1,16 @@
|
|||||||
<afx-app-window apptitle="__(About AntOS)" width="450" height="500" data-id="About">
|
<afx-app-window apptitle="__(About AntOS)" width="450" height="500" data-id="About">
|
||||||
<afx-vbox >
|
<afx-vbox >
|
||||||
<div data-id="container" style="padding:10px;overflow:auto;"></div>
|
<div data-height="10"></div>
|
||||||
<afx-hbox data-height="30" style="text-align: right;">
|
<afx-hbox data-id="wrapper">
|
||||||
|
<div data-width="10"></div>
|
||||||
|
<div data-id="container"></div>
|
||||||
|
<div data-width="10"></div>
|
||||||
|
</afx-hbox>
|
||||||
|
<div data-height="5"></div>
|
||||||
|
<afx-hbox data-height="23" style="text-align: right;">
|
||||||
<afx-button data-id="btnclose" text="__(Close)"></afx-button>
|
<afx-button data-id="btnclose" text="__(Close)"></afx-button>
|
||||||
<div data-width="5"></div>
|
<div data-width="5"></div>
|
||||||
</afx-hbox>
|
</afx-hbox>
|
||||||
<div data-height="5"></div>
|
<div data-height="10"></div>
|
||||||
</afx-vbox>
|
</afx-vbox>
|
||||||
</afx-app-window>
|
</afx-app-window>
|
Binary file not shown.
@ -4,3 +4,12 @@ afx-app-window[data-id = "About"] a:hover
|
|||||||
{
|
{
|
||||||
color:#df3154;
|
color:#df3154;
|
||||||
}
|
}
|
||||||
|
afx-app-window[data-id = "About"] afx-hbox[data-id="wrapper"]
|
||||||
|
{
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y:auto;
|
||||||
|
}
|
||||||
|
afx-app-window[data-id = "About"] div[data-id="container"]
|
||||||
|
{
|
||||||
|
text-align: justify;
|
||||||
|
}
|
@ -6,7 +6,7 @@
|
|||||||
"author": "Xuan Sang LE",
|
"author": "Xuan Sang LE",
|
||||||
"email": "xsang.le@gmail.com"
|
"email": "xsang.le@gmail.com"
|
||||||
},
|
},
|
||||||
"version":"0.0.4-a",
|
"version":"0.0.5-a",
|
||||||
"category":"Other",
|
"category":"Other",
|
||||||
"iconclass":"fa fa-question-circle",
|
"iconclass":"fa fa-question-circle",
|
||||||
"mimes":["none"],
|
"mimes":["none"],
|
||||||
|
@ -1 +1,130 @@
|
|||||||
(function(){var t,i,e;e=this.OS.PM,i=this.OS.application,(t=class extends this.OS.application.BaseApplication{constructor(t){super("ActivityMonitor",t)}main(){var t;return this.scheme.apptitle="Activity Monitor",this.grid=this.find("mygrid"),this.on("btclick",t=>{var i,s,a;if("btkill"===t.id&&(a=this.grid.selectedRow))return s=a.data[0],(i=e.appByPid(s.text))?i.quit(!0):void 0}),t=[{width:50,text:"__(Pid)"},{text:"__(Name)"},{text:"__(Type)",width:80},{width:80,text:"__(Alive (ms))"}],this.gdata={processes:{},alive:[]},this.grid.header=t,this.monitor()}monitor(){var t;return this.gdata.alive=[],t=(new Date).getTime(),$.each(e.processes,(e,s)=>$.each(s,(e,s)=>(this.gdata.processes[s.pid]?(this.gdata.processes[s.pid][3].text=t-s.birth,this.gdata.processes[s.pid][3].domel.update()):(this.gdata.processes[s.pid]=[{text:s.pid},{icon:0===i[s.name].type?i[s.name].meta.icon:s.icon,iconclass:0===i[s.name].type?i[s.name].meta.iconclass:s.iconclass,text:s.name},{text:0===i[s.name].type?"__(Application)":"__(Service)"},{text:t-s.birth}],this.grid.push(this.gdata.processes[s.pid])),this.gdata.alive.push(s.pid)))),$.each(this.gdata.processes,(t,i)=>{if($.inArray(Number(t),this.gdata.alive)<0)return this.grid.delete(this.gdata.processes[t].domel),this.gdata.processes[t]=void 0,delete this.gdata.processes[t]}),this.timer=setTimeout(()=>this.monitor(),500)}cleanup(t){if(this.timer)return clearTimeout(this.timer)}}).singleton=!0,this.OS.register("ActivityMonitor",t)}).call(this);
|
(function() {
|
||||||
|
// Copyright 2017-2018 Xuan Sang LE <xsang.le AT gmail DOT com>
|
||||||
|
|
||||||
|
// AnTOS Web desktop is is licensed under the GNU General Public
|
||||||
|
// License v3.0, see the LICENCE file for more information
|
||||||
|
|
||||||
|
// This program is free software: you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of
|
||||||
|
// the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// General Public License for more details.
|
||||||
|
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
//along with this program. If not, see https://www.gnu.org/licenses/.
|
||||||
|
var ActivityMonitor, _APP, _PM;
|
||||||
|
|
||||||
|
_PM = this.OS.PM;
|
||||||
|
|
||||||
|
_APP = this.OS.application;
|
||||||
|
|
||||||
|
ActivityMonitor = class ActivityMonitor extends this.OS.application.BaseApplication {
|
||||||
|
constructor(args) {
|
||||||
|
super("ActivityMonitor", args);
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
var header;
|
||||||
|
this.scheme.apptitle = "Activity Monitor";
|
||||||
|
this.grid = this.find("mygrid");
|
||||||
|
this.on("btclick", (e) => {
|
||||||
|
var app, data, item;
|
||||||
|
if (e.id !== "btkill") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
item = this.grid.selectedRow;
|
||||||
|
if (!item) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
data = item.data[0];
|
||||||
|
app = _PM.appByPid(data.text);
|
||||||
|
if (app) {
|
||||||
|
return app.quit(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
header = [
|
||||||
|
{
|
||||||
|
width: 50,
|
||||||
|
text: "__(Pid)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "__(Name)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "__(Type)",
|
||||||
|
width: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
width: 80,
|
||||||
|
text: "__(Alive (ms))"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
this.gdata = {
|
||||||
|
processes: {},
|
||||||
|
alive: []
|
||||||
|
};
|
||||||
|
this.grid.header = header;
|
||||||
|
return this.monitor();
|
||||||
|
}
|
||||||
|
|
||||||
|
monitor() {
|
||||||
|
var now;
|
||||||
|
//get all current running process
|
||||||
|
this.gdata.alive = [];
|
||||||
|
now = (new Date()).getTime();
|
||||||
|
$.each(_PM.processes, (i, d) => {
|
||||||
|
return $.each(d, (j, a) => {
|
||||||
|
if (this.gdata.processes[a.pid]) {
|
||||||
|
this.gdata.processes[a.pid][3].text = now - a.birth;
|
||||||
|
this.gdata.processes[a.pid][3].domel.update(); //add it
|
||||||
|
} else {
|
||||||
|
this.gdata.processes[a.pid] = [
|
||||||
|
{
|
||||||
|
text: a.pid
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: _APP[a.name].type === 0 ? _APP[a.name].meta.icon : a.icon,
|
||||||
|
iconclass: _APP[a.name].type === 0 ? _APP[a.name].meta.iconclass : a.iconclass,
|
||||||
|
text: a.name
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: _APP[a.name].type === 0 ? "__(Application)" : "__(Service)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: now - a.birth
|
||||||
|
}
|
||||||
|
];
|
||||||
|
this.grid.push(this.gdata.processes[a.pid]);
|
||||||
|
}
|
||||||
|
return this.gdata.alive.push(a.pid);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$.each(this.gdata.processes, (i, e) => {
|
||||||
|
if (($.inArray(Number(i), this.gdata.alive)) < 0) {
|
||||||
|
this.grid.delete(this.gdata.processes[i].domel);
|
||||||
|
this.gdata.processes[i] = void 0;
|
||||||
|
return delete this.gdata.processes[i];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return this.timer = setTimeout((() => {
|
||||||
|
return this.monitor();
|
||||||
|
}), 500);
|
||||||
|
}
|
||||||
|
|
||||||
|
cleanup(e) {
|
||||||
|
if (this.timer) {
|
||||||
|
return clearTimeout(this.timer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
ActivityMonitor.singleton = true;
|
||||||
|
|
||||||
|
this.OS.register("ActivityMonitor", ActivityMonitor);
|
||||||
|
|
||||||
|
}).call(this);
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
"description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/About/README.md",
|
"description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/About/README.md",
|
||||||
"category": "Other",
|
"category": "Other",
|
||||||
"author": "Xuan Sang LE",
|
"author": "Xuan Sang LE",
|
||||||
"version": "0.0.4-a",
|
"version": "0.0.5-a",
|
||||||
"download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/About/build/release/About.zip"
|
"download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/About/build/release/About.zip"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user