diff --git a/.prettierrc b/.prettierrc index e07cccc..7d657b8 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,5 +1,5 @@ { - "semi": true, + "semi": false, "singleQuote": true, "trailingComma": "es5", "tabWidth": 2, diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..ba5c57f --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,38 @@ +# Repository Guidelines + +## Project Structure & Module Organization +- Core application lives under `pages/`, with supporting UI atoms in `components/`. +- Shared state and utilities are in `store/`, `composables/`, and `lib/`. +- Configuration lives in `app.config.ts`, `nuxt.config.ts`, and `config/`. +- Tests belong in `tests/`, and static assets in `public/` or `assets/`. + +## Build, Test, and Development Commands +- `pnpm dev` – start the Nuxt development server with hot reload. +- `pnpm build` – create a production build. +- `pnpm preview` – run the production bundle locally. +- `pnpm test:run` – execute the Vitest suite once. +- `pnpm vue-tsc --noEmit` – perform a strict type check. +- `pnpm lint` – run `vue-tsc` and Prettier (format check only). + +## Coding Style & Naming Conventions +- Use Prettier defaults (see `.prettierrc.ts`); run `pnpm lint` or `pnpm lint:fix`. +- Vue files use ` diff --git a/assets/css/overrides.css b/assets/css/overrides.css index 2e056ba..0fc3abd 100644 --- a/assets/css/overrides.css +++ b/assets/css/overrides.css @@ -1,16 +1,4 @@ /* 实现列表头滚动固定 */ -.n-list.sticky-header { - @apply relative; -} - -.n-list.sticky-header .n-list__header { - @apply bg-neutral-900/60 sticky top-0 z-10; -} - -.n-page-header { - @apply flex-wrap flex-col items-start gap-6 lg:flex-row lg:items-center lg:justify-between; -} - input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus, diff --git a/assets/css/tailwind.css b/assets/css/tailwind.css index 961736f..691fe15 100644 --- a/assets/css/tailwind.css +++ b/assets/css/tailwind.css @@ -1,70 +1,168 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; +@import 'tailwindcss'; +@import 'tw-animate-css'; -@layer base { - :root { - --background: 0 0% 100%; - --foreground: 222.2 84% 4.9%; - --card: 0 0% 100%; - --card-foreground: 222.2 84% 4.9%; - --popover: 0 0% 100%; - --popover-foreground: 222.2 84% 4.9%; - --primary: 222.2 47.4% 11.2%; - --primary-foreground: 210 40% 98%; - --secondary: 210 40% 96.1%; - --secondary-foreground: 222.2 47.4% 11.2%; - --muted: 210 40% 96.1%; - --muted-foreground: 215.4 16.3% 46.9%; - --accent: 210 40% 96.1%; - --accent-foreground: 222.2 47.4% 11.2%; - --destructive: 0 84.2% 60.2%; - --destructive-foreground: 210 40% 98%; - --border: 214.3 31.8% 91.4%; - --input: 214.3 31.8% 91.4%; - --ring: 222.2 84% 4.9%; - --radius: 0.5rem; - --chart-1: 12 76% 61%; - --chart-2: 173 58% 39%; - --chart-3: 197 37% 24%; - --chart-4: 43 74% 66%; - --chart-5: 27 87% 67%; +@custom-variant dark (&:is(.dark *)); + +:root { + --background: oklch(1 0 0); + --foreground: oklch(0.145 0 0); + --card: oklch(1 0 0); + --card-foreground: oklch(0.145 0 0); + --popover: oklch(1 0 0); + --popover-foreground: oklch(0.145 0 0); + --primary: oklch(0.205 0 0); + --primary-foreground: oklch(0.985 0 0); + --secondary: oklch(0.97 0 0); + --secondary-foreground: oklch(0.205 0 0); + --muted: oklch(0.97 0 0); + --muted-foreground: oklch(0.556 0 0); + --accent: oklch(0.97 0 0); + --accent-foreground: oklch(0.205 0 0); + --destructive: oklch(0.577 0.245 27.325); + --destructive-foreground: oklch(0.577 0.245 27.325); + --border: oklch(0.922 0 0); + --input: oklch(0.922 0 0); + --ring: oklch(0.708 0 0); + --chart-1: oklch(0.646 0.222 41.116); + --chart-2: oklch(0.6 0.118 184.704); + --chart-3: oklch(0.398 0.07 227.392); + --chart-4: oklch(0.828 0.189 84.429); + --chart-5: oklch(0.769 0.188 70.08); + --radius: 0.3rem; + --sidebar: oklch(0.985 0 0); + --sidebar-foreground: oklch(0.145 0 0); + --sidebar-primary: oklch(0.205 0 0); + --sidebar-primary-foreground: oklch(0.985 0 0); + --sidebar-accent: oklch(0.97 0 0); + --sidebar-accent-foreground: oklch(0.205 0 0); + --sidebar-border: oklch(0.922 0 0); + --sidebar-ring: oklch(0.708 0 0); +} + +.dark { + --background: oklch(0.145 0 0); + --foreground: oklch(0.985 0 0); + --card: oklch(0.145 0 0); + --card-foreground: oklch(0.985 0 0); + --popover: oklch(0.145 0 0); + --popover-foreground: oklch(0.985 0 0); + --primary: oklch(0.985 0 0); + --primary-foreground: oklch(0.205 0 0); + --secondary: oklch(0.269 0 0); + --secondary-foreground: oklch(0.985 0 0); + --muted: oklch(0.269 0 0); + --muted-foreground: oklch(0.708 0 0); + --accent: oklch(0.269 0 0); + --accent-foreground: oklch(0.985 0 0); + --destructive: oklch(0.396 0.141 25.723); + --destructive-foreground: oklch(0.637 0.237 25.331); + --border: oklch(0.269 0 0); + --input: oklch(0.269 0 0); + --ring: oklch(0.439 0 0); + --chart-1: oklch(0.488 0.243 264.376); + --chart-2: oklch(0.696 0.17 162.48); + --chart-3: oklch(0.769 0.188 70.08); + --chart-4: oklch(0.627 0.265 303.9); + --chart-5: oklch(0.645 0.246 16.439); + --sidebar: oklch(0.205 0 0); + --sidebar-foreground: oklch(0.985 0 0); + --sidebar-primary: oklch(0.488 0.243 264.376); + --sidebar-primary-foreground: oklch(0.985 0 0); + --sidebar-accent: oklch(0.269 0 0); + --sidebar-accent-foreground: oklch(0.985 0 0); + --sidebar-border: oklch(0.269 0 0); + --sidebar-ring: oklch(0.439 0 0); +} + +@theme inline { + --color-background: var(--background); + --color-foreground: var(--foreground); + --color-card: var(--card); + --color-card-foreground: var(--card-foreground); + --color-popover: var(--popover); + --color-popover-foreground: var(--popover-foreground); + --color-primary: var(--primary); + --color-primary-foreground: var(--primary-foreground); + --color-secondary: var(--secondary); + --color-secondary-foreground: var(--secondary-foreground); + --color-muted: var(--muted); + --color-muted-foreground: var(--muted-foreground); + --color-accent: var(--accent); + --color-accent-foreground: var(--accent-foreground); + --color-destructive: var(--destructive); + --color-destructive-foreground: var(--destructive-foreground); + --color-border: var(--border); + --color-input: var(--input); + --color-ring: var(--ring); + --color-chart-1: var(--chart-1); + --color-chart-2: var(--chart-2); + --color-chart-3: var(--chart-3); + --color-chart-4: var(--chart-4); + --color-chart-5: var(--chart-5); + --radius-sm: calc(var(--radius) - 4px); + --radius-md: calc(var(--radius) - 2px); + --radius-lg: var(--radius); + --radius-xl: calc(var(--radius) + 4px); + --color-sidebar: var(--sidebar); + --color-sidebar-foreground: var(--sidebar-foreground); + --color-sidebar-primary: var(--sidebar-primary); + --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); + --color-sidebar-accent: var(--sidebar-accent); + --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); + --color-sidebar-border: var(--sidebar-border); + --color-sidebar-ring: var(--sidebar-ring); + + --animate-accordion-down: accordion-down 0.2s ease-out; + --animate-accordion-up: accordion-up 0.2s ease-out; + + @keyframes accordion-down { + from { + height: 0; + } + to { + height: var(--reka-accordion-content-height); + } } - .dark { - --background: 222.2 84% 4.9%; - --foreground: 210 40% 98%; - --card: 222.2 84% 4.9%; - --card-foreground: 210 40% 98%; - --popover: 222.2 84% 4.9%; - --popover-foreground: 210 40% 98%; - --primary: 210 40% 98%; - --primary-foreground: 222.2 47.4% 11.2%; - --secondary: 217.2 32.6% 17.5%; - --secondary-foreground: 210 40% 98%; - --muted: 217.2 32.6% 17.5%; - --muted-foreground: 215 20.2% 65.1%; - --accent: 217.2 32.6% 17.5%; - --accent-foreground: 210 40% 98%; - --destructive: 0 62.8% 30.6%; - --destructive-foreground: 210 40% 98%; - --border: 217.2 32.6% 17.5%; - --input: 217.2 32.6% 17.5%; - --ring: 212.7 26.8% 83.9%; - --chart-1: 220 70% 50%; - --chart-2: 160 60% 45%; - --chart-3: 30 80% 55%; - --chart-4: 280 65% 60%; - --chart-5: 340 75% 55%; + @keyframes accordion-up { + from { + height: var(--reka-accordion-content-height); + } + to { + height: 0; + } } } @layer base { * { - @apply border-border; + @apply border-border outline-ring/50; } - body { @apply bg-background text-foreground; } } + +@layer base { + :root { + --sidebar-background: 0 0% 98%; + --sidebar-foreground: 240 5.3% 26.1%; + --sidebar-primary: 240 5.9% 10%; + --sidebar-primary-foreground: 0 0% 98%; + --sidebar-accent: 240 4.8% 95.9%; + --sidebar-accent-foreground: 240 5.9% 10%; + --sidebar-border: 220 13% 91%; + --sidebar-ring: 217.2 91.2% 59.8%; + } + + .dark { + --sidebar-background: 240 5.9% 10%; + --sidebar-foreground: 240 4.8% 95.9%; + --sidebar-primary: 224.3 76.3% 48%; + --sidebar-primary-foreground: 0 0% 100%; + --sidebar-accent: 240 3.7% 15.9%; + --sidebar-accent-foreground: 240 4.8% 95.9%; + --sidebar-border: 240 3.7% 15.9%; + --sidebar-ring: 217.2 91.2% 59.8%; + } +} diff --git a/auto-imports.d.ts b/auto-imports.d.ts index 37fff4d..3d77eb2 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -6,8 +6,8 @@ // biome-ignore lint: disable export {} declare global { - const useDialog: typeof import('naive-ui')['useDialog'] - const useLoadingBar: typeof import('naive-ui')['useLoadingBar'] - const useMessage: typeof import('naive-ui')['useMessage'] - const useNotification: typeof import('naive-ui')['useNotification'] + const useDialog: typeof import('~/composables/ui')['useDialog'] + const useLoadingBar: typeof import('~/composables/ui')['useLoadingBar'] + const useMessage: typeof import('~/composables/ui')['useMessage'] + const useNotification: typeof import('~/composables/ui')['useNotification'] } diff --git a/components.d.ts b/components.d.ts deleted file mode 100644 index 04201fa..0000000 --- a/components.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* eslint-disable */ -// @ts-nocheck -// Generated by unplugin-vue-components -// Read more: https://github.com/vuejs/core/pull/3399 -export {} - -/* prettier-ignore */ -declare module 'vue' { - export interface GlobalComponents { - NAlert: typeof import('naive-ui')['NAlert'] - NAvatar: typeof import('naive-ui')['NAvatar'] - NBadge: typeof import('naive-ui')['NBadge'] - NButton: typeof import('naive-ui')['NButton'] - NButtonGroup: typeof import('naive-ui')['NButtonGroup'] - NCard: typeof import('naive-ui')['NCard'] - NCarousel: typeof import('naive-ui')['NCarousel'] - NCarouselItem: typeof import('naive-ui')['NCarouselItem'] - NCheckbox: typeof import('naive-ui')['NCheckbox'] - NCheckboxGroup: typeof import('naive-ui')['NCheckboxGroup'] - NCollapse: typeof import('naive-ui')['NCollapse'] - NCollapseItem: typeof import('naive-ui')['NCollapseItem'] - NConfigProvider: typeof import('naive-ui')['NConfigProvider'] - NDataTable: typeof import('naive-ui')['NDataTable'] - NDatePicker: typeof import('naive-ui')['NDatePicker'] - NDescriptions: typeof import('naive-ui')['NDescriptions'] - NDescriptionsItem: typeof import('naive-ui')['NDescriptionsItem'] - NDialogProvider: typeof import('naive-ui')['NDialogProvider'] - NDrawer: typeof import('naive-ui')['NDrawer'] - NDrawerContent: typeof import('naive-ui')['NDrawerContent'] - NDropdown: typeof import('naive-ui')['NDropdown'] - NDynamicInput: typeof import('naive-ui')['NDynamicInput'] - NEmpty: typeof import('naive-ui')['NEmpty'] - NFlex: typeof import('naive-ui')['NFlex'] - NForm: typeof import('naive-ui')['NForm'] - NFormItem: typeof import('naive-ui')['NFormItem'] - NFormItemGi: typeof import('naive-ui')['NFormItemGi'] - NFormItemGridItem: typeof import('naive-ui')['NFormItemGridItem'] - NGi: typeof import('naive-ui')['NGi'] - NGrid: typeof import('naive-ui')['NGrid'] - NInput: typeof import('naive-ui')['NInput'] - NInputGroup: typeof import('naive-ui')['NInputGroup'] - NInputGroupLabel: typeof import('naive-ui')['NInputGroupLabel'] - NInputNumber: typeof import('naive-ui')['NInputNumber'] - NLayout: typeof import('naive-ui')['NLayout'] - NLayoutSider: typeof import('naive-ui')['NLayoutSider'] - NList: typeof import('naive-ui')['NList'] - NListItem: typeof import('naive-ui')['NListItem'] - NMenu: typeof import('naive-ui')['NMenu'] - NMessageProvider: typeof import('naive-ui')['NMessageProvider'] - NModal: typeof import('naive-ui')['NModal'] - NNotificationProvider: typeof import('naive-ui')['NNotificationProvider'] - NP: typeof import('naive-ui')['NP'] - NPageHeader: typeof import('naive-ui')['NPageHeader'] - NPopconfirm: typeof import('naive-ui')['NPopconfirm'] - NProgress: typeof import('naive-ui')['NProgress'] - NRadio: typeof import('naive-ui')['NRadio'] - NRadioGroup: typeof import('naive-ui')['NRadioGroup'] - NScrollbar: typeof import('naive-ui')['NScrollbar'] - NSelect: typeof import('naive-ui')['NSelect'] - NSpace: typeof import('naive-ui')['NSpace'] - NSpin: typeof import('naive-ui')['NSpin'] - NStatistic: typeof import('naive-ui')['NStatistic'] - NSwitch: typeof import('naive-ui')['NSwitch'] - NTabPane: typeof import('naive-ui')['NTabPane'] - NTabs: typeof import('naive-ui')['NTabs'] - NTag: typeof import('naive-ui')['NTag'] - NText: typeof import('naive-ui')['NText'] - NThing: typeof import('naive-ui')['NThing'] - NTooltip: typeof import('naive-ui')['NTooltip'] - NUpload: typeof import('naive-ui')['NUpload'] - NUploadDragger: typeof import('naive-ui')['NUploadDragger'] - NVirtualList: typeof import('naive-ui')['NVirtualList'] - RouterLink: typeof import('vue-router')['RouterLink'] - RouterView: typeof import('vue-router')['RouterView'] - } -} diff --git a/components.json b/components.json index f75e4d0..77dd417 100644 --- a/components.json +++ b/components.json @@ -1,9 +1,9 @@ { "$schema": "https://shadcn-vue.com/schema.json", - "style": "default", + "style": "new-york", "typescript": true, "tailwind": { - "config": "tailwind.config.ts", + "config": "", "css": "assets/css/tailwind.css", "baseColor": "neutral", "cssVariables": true, diff --git a/components/access-keys/change-password.vue b/components/access-keys/change-password.vue index eec244d..961a745 100644 --- a/components/access-keys/change-password.vue +++ b/components/access-keys/change-password.vue @@ -1,167 +1,158 @@