@@ -43,17 +43,20 @@ export default function WelcomePage() {
4343
4444 return (
4545 < div className = "flex h-full w-full items-center justify-center bg-[var(--stage-background)]" >
46- < div className = "flex flex-col gap-8" >
47- < div className = "flex flex-col gap-2" >
46+ < div className = "m-2 flex flex-col p-4 sm:gap-8" >
47+ { /* 顶部标题区域 */ }
48+ < div className = "flex flex-col sm:gap-2" >
4849 < div className = "flex items-center gap-2" >
49- < span className = "text-3xl" > { t ( "title" ) } </ span >
50- < span className = "rounded-lg px-2 py-1 text-sm opacity-50 ring " > { appVersion } </ span >
50+ < span className = "sm: text-3xl" > { t ( "title" ) } </ span >
51+ < span className = "hidden opacity-50 sm:inline sm: rounded-lg sm: px-2 sm: py-1 md: text-sm" > { appVersion } </ span >
5152 </ div >
52- < div className = "text-lg opacity-50" > { t ( "slogan" ) } </ div >
53+ < div className = "hidden text-xs opacity-50 sm:block sm:text-lg " > { t ( "slogan" ) } </ div >
5354 </ div >
54- < div className = "flex gap-16" >
55- < div className = "flex flex-col gap-8" >
56- < div className = "grid grid-cols-2 grid-rows-2 gap-2 gap-x-4 *:flex *:w-max *:cursor-pointer *:items-center *:gap-2 *:hover:opacity-75 *:active:scale-90" >
55+ { /* 底部区域 */ }
56+ < div className = "flex sm:gap-16" >
57+ < div className = "flex flex-col sm:gap-8" >
58+ { /* 常用操作 宫格区 */ }
59+ < div className = "grid grid-cols-2 grid-rows-2 *:flex *:w-max *:cursor-pointer *:items-center *:gap-2 *:hover:opacity-75 *:active:scale-90 sm:gap-2 sm:gap-x-4" >
5760 < div
5861 onClick = { ( ) => {
5962 toast . promise (
@@ -71,27 +74,27 @@ export default function WelcomePage() {
7174 } }
7275 >
7376 < PersonStanding />
74- < span > { t ( "newUserGuide" ) } </ span >
77+ < span className = "hidden sm:inline" > { t ( "newUserGuide" ) } </ span >
7578 </ div >
7679 < div onClick = { onNewDraft } >
7780 < FilePlus />
78- < span > { t ( "newDraft" ) } </ span >
79- < span className = "text-xs opacity-50" > { isMac ? "⌘ + N" : "Ctrl + N" } </ span >
81+ < span className = "hidden sm:inline" > { t ( "newDraft" ) } </ span >
82+ < span className = "hidden text-xs opacity-50 sm:inline " > { isMac ? "⌘ + N" : "Ctrl + N" } </ span >
8083 </ div >
8184 < div onClick = { ( ) => RecentFilesWindow . open ( ) } >
8285 < TableProperties />
83- < span > { t ( "openRecentFiles" ) } </ span >
84- < span className = "text-xs opacity-50" > Shift + #</ span >
86+ < span className = "hidden sm:inline" > { t ( "openRecentFiles" ) } </ span >
87+ < span className = "hidden text-xs opacity-50 sm:inline " > Shift + #</ span >
8588 </ div >
8689 < div onClick = { ( ) => onOpenFile ( undefined , "欢迎页面" ) } >
8790 < FolderOpen />
88- < span > { t ( "openFile" ) } </ span >
89- < span className = "text-xs opacity-50" > { isMac ? "⌘ + O" : "Ctrl + O" } </ span >
91+ < span className = "hidden sm:inline" > { t ( "openFile" ) } </ span >
92+ < span className = "hidden text-xs opacity-50 sm:inline " > { isMac ? "⌘ + O" : "Ctrl + O" } </ span >
9093 </ div >
9194 </ div >
9295 < div
9396 className = { cn (
94- "flex flex-col gap-2 *:flex *:flex-col *:transition-opacity *:*:last:opacity-50 *:hover:opacity-75" ,
97+ "hidden flex-col gap-2 *:flex *:flex-col *:transition-opacity *:*:last:opacity-50 *:hover:opacity-75 sm:flex " ,
9598 ) }
9699 >
97100 { recentFiles . slice ( 0 , 6 ) . map ( ( file , index ) => (
@@ -112,18 +115,19 @@ export default function WelcomePage() {
112115 ) ) }
113116 </ div >
114117 </ div >
115- < div className = "flex flex-col gap-2 *:flex *:w-max *:cursor-pointer *:gap-2 *:hover:opacity-75 *:active:scale-90" >
118+ { /* 右侧区域 */ }
119+ < div className = "flex flex-col *:flex *:w-max *:cursor-pointer *:gap-2 *:hover:opacity-75 *:active:scale-90 sm:gap-2" >
116120 < div onClick = { ( ) => SettingsWindow . open ( "settings" ) } >
117121 < SettingsIcon />
118- < span > { t ( "settings" ) } </ span >
122+ < span className = "hidden sm:inline" > { t ( "settings" ) } </ span >
119123 </ div >
120124 < div onClick = { ( ) => SettingsWindow . open ( "about" ) } >
121125 < Info />
122- < span > { t ( "about" ) } </ span >
126+ < span className = "hidden sm:inline" > { t ( "about" ) } </ span >
123127 </ div >
124128 < div onClick = { ( ) => shellOpen ( "https://project-graph.top" ) } >
125129 < Earth />
126- < span > { t ( "website" ) } </ span >
130+ < span className = "hidden sm:inline" > { t ( "website" ) } </ span >
127131 </ div >
128132 </ div >
129133 </ div >
0 commit comments