From 78ef6cd798522e5fbf13416c2cdfebbb444d0b43 Mon Sep 17 00:00:00 2001 From: lezi-fun <177434121+lezi-fun@users.noreply.github.com> Date: Tue, 11 Aug 2026 11:38:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20desktop=20layout=20=E2=80=94=20use=20#ap?= =?UTF-8?q?p=20flex=20container=20(was=20.app-container=20with=20no=20CSS)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit HomeClient rendered className='app-container' but globals.css only defines #app (flex) — sidebar/feed fell back to block layout, feed pushed below. Switch to id='app' to match upstream stylesheet. Also: AdminPage i18n (nav labels + title). --- app/HomeClient.js | 2 +- components/AdminPage.js | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/app/HomeClient.js b/app/HomeClient.js index ab2687d..0c81351 100644 --- a/app/HomeClient.js +++ b/app/HomeClient.js @@ -34,7 +34,7 @@ function HomeInner() {
-
+
diff --git a/components/AdminPage.js b/components/AdminPage.js index 819575b..b3ba3ac 100644 --- a/components/AdminPage.js +++ b/components/AdminPage.js @@ -2,6 +2,7 @@ // 管理后台:侧边栏布局(对齐上游 main 分支) import { useState } from 'react'; +import { useTranslation } from 'react-i18next'; import { Icon } from './Icons'; import AdminReports from './admin/AdminReports'; import AdminUsers from './admin/AdminUsers'; @@ -12,22 +13,23 @@ import AdminCustomPages from './admin/AdminCustomPages'; import AdminCustomCss from './admin/AdminCustomCss'; const NAV = [ - { key: 'reports', label: '举报', icon: 'shieldAlert' }, - { key: 'users', label: '用户', icon: 'users' }, - { key: 'logs', label: '日志', icon: 'file' }, - { key: 'links', label: '友链', icon: 'link' }, - { key: 'settings', label: '论坛设置', icon: 'settings' }, - { key: 'custom', label: '自定义页面', icon: 'file' }, - { key: 'css', label: '自定义CSS', icon: 'file' }, + { key: 'reports', labelKey: 'admin.reports', icon: 'shieldAlert' }, + { key: 'users', labelKey: 'admin.users', icon: 'users' }, + { key: 'logs', labelKey: 'admin.logs', icon: 'file' }, + { key: 'links', labelKey: 'admin.links', icon: 'link' }, + { key: 'settings', labelKey: 'admin.forumSettings', icon: 'settings' }, + { key: 'custom', labelKey: 'admin.customPages', icon: 'file' }, + { key: 'css', labelKey: 'admin.customCss', icon: 'file' }, ]; export default function AdminPage() { + const { t } = useTranslation(); const [tab, setTab] = useState('reports'); return (
-

管理后台

+

{t('admin.title')}