diff --git a/Cargo.lock b/Cargo.lock index 7b183f28d..9801f9885 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4338,6 +4338,7 @@ dependencies = [ "objc", "once_cell", "open", + "os_info", "percent-encoding", "rand 0.8.5", "raw-window-handle", diff --git a/theseus_gui/src-tauri/Cargo.toml b/theseus_gui/src-tauri/Cargo.toml index c14010561..253a91e90 100644 --- a/theseus_gui/src-tauri/Cargo.toml +++ b/theseus_gui/src-tauri/Cargo.toml @@ -18,7 +18,7 @@ theseus = { path = "../../theseus", features = ["tauri"] } serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } -tauri = { version = "1.3", features = ["devtools", "dialog", "dialog-open", "protocol-asset", "shell-open", "updater", "window-close", "window-create"] } +tauri = { version = "1.3", features = ["devtools", "dialog", "dialog-open", "macos-private-api", "os-all", "protocol-asset", "shell-open", "updater", "window-close", "window-create", "window-hide", "window-maximize", "window-minimize", "window-set-decorations", "window-show", "window-start-dragging", "window-unmaximize", "window-unminimize"] } tauri-plugin-single-instance = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" } tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" } tokio = { version = "1", features = ["full"] } diff --git a/theseus_gui/src-tauri/src/main.rs b/theseus_gui/src-tauri/src/main.rs index 2c410f424..880f63d59 100644 --- a/theseus_gui/src-tauri/src/main.rs +++ b/theseus_gui/src-tauri/src/main.rs @@ -74,6 +74,15 @@ fn main() { })) .plugin(tauri_plugin_window_state::Builder::default().build()); + #[cfg(not(target_os = "macos"))] + { + builder = builder.setup(|app| { + let win = app.get_window("main").unwrap(); + win.set_decorations(false); + Ok(()) + }) + } + #[cfg(target_os = "macos")] { builder = builder @@ -81,14 +90,14 @@ fn main() { use api::window_ext::WindowExt; let win = app.get_window("main").unwrap(); win.set_transparent_titlebar(true); - win.position_traffic_lights(0.0, 0.0); + win.position_traffic_lights(9.0, 16.0); Ok(()) }) .on_window_event(|e| { use api::window_ext::WindowExt; if let WindowEvent::Resized(..) = e.event() { let win = e.window(); - win.position_traffic_lights(0., 0.); + win.position_traffic_lights(9.0, 16.0); } }) } diff --git a/theseus_gui/src-tauri/tauri.conf.json b/theseus_gui/src-tauri/tauri.conf.json index 047f59a55..76c020741 100644 --- a/theseus_gui/src-tauri/tauri.conf.json +++ b/theseus_gui/src-tauri/tauri.conf.json @@ -28,9 +28,21 @@ }, "window": { "create": true, - "close": true + "close": true, + "hide": true, + "show": true, + "maximize": true, + "minimize": true, + "unmaximize": true, + "unminimize": true, + "startDragging": true, + "setDecorations": true + }, + "os": { + "all": true } }, + "macOSPrivateApi": true, "bundle": { "active": true, "category": "Entertainment", @@ -74,6 +86,8 @@ }, "windows": [ { + "titleBarStyle": "Overlay", + "hiddenTitle": true, "fullscreen": false, "height": 650, "resizable": true, diff --git a/theseus_gui/src/App.vue b/theseus_gui/src/App.vue index ef4888e23..08b8ffc61 100644 --- a/theseus_gui/src/App.vue +++ b/theseus_gui/src/App.vue @@ -1,5 +1,5 @@ diff --git a/theseus_gui/src/components/ui/AccountsCard.vue b/theseus_gui/src/components/ui/AccountsCard.vue index 0ec2d552b..cb48e2bc3 100644 --- a/theseus_gui/src/components/ui/AccountsCard.vue +++ b/theseus_gui/src/components/ui/AccountsCard.vue @@ -272,13 +272,13 @@ onBeforeUnmount(() => { align-items: center; gap: 0.5rem; color: var(--color-base); - background-color: var(--color-bg); + background-color: var(--color-raised-bg); border-radius: var(--radius-md); - box-shadow: none; width: 100%; text-align: left; &.expanded { + border: 1px solid var(--color-button-bg); padding: 1rem; } } diff --git a/theseus_gui/src/components/ui/Instance.vue b/theseus_gui/src/components/ui/Instance.vue index d30b24553..5627af754 100644 --- a/theseus_gui/src/components/ui/Instance.vue +++ b/theseus_gui/src/components/ui/Instance.vue @@ -250,27 +250,7 @@ onUnmounted(() => unlisten()) &:hover { .cta { opacity: 1; - bottom: 4.75rem; - } - - .instance-card-item { - background: hsl(220, 11%, 11%) !important; - } - } -} - -.light-mode { - .instance:hover { - .instance-card-item { - background: hsl(0, 0%, 91%) !important; - } - } - - .instance-card-item { - background: hsl(0, 0%, 100%) !important; - - &:hover { - background: hsl(0, 0%, 91%) !important; + bottom: calc(var(--gap-md) + 4.25rem); } } } @@ -280,14 +260,14 @@ onUnmounted(() => unlisten()) display: flex; align-items: center; justify-content: center; - border-radius: var(--radius-lg); + border-radius: var(--radius-md); z-index: 1; width: 3rem; height: 3rem; - right: 1.25rem; - bottom: 4.25rem; + right: calc(var(--gap-md) * 2); + bottom: 3.25rem; opacity: 0; - transition: 0.2s ease-in-out bottom, 0.1s ease-in-out opacity, 0.1s ease-in-out filter !important; + transition: 0.2s ease-in-out bottom, 0.2s ease-in-out opacity, 0.1s ease-in-out filter !important; cursor: pointer; box-shadow: var(--shadow-floating); @@ -321,17 +301,11 @@ onUnmounted(() => unlisten()) align-items: center; justify-content: center; cursor: pointer; - padding: 0.75rem !important; /* overrides card class */ + padding: var(--gap-md); transition: 0.1s ease-in-out all !important; /* overrides Omorphia defaults */ - background: hsl(220, 11%, 17%) !important; margin-bottom: 0; - &:hover { - filter: brightness(1) !important; - background: hsl(220, 11%, 11%) !important; - } - - > .avatar { + .mod-image { --size: 100%; width: 100% !important; diff --git a/theseus_gui/src/components/ui/ProjectCard.vue b/theseus_gui/src/components/ui/ProjectCard.vue new file mode 100644 index 000000000..6fd7fe6ae --- /dev/null +++ b/theseus_gui/src/components/ui/ProjectCard.vue @@ -0,0 +1,289 @@ + + + + + diff --git a/theseus_gui/src/components/ui/RunningAppBar.vue b/theseus_gui/src/components/ui/RunningAppBar.vue index 716d64daa..ea40874fa 100644 --- a/theseus_gui/src/components/ui/RunningAppBar.vue +++ b/theseus_gui/src/components/ui/RunningAppBar.vue @@ -1,45 +1,47 @@