From 5885bff95a17cc0a2fb94fdf6f2050b972778b34 Mon Sep 17 00:00:00 2001 From: ThinLiquid Date: Mon, 4 Dec 2023 09:40:17 +0000 Subject: [PATCH] =?UTF-8?q?[=F0=9F=92=84]=20UI=20Overhaul?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 6 ++ package.json | 1 + src/assets/style.less | 70 +++++++++----- src/builtin/apps/browser.ts | 45 +++++---- src/builtin/apps/editor.ts | 4 +- src/builtin/apps/files.ts | 34 +++---- src/builtin/plugins/appLauncher.ts | 18 ---- src/builtin/plugins/apps.ts | 9 +- src/builtin/plugins/battery.ts | 26 ----- src/builtin/plugins/switcher.ts | 15 --- src/builtin/plugins/weather.ts | 14 --- src/index.ts | 1 + src/instances/Flow.ts | 12 +-- src/instances/Preloader.ts | 18 +++- src/instances/StatusBar.ts | 148 ++++++++++++++++++++++++++++- src/structures/FlowWindow.ts | 15 ++- 16 files changed, 271 insertions(+), 165 deletions(-) delete mode 100644 src/builtin/plugins/appLauncher.ts delete mode 100644 src/builtin/plugins/battery.ts delete mode 100644 src/builtin/plugins/switcher.ts delete mode 100644 src/builtin/plugins/weather.ts diff --git a/package-lock.json b/package-lock.json index f789f20..9a2d297 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "@ptkdev/logger": "^1.8.0", "eruda": "^3.0.1", "filer": "^1.4.1", + "material-symbols": "^0.14.1", "prism-code-editor": "^2.2.0", "uuid": "^9.0.1" }, @@ -4101,6 +4102,11 @@ "node": ">= 12" } }, + "node_modules/material-symbols": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/material-symbols/-/material-symbols-0.14.1.tgz", + "integrity": "sha512-qFUhEt90BbKMkpUIN8OdrjFpFBSeQ2XyB6H2Z08wecOWJnbkvAgslejKivgEewtPse14ElkOwZeoHakPZYUEhQ==" + }, "node_modules/md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", diff --git a/package.json b/package.json index c1e5e23..13c705b 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "@ptkdev/logger": "^1.8.0", "eruda": "^3.0.1", "filer": "^1.4.1", + "material-symbols": "^0.14.1", "prism-code-editor": "^2.2.0", "uuid": "^9.0.1" }, diff --git a/src/assets/style.less b/src/assets/style.less index 9334dc3..00ccaba 100644 --- a/src/assets/style.less +++ b/src/assets/style.less @@ -1,4 +1,3 @@ -@import url(https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css); @import url(https://api.fontshare.com/v2/css?f[]=satoshi@1,2&display=swap); :root { @@ -9,6 +8,16 @@ --base: #1e1e2e; --mantle: #181825; --crust: #11111b; + + --app-radius: 25%; +} + +.material-symbols-rounded { + font-variation-settings: + 'FILL' 0, + 'wght' 400, + 'GRAD' 200, + 'opsz' 24 } body, @@ -18,10 +27,9 @@ html { width: 100vw; height: 100vh; - margin: 10px; - display: flex; flex-direction: column; + margin: 0; overflow: hidden; } @@ -31,6 +39,7 @@ html { } * { + box-sizing: border-box; -ms-overflow-style: none; scrollbar-width: none; @@ -44,34 +53,44 @@ html { } toolbar { - width: calc(100% - 40px); + width: 100%; display: flex; gap: 10px; - margin: 0 0 0 0; - justify-content: center; - - div[data-toolbar-id="appview"] { - background: linear-gradient(45deg, var(--crust), var(--surface-0)); - } + background: var(--mantle); + margin: 0; + padding: 10px; & > div { - background: var(--base); - padding: 5px; - border-radius: 5px; - box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1), 0 0px 10px rgba(0, 0, 0, 0.1); - height: 40px !important; + &.outlined { + padding: 10px; + background: var(--base); + border-radius: 10px; + } + + &[data-toolbar-id="controls"] { + * { + font-size: 24px; + } + gap: 5px; + } + + &[data-toolbar-id="plugins"] { + width: 24px; + padding: 10px 0; + } + display: flex; + align-self: center; app { display: flex; - gap: 10px; align-items: center; cursor: pointer; img { aspect-ratio: 1 / 1; - height: 2em; - border-radius: 40%; + height: 35px; + border-radius: var(--app-radius); } } } @@ -79,11 +98,10 @@ toolbar { window-area { position: relative; - width: calc(100% - 40px); - margin-top: 20px; - margin-bottom: 20px; + width: 100%; height: 100%; overflow: hidden; + margin: 10px; window { background: var(--base); @@ -97,7 +115,7 @@ window-area { transition: 0.2s opacity, 0.2s width, 0.2s height; window-header { - height: 20px; + height: 35px; padding: 7.5px; display: flex; align-items: center; @@ -106,7 +124,7 @@ window-area { img { aspect-ratio: 1 / 1; height: 1.2em; - border-radius: 40%; + border-radius: var(--app-radius); } } @@ -163,7 +181,7 @@ launcher { img { width: 100%; - border-radius: 40%; + border-radius: var(--app-radius); aspect-ratio: 1 / 1; } @@ -218,4 +236,8 @@ preloader { align-items: center; gap: 2px; } +} + +flex { + flex: 1; } \ No newline at end of file diff --git a/src/builtin/apps/browser.ts b/src/builtin/apps/browser.ts index d5f489c..bcf0bc8 100644 --- a/src/builtin/apps/browser.ts +++ b/src/builtin/apps/browser.ts @@ -29,12 +29,12 @@ export default class BrowserApp implements App {
- - - + arrow_back + arrow_forward + refresh - - + toggle_on + fullscreen