Add features:

- allow pinning apps in Setting
- pinned apps in system pannel
- Services manager in Setting
- Fix and impprove some CSS bug
This commit is contained in:
lxsang
2021-03-15 19:20:42 +01:00
parent 26c397838b
commit 7cd2f97b75
18 changed files with 354 additions and 44 deletions

View File

@ -619,9 +619,9 @@ namespace OS {
data.iconclass = "fa fa-cogs";
}
const dock = $("#sysdock")[0] as tag.AppDockTag;
app.sysdock = dock;
app.init();
app.observable.one("rendered", function () {
app.sysdock = dock;
app.appmenu = $(
"[data-id = 'appmenu']",
"#syspanel"
@ -815,6 +815,7 @@ namespace OS {
if (arr.length > 1) {
tip = arr[1];
}
console.log(el);
const offset = $(el).offset();
const w = $(el).width();
const h = $(el).height();
@ -829,6 +830,10 @@ namespace OS {
left = offset.left + w / 2 - $(label).width() / 2;
top = offset.top - $(label).height() - 5;
break;
case "cb": // center bottom
left = offset.left + w / 2 - $(label).width() / 2;
top = offset.top + $(label).height() + 10;
break;
default:
if (!e) {
return;
@ -944,7 +949,7 @@ namespace OS {
$("#systooltip")[0].uify(undefined);
$("#contextmenu")[0].uify(undefined);
$("#workspace").on("contextmenu",(e) => bindContextMenu(e));
$("#wrapper").on("contextmenu",(e) => bindContextMenu(e));
// tooltip
$(document).on("mouseover", function (e) {
const el: any = $(e.target).closest("[tooltip]");