Feat: Add responsive workspace shell
This commit is contained in:
@@ -4,12 +4,12 @@ import type { Component } from "solid-js";
|
||||
import {
|
||||
Bell,
|
||||
CircleHelp,
|
||||
FileText,
|
||||
Folder,
|
||||
Home,
|
||||
Keyboard,
|
||||
LayoutGrid,
|
||||
LogOut,
|
||||
Plus,
|
||||
Repeat,
|
||||
Search,
|
||||
Settings,
|
||||
@@ -82,6 +82,16 @@ export type SidebarItem = {
|
||||
meta?: string;
|
||||
};
|
||||
|
||||
export type WorkspaceTreeNode = {
|
||||
id: string;
|
||||
label: string;
|
||||
kind: "folder" | "board" | "doc";
|
||||
icon: ShellIcon;
|
||||
active?: boolean;
|
||||
meta?: string;
|
||||
children?: readonly WorkspaceTreeNode[];
|
||||
};
|
||||
|
||||
export type SidebarHeaderAction = {
|
||||
id: string;
|
||||
label: string;
|
||||
@@ -94,6 +104,13 @@ export type TopBarAction = {
|
||||
icon: ShellIcon;
|
||||
};
|
||||
|
||||
export type MobileBottomNavItem = {
|
||||
id: string;
|
||||
label: string;
|
||||
icon: ShellIcon;
|
||||
active?: boolean;
|
||||
};
|
||||
|
||||
export type NotificationItem = {
|
||||
id: string;
|
||||
title: string;
|
||||
@@ -172,17 +189,55 @@ export const departmentItems: readonly DepartmentItem[] = [
|
||||
] as const;
|
||||
|
||||
// Sidebar and topbar scaffold data
|
||||
export const serverSidebarItems: readonly SidebarItem[] = [
|
||||
// These static entries stay pinned in both desktop and mobile workspace navigation.
|
||||
export const workspaceStaticItems: readonly SidebarItem[] = [
|
||||
{ id: "home", label: "Home", icon: Home, active: true },
|
||||
{ id: "boards", label: "Boards", icon: LayoutGrid, meta: "0" },
|
||||
{ id: "docs", label: "Docs", icon: Folder, meta: "0" },
|
||||
{ id: "settings", label: "Settings", icon: Settings },
|
||||
{ id: "workspace-settings", label: "Settings", icon: Settings },
|
||||
] as const;
|
||||
|
||||
// Freeform workspace tree scaffold: folders, boards, and docs are first-class siblings.
|
||||
export const workspaceTree: readonly WorkspaceTreeNode[] = [
|
||||
{
|
||||
id: "product-workspace",
|
||||
label: "Product",
|
||||
kind: "folder",
|
||||
icon: Folder,
|
||||
children: [
|
||||
{ id: "roadmap-board", label: "Roadmap", kind: "board", icon: LayoutGrid, active: true },
|
||||
{ id: "launch-brief", label: "Launch Brief", kind: "doc", icon: FileText },
|
||||
{
|
||||
id: "research-folder",
|
||||
label: "Research",
|
||||
kind: "folder",
|
||||
icon: Folder,
|
||||
children: [
|
||||
{ id: "interviews-doc", label: "Interviews", kind: "doc", icon: FileText },
|
||||
{ id: "signals-board", label: "Signals", kind: "board", icon: LayoutGrid, meta: "2" },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "design-folder",
|
||||
label: "Design",
|
||||
kind: "folder",
|
||||
icon: Folder,
|
||||
children: [
|
||||
{ id: "system-doc", label: "Design System", kind: "doc", icon: FileText },
|
||||
{ id: "review-board", label: "Review Queue", kind: "board", icon: LayoutGrid },
|
||||
],
|
||||
},
|
||||
{ id: "general-notes", label: "General Notes", kind: "doc", icon: FileText },
|
||||
] as const;
|
||||
|
||||
export const workspaceSidebarHeaderActions: readonly SidebarHeaderAction[] = [
|
||||
{ id: "workspace-settings", label: "Workspace settings", icon: Settings },
|
||||
{ id: "search-workspace", label: "Search workspace", icon: Search },
|
||||
{ id: "create-board", label: "Create board", icon: Plus },
|
||||
] as const;
|
||||
|
||||
export const mobileBottomNavItems: readonly MobileBottomNavItem[] = [
|
||||
{ id: "home", label: "Home", icon: Home, active: true },
|
||||
{ id: "search", label: "Search", icon: Search },
|
||||
{ id: "browse", label: "Browse", icon: Folder },
|
||||
] as const;
|
||||
|
||||
export const topBarActions: readonly TopBarAction[] = [
|
||||
|
||||
Reference in New Issue
Block a user