From b05cabd1bb56cebcaac4f8a68f2f453a8ec663ab Mon Sep 17 00:00:00 2001 From: yxsj245 <17737475682@163.com> Date: Mon, 6 Oct 2025 15:42:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=A7=E8=BE=B9=E6=A0=8F=E6=94=B6=E7=BC=A9?= =?UTF-8?q?=E5=92=8C=E5=B1=95=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 4 +- client/src/components/Layout.tsx | 137 +++++++++++++++++------- client/src/pages/AboutProjectPage.tsx | 2 +- client/src/pages/GameDeploymentPage.tsx | 5 +- 4 files changed, 104 insertions(+), 44 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2054f2b..3560042 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -127,7 +127,7 @@ jobs: platforms: linux/amd64,linux/arm64 push: true tags: | - xiaozhu674/gameservermanager:3.8.6 + xiaozhu674/gameservermanager:3.8.7 xiaozhu674/gameservermanager:latest cache-from: type=gha cache-to: type=gha,mode=max @@ -164,7 +164,7 @@ jobs: platforms: linux/arm64 push: true tags: | - xiaozhu674/gameservermanager:3.8.6-arm64-beta + xiaozhu674/gameservermanager:3.8.7-arm64-beta cache-from: type=gha cache-to: type=gha,mode=max diff --git a/client/src/components/Layout.tsx b/client/src/components/Layout.tsx index 4a8e748..c7b900b 100644 --- a/client/src/components/Layout.tsx +++ b/client/src/components/Layout.tsx @@ -29,7 +29,9 @@ import { Puzzle, HelpCircle, CheckCircle, - Coffee + Coffee, + ChevronLeft, + ChevronRight } from 'lucide-react' interface LayoutProps { @@ -38,6 +40,10 @@ interface LayoutProps { const Layout: React.FC = ({ children }) => { const [sidebarOpen, setSidebarOpen] = useState(false) + const [sidebarCollapsed, setSidebarCollapsed] = useState(() => { + const saved = localStorage.getItem('sidebarCollapsed') + return saved === 'true' + }) const [isConnected, setIsConnected] = useState(socketClient.isConnected()) const [showDisconnectModal, setShowDisconnectModal] = useState(false) const [reconnecting, setReconnecting] = useState(false) @@ -73,6 +79,13 @@ const Layout: React.FC = ({ children }) => { await logout() } + // 切换侧边栏展开/收缩 + const toggleSidebarCollapse = () => { + const newState = !sidebarCollapsed + setSidebarCollapsed(newState) + localStorage.setItem('sidebarCollapsed', String(newState)) + } + // 打开文件管理帮助模态框 const handleOpenFileHelpModal = () => { setShowFileHelpModal(true) @@ -330,17 +343,20 @@ const Layout: React.FC = ({ children }) => { {/* 侧边栏 */}
{/* Logo */} -
-
- - - GSManager3 - +
+
+ + {!sidebarCollapsed && ( + + GSManager3 + + )}
+ {/* 主题切换 */} {/* 用户信息 */} -
-
- +
+
+
-
-

- {user?.username} -

-
-

- {user?.role === 'admin' ? '管理员' : '用户'} + {!sidebarCollapsed && ( +

+

+ {user?.username}

- {isSponsor && ( -
- - - 赞助者 - -
- )} +
+

+ {user?.role === 'admin' ? '管理员' : '用户'} +

+ {isSponsor && ( +
+ + + 赞助者 + +
+ )} +
-
+ )}
{/* 登出按钮 */}
{/* 主内容区域 */} -
+
{/* 顶部栏 */}
版本: - 3.8.6 + 3.8.7
开发者: diff --git a/client/src/pages/GameDeploymentPage.tsx b/client/src/pages/GameDeploymentPage.tsx index 127ad6d..758fb71 100644 --- a/client/src/pages/GameDeploymentPage.tsx +++ b/client/src/pages/GameDeploymentPage.tsx @@ -2658,6 +2658,9 @@ const GameDeploymentPage: React.FC = () => {

在线部署功能需要有效的赞助者密钥才能使用。请前往设置页面配置您的密钥。

+

+ 在线部署是采用GSManager官方中国大陆服务器由开发团队亲自手动配置的服务端具有一键安装和百分百的成功率保障 +