Skip to content

Commit 1502151

Browse files
committed
fix: hide logout button
1 parent 5c9b3da commit 1502151

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

frontend/src/pages/Layout/Header.tsx

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -216,15 +216,18 @@ export function Header() {
216216
label: currentUser.email,
217217
disabled: true,
218218
},
219-
{
220-
type: 'divider',
221-
},
222-
{
223-
key: 'logout',
224-
label: t('user.actions.logout'),
225-
icon: <LogIn className="h-4 w-4" />,
226-
onClick: handleLogout,
227-
},
219+
// 只有 JWT 模式才显示退出登录按钮
220+
...(authMode !== 'SSO' ? [
221+
{
222+
type: 'divider',
223+
},
224+
{
225+
key: 'logout',
226+
label: t('user.actions.logout'),
227+
icon: <LogIn className="h-4 w-4" />,
228+
onClick: handleLogout,
229+
},
230+
] : []),
228231
]
229232
: [
230233
{

0 commit comments

Comments
 (0)