update theme
This commit is contained in:
@@ -8,10 +8,8 @@ import { useTranslation } from "react-i18next";
|
|||||||
import {
|
import {
|
||||||
Layout,
|
Layout,
|
||||||
Typography,
|
Typography,
|
||||||
ConfigProvider,
|
|
||||||
App as AntApp,
|
|
||||||
Space,
|
Space,
|
||||||
Modal
|
Modal,
|
||||||
} from "antd";
|
} from "antd";
|
||||||
|
|
||||||
import { Button, Tooltip } from "@lobehub/ui";
|
import { Button, Tooltip } from "@lobehub/ui";
|
||||||
@@ -26,7 +24,6 @@ import {
|
|||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
|
|
||||||
import { createStyles, useTheme } from "antd-style";
|
import { createStyles, useTheme } from "antd-style";
|
||||||
import zhCN from "antd/locale/zh_CN";
|
|
||||||
import { useDomainStore } from "@renderer/stores";
|
import { useDomainStore } from "@renderer/stores";
|
||||||
import { useUIStore } from "@renderer/stores";
|
import { useUIStore } from "@renderer/stores";
|
||||||
import { DomainManager } from "@renderer/components/DomainManager";
|
import { DomainManager } from "@renderer/components/DomainManager";
|
||||||
@@ -205,8 +202,6 @@ const App: React.FC = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ConfigProvider locale={zhCN}>
|
|
||||||
<AntApp>
|
|
||||||
<Layout className={styles.layout}>
|
<Layout className={styles.layout}>
|
||||||
{/* Left Sider - Domain List & App List */}
|
{/* Left Sider - Domain List & App List */}
|
||||||
<Sider
|
<Sider
|
||||||
@@ -335,8 +330,6 @@ const App: React.FC = () => {
|
|||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
</Layout>
|
</Layout>
|
||||||
</AntApp>
|
|
||||||
</ConfigProvider>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -456,7 +456,7 @@ const AppDetail: React.FC = () => {
|
|||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
<div className={styles.header}>
|
<div className={styles.header}>
|
||||||
<div className={styles.title}>
|
<div className={styles.title}>
|
||||||
<LayoutGrid size={24} style={{ color: token.colorPrimary }} />
|
<LayoutGrid size={24} style={{ color: token.colorLink }} />
|
||||||
<h3 className={styles.appName}>{currentApp.name}</h3>
|
<h3 className={styles.appName}>{currentApp.name}</h3>
|
||||||
<Tag>ID: {currentApp.appId}</Tag>
|
<Tag>ID: {currentApp.appId}</Tag>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ const AppListItem: React.FC<AppListItemProps> = ({
|
|||||||
</div>
|
</div>
|
||||||
{/* App icon - hidden when pin overlay is visible */}
|
{/* App icon - hidden when pin overlay is visible */}
|
||||||
{!showPinOverlay && (
|
{!showPinOverlay && (
|
||||||
<LayoutGrid size={16} style={{ color: token.colorPrimary }} />
|
<LayoutGrid size={16} style={{ color: token.colorLink }} />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<Tooltip title={app.name}>
|
<Tooltip title={app.name}>
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ import React from "react";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Button, Input, InputPassword, Modal } from "@lobehub/ui";
|
import { Button, Input, InputPassword, Modal } from "@lobehub/ui";
|
||||||
import { Form } from "antd";
|
import { Form } from "antd";
|
||||||
import { createStyles, useTheme } from "antd-style";
|
|
||||||
import { useDomainStore } from "@renderer/stores";
|
import { useDomainStore } from "@renderer/stores";
|
||||||
import type { CreateDomainParams, UpdateDomainParams } from "@shared/types/ipc";
|
import type { CreateDomainParams, UpdateDomainParams } from "@shared/types/ipc";
|
||||||
import { CheckCircle2, XCircle } from "lucide-react";
|
import { CheckCircle2, XCircle } from "lucide-react";
|
||||||
|
import { useTheme } from "antd-style";
|
||||||
|
|
||||||
interface DomainFormProps {
|
interface DomainFormProps {
|
||||||
open: boolean;
|
open: boolean;
|
||||||
|
|||||||
@@ -1,18 +1,26 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import ReactDOM from "react-dom/client";
|
import ReactDOM from "react-dom/client";
|
||||||
import { ConfigProvider, App as AntdApp } from "antd";
|
import { App as AntdApp } from "antd";
|
||||||
import { ThemeProvider } from "@lobehub/ui";
|
import { ConfigProvider, ThemeProvider } from "@lobehub/ui";
|
||||||
import { I18nextProvider } from "react-i18next";
|
import { I18nextProvider } from "react-i18next";
|
||||||
import i18n from "./i18n";
|
import i18n from "./i18n";
|
||||||
import App from "./App";
|
import App from "./App";
|
||||||
import { useThemeStore } from "./stores/themeStore";
|
import { useThemeStore } from "./stores/themeStore";
|
||||||
import "./index.css";
|
|
||||||
|
import { motion } from 'motion/react';
|
||||||
|
|
||||||
const ThemeApp: React.FC = () => {
|
const ThemeApp: React.FC = () => {
|
||||||
const { themeMode, setThemeMode } = useThemeStore();
|
const { themeMode, setThemeMode } = useThemeStore();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ThemeProvider themeMode={themeMode} onThemeModeChange={setThemeMode}>
|
<ThemeProvider
|
||||||
|
themeMode={themeMode}
|
||||||
|
onThemeModeChange={setThemeMode}
|
||||||
|
// customTheme={{primaryColor: 'blue'}}
|
||||||
|
customToken={ () => ({
|
||||||
|
colorLink: '#1890ff'
|
||||||
|
})}
|
||||||
|
>
|
||||||
<AntdApp>
|
<AntdApp>
|
||||||
<App />
|
<App />
|
||||||
</AntdApp>
|
</AntdApp>
|
||||||
@@ -22,14 +30,7 @@ const ThemeApp: React.FC = () => {
|
|||||||
|
|
||||||
ReactDOM.createRoot(document.getElementById("root")!).render(
|
ReactDOM.createRoot(document.getElementById("root")!).render(
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
<ConfigProvider
|
<ConfigProvider motion={motion}>
|
||||||
theme={{
|
|
||||||
token: {
|
|
||||||
colorPrimary: "#1677ff",
|
|
||||||
borderRadius: 6,
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<I18nextProvider i18n={i18n}>
|
<I18nextProvider i18n={i18n}>
|
||||||
<ThemeApp />
|
<ThemeApp />
|
||||||
</I18nextProvider>
|
</I18nextProvider>
|
||||||
|
|||||||
Reference in New Issue
Block a user