From 55f5795cb5b18f0bc18c58c1e032c2427fce4550 Mon Sep 17 00:00:00 2001 From: Prozilla Date: Mon, 14 Aug 2023 13:41:04 +0200 Subject: [PATCH] Updated styles --- .../file-explorer/FileExplorer.module.css | 4 +- .../applications/settings/Settings.jsx | 68 +++++++++++-------- .../applications/settings/Settings.module.css | 36 ++++++++-- .../context-menu/ContextMenu.module.css | 2 +- .../utils/DropdownButton.module.css | 2 +- src/components/utils/ProgressBar.module.css | 4 +- src/styles/global.css | 4 +- 7 files changed, 82 insertions(+), 38 deletions(-) diff --git a/src/components/applications/file-explorer/FileExplorer.module.css b/src/components/applications/file-explorer/FileExplorer.module.css index 51b515a..11c0cf5 100644 --- a/src/components/applications/file-explorer/FileExplorer.module.css +++ b/src/components/applications/file-explorer/FileExplorer.module.css @@ -103,7 +103,7 @@ } .Nav-button:hover, .Nav-button:focus-visible { - background-color: rgba(255, 255, 255, 10%); + background-color: hsla(var(--background-color-a-hsl), 75%); } .Nav-button svg { @@ -140,7 +140,7 @@ .File-button:hover, .Folder-button:hover, .File-button:focus-visible, .Folder-button:focus-visible { - background-color: rgba(255, 255, 255, 10%); + background-color: hsla(var(--background-color-a-hsl), 35%); } .File-button-preview { diff --git a/src/components/applications/settings/Settings.jsx b/src/components/applications/settings/Settings.jsx index 97d5c0e..7fa329a 100644 --- a/src/components/applications/settings/Settings.jsx +++ b/src/components/applications/settings/Settings.jsx @@ -60,10 +60,13 @@ function StorageTab({ virtualRoot }) { const freeKB = maxKB - usedKB; return (<> -
+

Virtual Drive ({round(maxKB, 1)} KB)

-

{round(usedKB, 1)} KB used - {round(freeKB, 1)} KB free

+ +

{round(usedKB, 1)} KB used

+

{round(freeKB, 1)} KB free

+

Manage data

@@ -82,28 +85,30 @@ function AboutTab({ windowsManager, virtualRoot }) {

About ProzillaOS

ProzillaOS is a web-based operating system inspired by Ubuntu Linux and Windows made with React.js by Prozilla.

- - +
+ + +
); } @@ -117,18 +122,27 @@ export function Settings({ initialTabIndex }) { const settingsManager = useSettings(); const windowsManager = useWindowsManager(); + const getClassName = (index) => { + const classNames = [styles["Tab-button"]]; + + if (index === tabIndex) + classNames.push(styles["Active-tab"]); + + return classNames.join(" "); + }; + return (
- - - diff --git a/src/components/applications/settings/Settings.module.css b/src/components/applications/settings/Settings.module.css index bccac5b..8c167b8 100644 --- a/src/components/applications/settings/Settings.module.css +++ b/src/components/applications/settings/Settings.module.css @@ -36,8 +36,13 @@ transition: background-color 100ms ease-in-out; } -.Tab-button:hover, .Tab-button:focus-visible { - background-color: rgba(255, 255, 255, 10%); +.Tab-button.Active-tab { + background-color: var(--background-color-a); +} + +.Tab-button:not(.Active-tab):hover, +.Tab-button:not(.Active-tab):focus-visible { + background-color: hsla(var(--background-color-a-hsl), 50%); } .Tab-button > svg { @@ -52,7 +57,6 @@ .Tab-panel { flex: 1; display: flex; - flex-wrap: wrap; flex-direction: column; align-content: flex-start; height: 100%; @@ -66,7 +70,7 @@ align-items: flex-start; justify-content: flex-start; text-align: start; - max-width: 100%; + width: 100%; } .Option > .Label { @@ -107,6 +111,17 @@ cursor: pointer; } +.Button-group { + display: flex; + gap: 1rem; + flex-wrap: wrap; + margin-bottom: 0.75rem; +} + +.Button-group .Button { + margin-bottom: 0; +} + .Button { --hover-color: var(--background-color-b); @@ -132,6 +147,17 @@ background-color: var(--red-a); } +.Progress-bar-container { + width: 100%; + max-width: 35rem; +} + .Progress-bar { - width: 15rem; + width: 100% !important; +} + +.Progress-bar-labels { + display: flex; + justify-content: space-between; + width: 100%; } \ No newline at end of file diff --git a/src/components/modals/context-menu/ContextMenu.module.css b/src/components/modals/context-menu/ContextMenu.module.css index 1f0f09e..14da256 100644 --- a/src/components/modals/context-menu/ContextMenu.module.css +++ b/src/components/modals/context-menu/ContextMenu.module.css @@ -21,7 +21,7 @@ } .Button:hover, .Button:focus-visible { - background-color: rgba(255, 255, 255, 5%); + background-color: hsla(var(--background-color-a-hsl), 75%); } .Label, .Shortcut { diff --git a/src/components/utils/DropdownButton.module.css b/src/components/utils/DropdownButton.module.css index e4eb245..c884fac 100644 --- a/src/components/utils/DropdownButton.module.css +++ b/src/components/utils/DropdownButton.module.css @@ -48,7 +48,7 @@ } .Dropdown > button:hover, .Dropdown > button:focus-visible { - background-color: rgba(255, 255, 255, 5%); + background-color: hsla(var(--background-color-a-hsl), 75%); } .Dropdown > button > p { diff --git a/src/components/utils/ProgressBar.module.css b/src/components/utils/ProgressBar.module.css index 490ed15..4b37aaf 100644 --- a/src/components/utils/ProgressBar.module.css +++ b/src/components/utils/ProgressBar.module.css @@ -1,6 +1,7 @@ .Container { position: relative; - width: 100%; + width: 15rem; + max-width: 100%; min-height: 2rem; max-height: 100%; background-color: var(--background-color-d); @@ -13,6 +14,7 @@ left: 0; top: 0; width: var(--fill); + min-width: 1px; height: 100%; background-color: var(--blue-a); } \ No newline at end of file diff --git a/src/styles/global.css b/src/styles/global.css index bf8a3ff..fa0076d 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -7,7 +7,7 @@ --yellow-b: #ff9f43; --red-a: #ff6b6b; --red-b: #ee5253; - --light-blue-a: #ee5253; + --light-blue-a: #48dbfb; --light-blue-b: #0abde3; --green-a: #1dd1a1; --green-b: #10ac84; @@ -36,6 +36,8 @@ --background-color-c: var(--dark-grey-d); --background-color-d: var(--dark-grey-e); + --background-color-a-hsl: 212, 29%, 19%; + --scrollbar-color: hsla(211, 29%, 40%, 25%); --window-shadow-size: 0.3rem;