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": {
|
"Dashboard": {
|
||||||
"sidebar": {
|
"sidebar": {
|
||||||
|
"dashboard": {
|
||||||
|
"title": "Dashboard",
|
||||||
|
"href": "/dashboard"
|
||||||
|
},
|
||||||
"ai": {
|
"ai": {
|
||||||
"title": "AI",
|
"title": "AI",
|
||||||
"items": {
|
"items": {
|
||||||
|
@ -262,6 +262,9 @@
|
|||||||
},
|
},
|
||||||
"Dashboard": {
|
"Dashboard": {
|
||||||
"sidebar": {
|
"sidebar": {
|
||||||
|
"dashboard": {
|
||||||
|
"title": "工作台"
|
||||||
|
},
|
||||||
"ai": {
|
"ai": {
|
||||||
"title": "AI",
|
"title": "AI",
|
||||||
"items": {
|
"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 * as React from 'react';
|
||||||
import { Logo } from '../logo';
|
import { Logo } from '../logo';
|
||||||
|
|
||||||
|
|
||||||
export function DashboardSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
export function DashboardSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@ import { MenuItem, NestedMenuItem, WebsiteConfig } from '@/types';
|
|||||||
import { DashboardIcon } from '@radix-ui/react-icons';
|
import { DashboardIcon } from '@radix-ui/react-icons';
|
||||||
import {
|
import {
|
||||||
AudioLinesIcon,
|
AudioLinesIcon,
|
||||||
BadgeCheckIcon,
|
|
||||||
BotIcon,
|
BotIcon,
|
||||||
BuildingIcon,
|
BuildingIcon,
|
||||||
ChartNoAxesCombinedIcon,
|
ChartNoAxesCombinedIcon,
|
||||||
@ -35,7 +34,8 @@ import {
|
|||||||
SquareKanbanIcon,
|
SquareKanbanIcon,
|
||||||
SquarePenIcon,
|
SquarePenIcon,
|
||||||
ThumbsUpIcon,
|
ThumbsUpIcon,
|
||||||
WandSparklesIcon,
|
UserCircleIcon,
|
||||||
|
WandSparklesIcon
|
||||||
} from 'lucide-react';
|
} from 'lucide-react';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -343,8 +343,8 @@ export function getAvatarLinks(t: TranslationFunction): MenuItem[] {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('Marketing.avatar.settings'),
|
title: t('Marketing.avatar.settings'),
|
||||||
href: Routes.Settings,
|
href: Routes.SettingsGeneral,
|
||||||
icon: <SettingsIcon className="size-4 shrink-0" />,
|
icon: <Settings2Icon className="size-4 shrink-0" />,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -357,6 +357,12 @@ export function getAvatarLinks(t: TranslationFunction): MenuItem[] {
|
|||||||
*/
|
*/
|
||||||
export function getSidebarMainLinks(t: TranslationFunction): NestedMenuItem[] {
|
export function getSidebarMainLinks(t: TranslationFunction): NestedMenuItem[] {
|
||||||
return [
|
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'),
|
title: t('Dashboard.sidebar.ai.title'),
|
||||||
icon: <BotIcon className="size-5 shrink-0" />,
|
icon: <BotIcon className="size-5 shrink-0" />,
|
||||||
@ -389,24 +395,18 @@ export function getSidebarMainLinks(t: TranslationFunction): NestedMenuItem[] {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('Dashboard.sidebar.settings.title'),
|
title: t('Dashboard.sidebar.settings.title'),
|
||||||
icon: <SettingsIcon className="size-5 shrink-0" />,
|
icon: <Settings2Icon className="size-5 shrink-0" />,
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
title: t('Dashboard.sidebar.settings.items.general.title'),
|
title: t('Dashboard.sidebar.settings.items.general.title'),
|
||||||
icon: <BadgeCheckIcon className="size-5 shrink-0" />,
|
icon: <UserCircleIcon className="size-5 shrink-0" />,
|
||||||
href: Routes.HeroBlocks,
|
href: Routes.SettingsGeneral,
|
||||||
external: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t('Dashboard.sidebar.settings.items.security.title'),
|
|
||||||
icon: <ShieldCheckIcon className="size-5 shrink-0" />,
|
|
||||||
href: Routes.PricingBlocks,
|
|
||||||
external: false,
|
external: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('Dashboard.sidebar.settings.items.billing.title'),
|
title: t('Dashboard.sidebar.settings.items.billing.title'),
|
||||||
icon: <CreditCardIcon className="size-5 shrink-0" />,
|
icon: <CreditCardIcon className="size-5 shrink-0" />,
|
||||||
href: Routes.FeaturesBlocks,
|
href: Routes.SettingsBilling,
|
||||||
external: false,
|
external: false,
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -28,7 +28,9 @@ export enum Routes {
|
|||||||
ResetPassword = '/auth/reset-password',
|
ResetPassword = '/auth/reset-password',
|
||||||
|
|
||||||
Dashboard = '/dashboard',
|
Dashboard = '/dashboard',
|
||||||
Settings = '/settings/general',
|
SettingsGeneral = '/settings/general',
|
||||||
|
SettingsSecurity = '/settings/security',
|
||||||
|
SettingsBilling = '/settings/billing',
|
||||||
|
|
||||||
AIText = '/ai/text',
|
AIText = '/ai/text',
|
||||||
AIImage = '/ai/image',
|
AIImage = '/ai/image',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
/* @import "./theme-blue.css"; */
|
/* @import "./theme-blue.css"; */
|
||||||
/* @import "./theme-violet.css"; */
|
/* @import "./theme-violet.css"; */
|
||||||
/* @import "./theme-zinc.css"; */
|
/* @import "./theme-zinc.css"; */
|
||||||
@import "./theme-blue.css";
|
@import "./theme.css";
|
||||||
/* please notice that sidebar theme need to be set manually */
|
/* please notice that sidebar theme need to be set manually */
|
||||||
/* https://ui.shadcn.com/docs/components/sidebar#theming */
|
/* https://ui.shadcn.com/docs/components/sidebar#theming */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user