mirror of
https://github.com/fosrl/pangolin.git
synced 2025-07-31 08:04:54 +02:00
Adjust button and add profile translations
This commit is contained in:
parent
31a41576d8
commit
8aa95db9bc
12 changed files with 61 additions and 21 deletions
|
@ -41,13 +41,15 @@ export default function LocaleSwitcherSelect({
|
|||
<Button
|
||||
variant="ghost"
|
||||
className={clsx(
|
||||
'rounded-sm p-2 transition-colors flex items-center gap-2',
|
||||
'w-full rounded-sm h-8 gap-2 justify-start font-normal',
|
||||
isPending && 'pointer-events-none'
|
||||
)}
|
||||
aria-label={label}
|
||||
>
|
||||
<Languages className="h-4 w-4" />
|
||||
<span >{selected?.label ?? label}</span>
|
||||
<span className="text-left flex-1">
|
||||
{selected?.label ?? label}
|
||||
</span>
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end" className="min-w-[8rem]">
|
||||
|
|
|
@ -133,7 +133,7 @@ export default function ProfileIcon() {
|
|||
<DropdownMenuSeparator />
|
||||
</>
|
||||
)}
|
||||
<DropdownMenuLabel>Theme</DropdownMenuLabel>
|
||||
<DropdownMenuLabel>{t("theme")}</DropdownMenuLabel>
|
||||
{(["light", "dark", "system"] as const).map(
|
||||
(themeOption) => (
|
||||
<DropdownMenuItem
|
||||
|
@ -152,7 +152,7 @@ export default function ProfileIcon() {
|
|||
<Laptop className="mr-2 h-4 w-4" />
|
||||
)}
|
||||
<span className="capitalize">
|
||||
{themeOption}
|
||||
{t(themeOption)}
|
||||
</span>
|
||||
{userTheme === themeOption && (
|
||||
<span className="absolute right-2 flex h-3.5 w-3.5 items-center justify-center">
|
||||
|
@ -163,9 +163,7 @@ export default function ProfileIcon() {
|
|||
)
|
||||
)}
|
||||
<DropdownMenuSeparator />
|
||||
<div>
|
||||
<LocaleSwitcher />
|
||||
</div>
|
||||
<DropdownMenuSeparator />
|
||||
<DropdownMenuItem onClick={() => logout()}>
|
||||
{/* <LogOut className="mr-2 h-4 w-4" /> */}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue