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