Merge pull request #1161 from choizhang/fix-logout-display-timing

refactor(SiteHeader): Hide logout button in guest mode
This commit is contained in:
Daniel.y
2025-03-23 03:20:29 +08:00
committed by GitHub
5 changed files with 150 additions and 140 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -8,8 +8,8 @@
<link rel="icon" type="image/svg+xml" href="logo.png" /> <link rel="icon" type="image/svg+xml" href="logo.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Lightrag</title> <title>Lightrag</title>
<script type="module" crossorigin src="/webui/assets/index-DPOdOU_f.js"></script> <script type="module" crossorigin src="/webui/assets/index-BRzImUsU.js"></script>
<link rel="stylesheet" crossorigin href="/webui/assets/index-Cq65VeVX.css"> <link rel="stylesheet" crossorigin href="/webui/assets/index-BcBS1RaQ.css">
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>

View File

@@ -95,9 +95,11 @@ export default function SiteHeader() {
</a> </a>
</Button> </Button>
<AppSettings /> <AppSettings />
<Button variant="ghost" size="icon" side="bottom" tooltip={t('header.logout')} onClick={handleLogout}> {!isGuestMode && (
<LogOutIcon className="size-4" aria-hidden="true" /> <Button variant="ghost" size="icon" side="bottom" tooltip={t('header.logout')} onClick={handleLogout}>
</Button> <LogOutIcon className="size-4" aria-hidden="true" />
</Button>
)}
</div> </div>
</nav> </nav>
</header> </header>