File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33 */
44export const DATE_FORMATTER = "YYYY-MM-DD HH:mm:ss" ;
55
6+ /**
7+ * 应用名称
8+ */
9+ export const APP_NAME = "Cube Diary" ;
10+
11+ /**
12+ * 应用副标题
13+ */
14+ export const APP_SUBTITLE = "记录你的生活" ;
15+
616/**
717 * 固定分页条数
818 */
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { login } from "../../store/user";
66import { messageError } from "@/utils/message" ;
77import { KeyOutlined } from "@ant-design/icons" ;
88import { useLoginSuccess } from "./use-login-success" ;
9- import { THEME_BUTTON_COLOR } from "@/config" ;
9+ import { APP_NAME , APP_SUBTITLE , THEME_BUTTON_COLOR } from "@/config" ;
1010import { usePageTitle } from "@/store/global" ;
1111
1212export const LoginPage = ( ) => {
@@ -42,8 +42,8 @@ export const LoginPage = () => {
4242 if ( e . key === "Enter" ) onPasswordSubmit ( ) ;
4343 } ;
4444
45- const appTitle = "Cube Note" ;
46- const appSubTitle = "记录你的生活" ;
45+ const appTitle = APP_NAME ;
46+ const appSubTitle = APP_SUBTITLE ;
4747
4848 return (
4949 < div className = "h-screen w-screen bg-gray-100 dark:bg-neutral-800 flex flex-col justify-center items-center dark:text-gray-100" >
Original file line number Diff line number Diff line change 66 SnippetsOutlined ,
77} from "@ant-design/icons" ;
88import { UserOutlined , RightOutlined , LogoutOutlined } from "@ant-design/icons" ;
9+ import { APP_NAME } from "@/config" ;
910import { Cell , SplitLine } from "@/components/cell" ;
1011import { SettingLinkItem , useSettingMenu } from "./use-setting-menu" ;
1112import { AboutModal } from "../about" ;
@@ -148,7 +149,7 @@ export const MobileSetting: FC<MobileProps> = (props) => {
148149 }
149150 >
150151 < Flex vertical className = "p-4" gap = { 16 } >
151- < h1 className = "text-center" > Cube Note </ h1 >
152+ < h1 className = "text-center" > { APP_NAME } </ h1 >
152153 < Flex vertical gap = { 16 } className = "flex-grow" >
153154 < Card size = "small" >
154155 < Row justify = "space-around" >
Original file line number Diff line number Diff line change 11import { atom , useSetAtom } from "jotai" ;
22import { useEffect } from "react" ;
3+ import { APP_NAME } from "@/config" ;
34
45export const getIsMobile = ( ) => {
56 const screenWidth =
@@ -26,13 +27,13 @@ export const usePageTitle = (title: string) => {
2627
2728 useEffect ( ( ) => {
2829 setCurrentPageTitle ( title ) ;
29- document . title = title + " - Cube Note" ;
30+ document . title = title + " - " + APP_NAME ;
3031 } , [ title ] ) ;
3132
3233 useEffect ( ( ) => {
3334 return ( ) => {
3435 setCurrentPageTitle ( "" ) ;
35- document . title = "Cube Note" ;
36+ document . title = APP_NAME ;
3637 } ;
3738 } , [ ] ) ;
3839} ;
You can’t perform that action at this time.
0 commit comments