Files
sigma/web/components.json
Tosone 959b2f2ee6 feat(web): polish layout, sidebar, tables and utils
Follow up the shadcn/ui migration with a round of layout and UX fixes:

- layout: unify the horizontal padding of the page header, page toolbars,
  table headers/cells and pagination on `px-4`, so titles, search boxes and
  the first/last table columns share one left/right baseline while the table
  itself stays full width.
- sidebar: stop the SidebarProvider wrapper (`w-full`) from squeezing the
  page content, enlarge the menu rows, lighten the active background through
  a new `--sidebar-active` token, drop the bold active label, and always show
  a pointer cursor for buttons and menu items.
- user menu: fold API docs, theme and language into the bottom dropdown,
  persist username/email on login, callback and token refresh, fall back to
  "sigma" when no username is known, and expose a Login entry for guests.
- tables: replace the row action dropdown with inline update/delete icon
  buttons (delete in red), right align the Action column, only render sort
  arrows for the active sort, keep namespace/repository names readable on
  hover, and render created/updated columns as relative times.
- components: add `RelativeTime` (dayjs relativeTime + tooltip) and the
  `Field`/`FieldLabel` primitives, rebuild the login page on top of them,
  and bump the shared button/input/select/toggle/tabs presets to h-9.
- home: lay the summary cards out in a responsive grid instead of a fixed
  1600px wide row that overflowed the viewport.
- utils: merge the short helper modules into `utils/index.ts` (trimHTTP,
  calcUnit, Regex, Tooltip) and `utils/request.ts` (axios interceptors plus
  token refresh), leaving only index/request/distros.

Verification:
- `npx tsc --noEmit`
- `npx vite build`
2026-09-16 22:41:24 +08:00

26 lines
533 B
JSON

{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.cjs",
"css": "src/index.css",
"baseColor": "neutral",
"cssVariables": true,
"prefix": ""
},
"iconLibrary": "lucide",
"rtl": false,
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
},
"menuColor": "default",
"menuAccent": "subtle",
"registries": {}
}