chore: enhance dashboard sidebar localization and add web manifest
- Add new dashboard sidebar item for navigation in both English and Chinese localization files. - Introduce a new `site.webmanifest` file for improved PWA support. - Update routing constants to include specific settings routes for better organization. - Clean up imports in `config.tsx` and adjust sidebar links for clarity.
This commit is contained in:
parent
7127a46543
commit
52c30ec9d1
@ -266,6 +266,10 @@
|
||||
},
|
||||
"Dashboard": {
|
||||
"sidebar": {
|
||||
"dashboard": {
|
||||
"title": "Dashboard",
|
||||
"href": "/dashboard"
|
||||
},
|
||||
"ai": {
|
||||
"title": "AI",
|
||||
"items": {
|
||||
|
@ -262,6 +262,9 @@
|
||||
},
|
||||
"Dashboard": {
|
||||
"sidebar": {
|
||||
"dashboard": {
|
||||
"title": "工作台"
|
||||
},
|
||||
"ai": {
|
||||
"title": "AI",
|
||||
"items": {
|
||||
|
1
public/site.webmanifest
Executable file
1
public/site.webmanifest
Executable file
@ -0,0 +1 @@
|
||||
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
|
@ -16,7 +16,6 @@ import { useTranslations } from 'next-intl';
|
||||
import * as React from 'react';
|
||||
import { Logo } from '../logo';
|
||||
|
||||
|
||||
export function DashboardSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
||||
const t = useTranslations();
|
||||
|
||||
|
@ -12,7 +12,6 @@ import { MenuItem, NestedMenuItem, WebsiteConfig } from '@/types';
|
||||
import { DashboardIcon } from '@radix-ui/react-icons';
|
||||
import {
|
||||
AudioLinesIcon,
|
||||
BadgeCheckIcon,
|
||||
BotIcon,
|
||||
BuildingIcon,
|
||||
ChartNoAxesCombinedIcon,
|
||||
@ -35,7 +34,8 @@ import {
|
||||
SquareKanbanIcon,
|
||||
SquarePenIcon,
|
||||
ThumbsUpIcon,
|
||||
WandSparklesIcon,
|
||||
UserCircleIcon,
|
||||
WandSparklesIcon
|
||||
} from 'lucide-react';
|
||||
|
||||
/**
|
||||
@ -343,8 +343,8 @@ export function getAvatarLinks(t: TranslationFunction): MenuItem[] {
|
||||
},
|
||||
{
|
||||
title: t('Marketing.avatar.settings'),
|
||||
href: Routes.Settings,
|
||||
icon: <SettingsIcon className="size-4 shrink-0" />,
|
||||
href: Routes.SettingsGeneral,
|
||||
icon: <Settings2Icon className="size-4 shrink-0" />,
|
||||
},
|
||||
];
|
||||
}
|
||||
@ -357,6 +357,12 @@ export function getAvatarLinks(t: TranslationFunction): MenuItem[] {
|
||||
*/
|
||||
export function getSidebarMainLinks(t: TranslationFunction): NestedMenuItem[] {
|
||||
return [
|
||||
{
|
||||
title: t('Dashboard.sidebar.dashboard.title'),
|
||||
icon: <DashboardIcon className="size-5 shrink-0" />,
|
||||
href: Routes.Dashboard,
|
||||
external: false,
|
||||
},
|
||||
{
|
||||
title: t('Dashboard.sidebar.ai.title'),
|
||||
icon: <BotIcon className="size-5 shrink-0" />,
|
||||
@ -389,24 +395,18 @@ export function getSidebarMainLinks(t: TranslationFunction): NestedMenuItem[] {
|
||||
},
|
||||
{
|
||||
title: t('Dashboard.sidebar.settings.title'),
|
||||
icon: <SettingsIcon className="size-5 shrink-0" />,
|
||||
icon: <Settings2Icon className="size-5 shrink-0" />,
|
||||
items: [
|
||||
{
|
||||
title: t('Dashboard.sidebar.settings.items.general.title'),
|
||||
icon: <BadgeCheckIcon className="size-5 shrink-0" />,
|
||||
href: Routes.HeroBlocks,
|
||||
external: false,
|
||||
},
|
||||
{
|
||||
title: t('Dashboard.sidebar.settings.items.security.title'),
|
||||
icon: <ShieldCheckIcon className="size-5 shrink-0" />,
|
||||
href: Routes.PricingBlocks,
|
||||
icon: <UserCircleIcon className="size-5 shrink-0" />,
|
||||
href: Routes.SettingsGeneral,
|
||||
external: false,
|
||||
},
|
||||
{
|
||||
title: t('Dashboard.sidebar.settings.items.billing.title'),
|
||||
icon: <CreditCardIcon className="size-5 shrink-0" />,
|
||||
href: Routes.FeaturesBlocks,
|
||||
href: Routes.SettingsBilling,
|
||||
external: false,
|
||||
}
|
||||
],
|
||||
|
@ -28,7 +28,9 @@ export enum Routes {
|
||||
ResetPassword = '/auth/reset-password',
|
||||
|
||||
Dashboard = '/dashboard',
|
||||
Settings = '/settings/general',
|
||||
SettingsGeneral = '/settings/general',
|
||||
SettingsSecurity = '/settings/security',
|
||||
SettingsBilling = '/settings/billing',
|
||||
|
||||
AIText = '/ai/text',
|
||||
AIImage = '/ai/image',
|
||||
|
@ -8,7 +8,7 @@
|
||||
/* @import "./theme-blue.css"; */
|
||||
/* @import "./theme-violet.css"; */
|
||||
/* @import "./theme-zinc.css"; */
|
||||
@import "./theme-blue.css";
|
||||
@import "./theme.css";
|
||||
/* please notice that sidebar theme need to be set manually */
|
||||
/* https://ui.shadcn.com/docs/components/sidebar#theming */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user