Skip to content

Commit 686d6f8

Browse files
Refactor AppLayout component for improved structure and styling; update dark theme colors and descriptions; increment version to 0.1.9 in Cargo files and tauri configuration; add window permissions for title setting and dragging.
1 parent 7e71b2c commit 686d6f8

File tree

6 files changed

+57
-37
lines changed

6 files changed

+57
-37
lines changed

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mtarsier"
3-
version = "0.1.5"
3+
version = "0.1.9"
44
description = "mTarsier - Desktop app for managing MCP servers"
55
authors = ["mTarsier"]
66
license = ""

src-tauri/capabilities/default.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
],
88
"permissions": [
99
"core:default",
10+
"core:window:allow-start-dragging",
11+
"core:window:allow-set-title",
1012
"shell:allow-open",
1113
"dialog:allow-open",
1214
"dialog:allow-save"

src-tauri/tauri.conf.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
33
"productName": "mTarsier",
4-
"version": "0.1.5",
4+
"version": "0.1.9",
55
"identifier": "com.mtarsier",
66
"build": {
77
"frontendDist": "../dist",
@@ -19,7 +19,9 @@
1919
"minWidth": 900,
2020
"minHeight": 600,
2121
"resizable": true,
22-
"fullscreen": false
22+
"fullscreen": false,
23+
"titleBarStyle": "Overlay",
24+
"acceptFirstMouse": true
2325
}
2426
],
2527
"security": {

src/layouts/AppLayout.tsx

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useEffect } from "react";
1+
import React, { useEffect } from "react";
22
import { Outlet } from "react-router-dom";
33
import { getCurrentWindow } from "@tauri-apps/api/window";
44
import Sidebar from "../components/Sidebar";
@@ -10,6 +10,10 @@ function AppLayout() {
1010

1111
const detectAll = useClientStore((s) => s.detectAll);
1212

13+
useEffect(() => {
14+
getCurrentWindow().setTitle("");
15+
}, []);
16+
1317
useEffect(() => {
1418
let debounceTimer: ReturnType<typeof setTimeout> | null = null;
1519

@@ -30,12 +34,24 @@ function AppLayout() {
3034
}, [detectAll]);
3135

3236
return (
33-
<div className="h-screen w-screen overflow-hidden p-2">
34-
<div className="flex h-full w-full overflow-hidden rounded-xl border border-border bg-base">
35-
<Sidebar />
36-
<main className="relative flex-1 min-w-0 overflow-y-auto">
37-
<Outlet />
38-
</main>
37+
<div className="h-screen w-screen overflow-hidden flex flex-col">
38+
<div
39+
data-tauri-drag-region
40+
className="h-8 w-full flex-shrink-0 flex items-center justify-center"
41+
style={{ WebkitAppRegion: "drag" } as React.CSSProperties}
42+
>
43+
<span
44+
className="text-text-muted select-none pointer-events-none"
45+
style={{ fontFamily: "-apple-system, BlinkMacSystemFont, sans-serif", fontSize: "13px", fontWeight: 800 }}
46+
>mTarsier</span>
47+
</div>
48+
<div className="flex-1 px-2 pb-2 overflow-hidden">
49+
<div className="flex h-full w-full overflow-hidden rounded-xl border border-border bg-base">
50+
<Sidebar />
51+
<main className="relative flex-1 min-w-0 overflow-y-auto">
52+
<Outlet />
53+
</main>
54+
</div>
3955
</div>
4056
</div>
4157
);

src/lib/themes.ts

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -78,37 +78,37 @@ export const themes: Record<ThemeId, ThemeDefinition> = {
7878
dark: {
7979
id: "dark",
8080
name: "Midnight",
81-
description: "Pure dark theme with blue accent",
81+
description: "Dark theme with blue accent",
8282
colors: {
83-
base: "#09090b",
84-
"base-light": "#111113",
85-
"base-lighter": "#1a1a1e",
86-
primary: "#6366f1",
87-
"primary-dim": "#4f46e5",
88-
cyan: "#22d3ee",
89-
amber: "#f59e0b",
83+
base: "#0d1117",
84+
"base-light": "#161b22",
85+
"base-lighter": "#21262d",
86+
primary: "#60a5fa",
87+
"primary-dim": "#3b82f6",
88+
cyan: "#38bdf8",
89+
amber: "#f5a623",
9090
purple: "#a78bfa",
91-
surface: "#131316",
92-
"surface-hover": "#1c1c21",
93-
"surface-overlay": "#1a1a1e",
94-
border: "#2e2e33",
95-
"border-hover": "#4a4a52",
96-
text: "#e4e4e7",
97-
"text-muted": "#71717a",
91+
surface: "#161b22",
92+
"surface-hover": "#21262d",
93+
"surface-overlay": "#2d333b",
94+
border: "#30363d",
95+
"border-hover": "#484f58",
96+
text: "#e6edf3",
97+
"text-muted": "#7d8590",
9898
},
9999
monaco: {
100100
base: "vs-dark",
101-
background: "#131316",
102-
foreground: "#e4e4e7",
103-
lineHighlight: "#1c1c2122",
104-
selection: "#6366f130",
105-
cursor: "#6366f1",
106-
lineNumber: "#71717a",
107-
lineNumberActive: "#6366f1",
108-
widgetBg: "#111113",
109-
widgetBorder: "#27272a",
110-
scrollbar: "#27272a66",
111-
scrollbarHover: "#27272aaa",
101+
background: "#161b22",
102+
foreground: "#e6edf3",
103+
lineHighlight: "#21262d44",
104+
selection: "#60a5fa25",
105+
cursor: "#60a5fa",
106+
lineNumber: "#7d8590",
107+
lineNumberActive: "#e6edf3",
108+
widgetBg: "#0d1117",
109+
widgetBorder: "#30363d",
110+
scrollbar: "#30363d66",
111+
scrollbarHover: "#30363daa",
112112
},
113113
},
114114

0 commit comments

Comments
 (0)