Feat: Replace profile dock with server dock
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
.panel {
|
||||
--server-dock-glyph-size: var(--control-size-md);
|
||||
--server-dock-action-min-height: var(--space-8);
|
||||
--server-dock-border: color-mix(in srgb, var(--color-border-strong) 75%, transparent);
|
||||
--server-dock-surface: color-mix(in srgb, var(--color-surface) 94%, transparent);
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
display: grid;
|
||||
gap: var(--space-2);
|
||||
padding: var(--space-3) var(--space-3) var(--space-2);
|
||||
border: 1px solid var(--server-dock-border);
|
||||
border-radius: calc(var(--radius-xl) + var(--space-1));
|
||||
background: var(--server-dock-surface);
|
||||
box-shadow:
|
||||
0 20px 48px color-mix(in srgb, black 16%, transparent),
|
||||
var(--shadow-strong);
|
||||
backdrop-filter: blur(var(--blur-overlay));
|
||||
}
|
||||
|
||||
.identity {
|
||||
display: grid;
|
||||
grid-template-columns: auto minmax(0, 1fr);
|
||||
gap: var(--space-3);
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.glyph {
|
||||
width: var(--server-dock-glyph-size);
|
||||
height: var(--server-dock-glyph-size);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: var(--radius-lg);
|
||||
background: color-mix(in srgb, var(--color-accent-soft) 84%, transparent);
|
||||
color: var(--color-accent-strong);
|
||||
@include text-label;
|
||||
}
|
||||
|
||||
.copy {
|
||||
min-width: 0;
|
||||
display: grid;
|
||||
gap: 0.15rem;
|
||||
}
|
||||
|
||||
.name {
|
||||
@include text-label;
|
||||
}
|
||||
|
||||
.status,
|
||||
.subtitle {
|
||||
@include text-caption;
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
.status {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: var(--space-1);
|
||||
}
|
||||
|
||||
.statusDot {
|
||||
width: 0.45rem;
|
||||
height: 0.45rem;
|
||||
flex: 0 0 auto;
|
||||
border-radius: 999px;
|
||||
background: var(--color-success);
|
||||
box-shadow: 0 0 0 0.1rem color-mix(in srgb, var(--color-success) 18%, transparent);
|
||||
}
|
||||
|
||||
.actions {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: var(--space-2);
|
||||
}
|
||||
|
||||
.action {
|
||||
min-height: var(--server-dock-action-min-height);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: var(--space-1);
|
||||
@include interactive-frame(var(--color-surface-muted));
|
||||
@include interactive-frame-hover();
|
||||
}
|
||||
|
||||
.actionLabel {
|
||||
@include text-caption;
|
||||
}
|
||||
46
Frontend/src/components/shell/ServerDock/ServerDock.tsx
Normal file
46
Frontend/src/components/shell/ServerDock/ServerDock.tsx
Normal file
@@ -0,0 +1,46 @@
|
||||
// Path: Frontend/src/components/shell/ServerDock/ServerDock.tsx
|
||||
|
||||
import { For, Show, type JSX } from "solid-js";
|
||||
import { activeServer } from "../data/shell.data";
|
||||
import styles from "./ServerDock.module.scss";
|
||||
|
||||
export const ServerDock = (): JSX.Element => {
|
||||
return (
|
||||
<section class={styles.panel} aria-label="Server dock">
|
||||
<div class={styles.identity}>
|
||||
<div class={styles.glyph} aria-hidden="true">
|
||||
{activeServer.abbreviation}
|
||||
</div>
|
||||
<div class={styles.copy}>
|
||||
<span class={styles.name}>{activeServer.name}</span>
|
||||
<Show
|
||||
when={activeServer.kind === "organization"}
|
||||
fallback={<span class={styles.subtitle}>{activeServer.subtitle}</span>}
|
||||
>
|
||||
<span class={styles.status}>
|
||||
<span class={styles.statusDot} aria-hidden="true" />
|
||||
<span>{activeServer.connectedLabel}</span>
|
||||
</span>
|
||||
</Show>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Show when={activeServer.dockActions.length > 0}>
|
||||
<div class={styles.actions}>
|
||||
<For each={activeServer.dockActions}>
|
||||
{(item): JSX.Element => {
|
||||
const Icon = item.icon;
|
||||
|
||||
return (
|
||||
<button type="button" class={styles.action} aria-label={item.label} title={item.label}>
|
||||
<Icon size={16} strokeWidth={2} />
|
||||
<span class={styles.actionLabel}>{item.label}</span>
|
||||
</button>
|
||||
);
|
||||
}}
|
||||
</For>
|
||||
</div>
|
||||
</Show>
|
||||
</section>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user