Skip to content

Commit 1f49665

Browse files
authored
Merge pull request #42 from odefun/ode_1770388186.206729
fix: restore local-setting layout polish and anchor agent route
2 parents 8b2a232 + 7e56e1a commit 1f49665

File tree

1 file changed

+33
-5
lines changed

1 file changed

+33
-5
lines changed

packages/web-ui/src/routes/local-setting/+page.svelte

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
};
2020
2121
export let data: { config: DashboardConfig } | undefined;
22+
export let initialSection: "profile" | "agent" | "slack" = "profile";
23+
export let initialSlug: string | null = null;
2224
2325
let config: DashboardConfig = data?.config ?? defaultDashboardConfig;
2426
let opencodeModelsText = "";
@@ -28,7 +30,12 @@
2830
let isCheckingCli = false;
2931
let message = "";
3032
let cliCheckResult: CliCheckResult | null = null;
31-
let pathname = "/local-setting";
33+
let pathname =
34+
initialSection === "agent"
35+
? "/local-setting/agent"
36+
: initialSection === "slack"
37+
? `/local-setting/slack-bot/${initialSlug ?? ""}`
38+
: "/local-setting/profile";
3239
let activeSection: "profile" | "agent" | "slack" = "profile";
3340
let enabledProviders: AgentProvider[] = ["opencode", "claudecode"];
3441
let selectedWorkspace: DashboardConfig["workspaces"][number] | null = null;
@@ -481,7 +488,7 @@
481488
482489
.container {
483490
width: 100%;
484-
max-width: 1000px;
491+
max-width: 1080px;
485492
margin: 0 auto;
486493
padding: 24px;
487494
box-sizing: border-box;
@@ -497,6 +504,7 @@
497504
background: var(--card);
498505
border-radius: 8px;
499506
margin-bottom: 16px;
507+
box-shadow: var(--shadow-soft);
500508
}
501509
502510
.navbar-title {
@@ -514,7 +522,7 @@
514522
.layout {
515523
display: grid;
516524
grid-template-columns: 260px minmax(0, 1fr);
517-
gap: 16px;
525+
gap: 18px;
518526
}
519527
520528
.card {
@@ -523,12 +531,16 @@
523531
padding: 16px;
524532
background: var(--card);
525533
box-shadow: var(--shadow-soft);
534+
display: grid;
535+
gap: 10px;
526536
}
527537
528538
.sidebar {
529539
display: grid;
530540
gap: 8px;
531541
align-self: start;
542+
position: sticky;
543+
top: 24px;
532544
}
533545
534546
.workspace-group {
@@ -554,6 +566,12 @@
554566
background: var(--bg);
555567
color: var(--ink);
556568
cursor: pointer;
569+
transition: border-color 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
570+
}
571+
572+
.nav-item:hover {
573+
border-color: var(--accent-muted);
574+
transform: translateY(-1px);
557575
}
558576
559577
.nav-item.active {
@@ -563,7 +581,7 @@
563581
564582
.content {
565583
display: grid;
566-
gap: 12px;
584+
gap: 14px;
567585
}
568586
569587
.content :global(h2) {
@@ -584,7 +602,7 @@
584602
justify-content: space-between;
585603
align-items: center;
586604
gap: 8px;
587-
margin-bottom: 8px;
605+
margin-bottom: 10px;
588606
}
589607
590608
.options-row {
@@ -715,6 +733,12 @@
715733
716734
button {
717735
cursor: pointer;
736+
transition: border-color 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
737+
}
738+
739+
button:hover:not(:disabled) {
740+
border-color: var(--accent-muted);
741+
transform: translateY(-1px);
718742
}
719743
720744
.actions {
@@ -733,6 +757,10 @@
733757
.layout {
734758
grid-template-columns: 1fr;
735759
}
760+
761+
.sidebar {
762+
position: static;
763+
}
736764
}
737765
738766
@media (max-width: 768px) {

0 commit comments

Comments
 (0)