diff options
| author | Frank <[email protected]> | 2025-10-10 00:56:16 -0400 |
|---|---|---|
| committer | Frank <[email protected]> | 2025-10-10 00:56:16 -0400 |
| commit | ad7b4b1fcd4b2c863d188ad7b20ccb246fe98d93 (patch) | |
| tree | df775697e13a259d731f5c8db8aa53f492ed1282 /packages/console/app/src | |
| parent | 03d50894360ddaf5d8dae990f3bf484b553de223 (diff) | |
| download | opencode-ad7b4b1fcd4b2c863d188ad7b20ccb246fe98d93.tar.gz opencode-ad7b4b1fcd4b2c863d188ad7b20ccb246fe98d93.zip | |
wip: zen style nav bar
Diffstat (limited to 'packages/console/app/src')
6 files changed, 117 insertions, 71 deletions
diff --git a/packages/console/app/src/component/icon.tsx b/packages/console/app/src/component/icon.tsx index bb3c62da9..4d3865c87 100644 --- a/packages/console/app/src/component/icon.tsx +++ b/packages/console/app/src/component/icon.tsx @@ -2,41 +2,68 @@ import { JSX } from "solid-js" export function IconLogo(props: JSX.SvgSVGAttributes<SVGSVGElement>) { return ( - <svg {...props} width="234" height="42" viewBox="0 0 234 42" fill="none" xmlns="http://www.w3.org/2000/svg"> - <path - fill-rule="evenodd" - clip-rule="evenodd" - d="M54 36H36V42H30V6H54V36ZM36 30H48V12H36V30Z" - fill="currentColor" - /> - <path fill-rule="evenodd" clip-rule="evenodd" d="M24 36H0V6H24V36ZM6 30H18V12H6V30Z" fill="currentColor" /> - <path - fill-rule="evenodd" - clip-rule="evenodd" - d="M84 24H66V30H84V36H60V6H84V24ZM66 18H78V12H66V18Z" - fill="currentColor" - /> - <path d="M108 12H96V36H90V6H108V12Z" fill="currentColor" /> - <path d="M114 36H108V12H114V36Z" fill="currentColor" /> - <path d="M144 12H126V30H144V36H120V6H144V12Z" fill="currentColor" /> - <path - fill-rule="evenodd" - clip-rule="evenodd" - d="M174 36H150V6H174V36ZM156 30H168V12H156V30Z" - fill="currentColor" - /> - <path - fill-rule="evenodd" - clip-rule="evenodd" - d="M204 36H180V6H198V0H204V36ZM186 30H198V12H186V30Z" - fill="currentColor" - /> - <path - fill-rule="evenodd" - clip-rule="evenodd" - d="M234 24H216V30H234V36H210V6H234V24ZM216 18H228V12H216V18Z" + <svg width="64" height="32" viewBox="0 0 64 32" fill="none" xmlns="http://www.w3.org/2000/svg"> + <path d="M0 9.14333V4.5719H4.57143V9.14333H0Z" fill="currentColor" /> + <path d="M4.57178 9.14333V4.5719H9.14321V9.14333H4.57178Z" fill="currentColor" /> + <path d="M9.1438 9.14333V4.5719H13.7152V9.14333H9.1438Z" fill="currentColor" /> + <path d="M13.7124 9.14333V4.5719H18.2838V9.14333H13.7124Z" fill="currentColor" /> + <path d="M13.7124 13.7136V9.14221H18.2838V13.7136H13.7124Z" fill="currentColor" /> + <path d="M0 18.2857V13.7142H4.57143V18.2857H0Z" fill="currentColor" fill-opacity="0.2" /> + <rect width="4.57143" height="4.57143" transform="translate(4.57178 13.7141)" fill="currentColor" /> + <path d="M4.57178 18.2855V13.7141H9.14321V18.2855H4.57178Z" fill="currentColor" fill-opacity="0.2" /> + <path d="M9.1438 18.2855V13.7141H13.7152V18.2855H9.1438Z" fill="currentColor" /> + <path d="M13.7156 18.2855V13.7141H18.287V18.2855H13.7156Z" fill="currentColor" fill-opacity="0.2" /> + <rect width="4.57143" height="4.57143" transform="translate(0 18.2859)" fill="currentColor" /> + <path d="M0 22.8572V18.2858H4.57143V22.8572H0Z" fill="currentColor" fill-opacity="0.2" /> + <rect + width="4.57143" + height="4.57143" + transform="translate(4.57178 18.2859)" fill="currentColor" + fill-opacity="0.2" /> + <path d="M4.57178 22.8573V18.2859H9.14321V22.8573H4.57178Z" fill="currentColor" /> + <path d="M9.1438 22.8573V18.2859H13.7152V22.8573H9.1438Z" fill="currentColor" fill-opacity="0.2" /> + <path d="M13.7156 22.8573V18.2859H18.287V22.8573H13.7156Z" fill="currentColor" fill-opacity="0.2" /> + <path d="M0 27.4292V22.8578H4.57143V27.4292H0Z" fill="currentColor" /> + <path d="M4.57178 27.4292V22.8578H9.14321V27.4292H4.57178Z" fill="currentColor" /> + <path d="M9.1438 27.4276V22.8562H13.7152V27.4276H9.1438Z" fill="currentColor" /> + <path d="M13.7124 27.4292V22.8578H18.2838V27.4292H13.7124Z" fill="currentColor" /> + <path d="M22.8572 9.14333V4.5719H27.4286V9.14333H22.8572Z" fill="currentColor" /> + <path d="M27.426 9.14333V4.5719H31.9975V9.14333H27.426Z" fill="currentColor" /> + <path d="M32.001 9.14333V4.5719H36.5724V9.14333H32.001Z" fill="currentColor" /> + <path d="M36.5698 9.14333V4.5719H41.1413V9.14333H36.5698Z" fill="currentColor" /> + <path d="M22.8572 13.7152V9.1438H27.4286V13.7152H22.8572Z" fill="currentColor" /> + <path d="M36.5698 13.7152V9.1438H41.1413V13.7152H36.5698Z" fill="currentColor" /> + <path d="M22.8572 18.2855V13.7141H27.4286V18.2855H22.8572Z" fill="currentColor" /> + <path d="M27.4292 18.2855V13.7141H32.0006V18.2855H27.4292Z" fill="currentColor" /> + <path d="M32.001 18.2855V13.7141H36.5724V18.2855H32.001Z" fill="currentColor" /> + <path d="M36.5698 18.2855V13.7141H41.1413V18.2855H36.5698Z" fill="currentColor" /> + <path d="M22.8572 22.8573V18.2859H27.4286V22.8573H22.8572Z" fill="currentColor" /> + <path d="M27.4292 22.8573V18.2859H32.0006V22.8573H27.4292Z" fill="currentColor" fill-opacity="0.2" /> + <path d="M32.001 22.8573V18.2859H36.5724V22.8573H32.001Z" fill="currentColor" fill-opacity="0.2" /> + <path d="M36.5698 22.8573V18.2859H41.1413V22.8573H36.5698Z" fill="currentColor" fill-opacity="0.2" /> + <path d="M22.8572 27.4292V22.8578H27.4286V27.4292H22.8572Z" fill="currentColor" /> + <path d="M27.4292 27.4276V22.8562H32.0006V27.4276H27.4292Z" fill="currentColor" /> + <path d="M32.001 27.4276V22.8562H36.5724V27.4276H32.001Z" fill="currentColor" /> + <path d="M36.5698 27.4292V22.8578H41.1413V27.4292H36.5698Z" fill="currentColor" /> + <path d="M45.7144 9.14333V4.5719H50.2858V9.14333H45.7144Z" fill="currentColor" /> + <path d="M50.2861 9.14333V4.5719H54.8576V9.14333H50.2861Z" fill="currentColor" /> + <path d="M54.855 9.14333V4.5719H59.4264V9.14333H54.855Z" fill="currentColor" /> + <path d="M45.7144 13.7136V9.14221H50.2858V13.7136H45.7144Z" fill="currentColor" /> + <path d="M59.4299 13.7152V9.1438H64.0014V13.7152H59.4299Z" fill="currentColor" /> + <path d="M45.7144 18.2855V13.7141H50.2858V18.2855H45.7144Z" fill="currentColor" /> + <path d="M50.2861 18.2857V13.7142H54.8576V18.2857H50.2861Z" fill="currentColor" fill-opacity="0.2" /> + <path d="M54.8579 18.2855V13.7141H59.4293V18.2855H54.8579Z" fill="currentColor" fill-opacity="0.2" /> + <path d="M59.4299 18.2855V13.7141H64.0014V18.2855H59.4299Z" fill="currentColor" /> + <path d="M45.7144 22.8573V18.2859H50.2858V22.8573H45.7144Z" fill="currentColor" /> + <path d="M50.2861 22.8572V18.2858H54.8576V22.8572H50.2861Z" fill="currentColor" fill-opacity="0.2" /> + <path d="M54.8579 22.8573V18.2859H59.4293V22.8573H54.8579Z" fill="currentColor" fill-opacity="0.2" /> + <path d="M59.4299 22.8573V18.2859H64.0014V22.8573H59.4299Z" fill="currentColor" /> + <path d="M45.7144 27.4292V22.8578H50.2858V27.4292H45.7144Z" fill="currentColor" /> + <path d="M50.2861 27.4286V22.8572H54.8576V27.4286H50.2861Z" fill="currentColor" fill-opacity="0.2" /> + <path d="M54.8579 27.4285V22.8571H59.4293V27.4285H54.8579Z" fill="currentColor" fill-opacity="0.2" /> + <path d="M59.4299 27.4292V22.8578H64.0014V27.4292H59.4299Z" fill="currentColor" /> </svg> ) } diff --git a/packages/console/app/src/routes/workspace.tsx b/packages/console/app/src/routes/workspace.tsx index 04e3f2c47..2ac629f52 100644 --- a/packages/console/app/src/routes/workspace.tsx +++ b/packages/console/app/src/routes/workspace.tsx @@ -1,7 +1,7 @@ import { Show } from "solid-js" import { query, createAsync, RouteSectionProps, useParams, A } from "@solidjs/router" import "./workspace.css" -import { IconLogo, IconWorkspaceLogo } from "../component/icon" +import { IconWorkspaceLogo } from "../component/icon" import { WorkspacePicker } from "./workspace-picker" import { UserMenu } from "./user-menu" import { withActor } from "~/context/auth.withActor" diff --git a/packages/console/app/src/routes/workspace/[id].css b/packages/console/app/src/routes/workspace/[id].css index 399d7e737..e21db2c21 100644 --- a/packages/console/app/src/routes/workspace/[id].css +++ b/packages/console/app/src/routes/workspace/[id].css @@ -14,26 +14,42 @@ border-right: 1px solid var(--color-border); padding: var(--space-6) var(--space-4); display: flex; - flex-direction: column; - gap: var(--space-2); - - [data-nav-button] { - padding: var(--space-3) var(--space-4); - border-radius: var(--border-radius-sm); - color: var(--color-text-muted); - text-decoration: none; - font-size: var(--font-size-sm); - font-weight: 500; - transition: all 0.15s ease; - - &:hover { - background-color: var(--color-surface-hover); - color: var(--color-text); - } + justify-content: flex-end; + + [data-component="nav-items"] { + display: flex; + flex-direction: column; + gap: var(--space-2); + + [data-nav-button] { + padding: var(--space-3) var(--space-4); + border-radius: var(--border-radius-sm); + color: var(--color-text-muted); + text-decoration: none; + font-size: var(--font-size-sm); + font-weight: 500; + transition: all 0.15s ease; + + &:hover { + color: var(--color-text); + } + + &.active { + color: var(--color-text); + font-weight: 700; + position: relative; - &.active { - background-color: var(--color-surface-hover); - color: var(--color-text); + &::before { + content: ''; + position: absolute; + left: calc(-1 * var(--space-0-5)); + top: 0; + bottom: 0; + width: 2px; + background-color: var(--color-text); + border-radius: 0 2px 2px 0; + } + } } } } diff --git a/packages/console/app/src/routes/workspace/[id].tsx b/packages/console/app/src/routes/workspace/[id].tsx index 1da24dc32..21f20c70b 100644 --- a/packages/console/app/src/routes/workspace/[id].tsx +++ b/packages/console/app/src/routes/workspace/[id].tsx @@ -10,23 +10,25 @@ export default function WorkspaceLayout(props: RouteSectionProps) { <main data-page="workspace"> <div data-component="workspace-container"> <nav data-component="workspace-nav"> - <A href={`/workspace/${params.id}`} end activeClass="active" data-nav-button> - Zen - </A> - <Show when={userInfo()?.isAdmin}> - <A href={`/workspace/${params.id}/billing`} activeClass="active" data-nav-button> - Billing + <div data-component="nav-items"> + <A href={`/workspace/${params.id}`} end activeClass="active" data-nav-button> + Zen </A> - </Show> - <A href={`/workspace/${params.id}/keys`} activeClass="active" data-nav-button> - API Keys - </A> - <A href={`/workspace/${params.id}/members`} activeClass="active" data-nav-button> - Members - </A> - <A href={`/workspace/${params.id}/settings`} activeClass="active" data-nav-button> - Settings - </A> + <A href={`/workspace/${params.id}/keys`} activeClass="active" data-nav-button> + API Keys + </A> + <A href={`/workspace/${params.id}/members`} activeClass="active" data-nav-button> + Members + </A> + <Show when={userInfo()?.isAdmin}> + <A href={`/workspace/${params.id}/billing`} activeClass="active" data-nav-button> + Billing + </A> + </Show> + <A href={`/workspace/${params.id}/settings`} activeClass="active" data-nav-button> + Settings + </A> + </div> </nav> <div data-component="workspace-content">{props.children}</div> </div> diff --git a/packages/console/app/src/routes/workspace/[id]/index.css b/packages/console/app/src/routes/workspace/[id]/index.css index 5124c78cf..5d7550fbd 100644 --- a/packages/console/app/src/routes/workspace/[id]/index.css +++ b/packages/console/app/src/routes/workspace/[id]/index.css @@ -1,6 +1,6 @@ [data-page="workspace-[id]"] { max-width: 64rem; - padding: var(--space-10) var(--space-4); + padding: var(--space-2) var(--space-4); margin: 0 auto; width: 100%; display: flex; diff --git a/packages/console/app/src/routes/workspace/[id]/index.tsx b/packages/console/app/src/routes/workspace/[id]/index.tsx index 46e6cf74b..a5a8bb469 100644 --- a/packages/console/app/src/routes/workspace/[id]/index.tsx +++ b/packages/console/app/src/routes/workspace/[id]/index.tsx @@ -3,12 +3,13 @@ import { NewUserSection } from "./new-user-section" import { UsageSection } from "./usage-section" import { ModelSection } from "./model-section" import { ProviderSection } from "./provider-section" +import { IconLogo } from "~/component/icon" export default function () { return ( <div data-page="workspace-[id]"> <section data-component="title-section"> - <h1>Zen</h1> + <IconLogo /> <p> Curated list of models provided by opencode.{" "} <a target="_blank" href="/docs/zen"> |
