|
|
|
@ -46,41 +46,43 @@ const UserBanner = (props: Props) => {
|
|
|
|
|
</div>
|
|
|
|
|
</PopoverTrigger>
|
|
|
|
|
<PopoverContent align="start" className="p-1" style={{ zIndex: "9999" }}>
|
|
|
|
|
<button
|
|
|
|
|
onClick={() => navigateTo(`/u/${encodeURIComponent(currentUser.username)}`)}
|
|
|
|
|
className="w-full flex items-center gap-2 px-2 py-1 text-left text-sm hover:bg-gray-100 rounded-md outline-none"
|
|
|
|
|
>
|
|
|
|
|
<SquareUserIcon className="w-4 h-auto opacity-60" />
|
|
|
|
|
<span className="truncate">{t("common.profile")}</span>
|
|
|
|
|
</button>
|
|
|
|
|
<button
|
|
|
|
|
onClick={() => navigateTo(Routes.ARCHIVED)}
|
|
|
|
|
className="w-full flex items-center gap-2 px-2 py-1 text-left text-sm hover:bg-gray-100 rounded-md outline-none"
|
|
|
|
|
>
|
|
|
|
|
<ArchiveIcon className="w-4 h-auto opacity-60" />
|
|
|
|
|
<span className="truncate">{t("common.archived")}</span>
|
|
|
|
|
</button>
|
|
|
|
|
<button
|
|
|
|
|
onClick={() => navigateTo(Routes.INBOX)}
|
|
|
|
|
className="w-full flex items-center gap-2 px-2 py-1 text-left text-sm hover:bg-gray-100 rounded-md outline-none"
|
|
|
|
|
>
|
|
|
|
|
<BellIcon className="w-4 h-auto opacity-60" />
|
|
|
|
|
<span className="truncate">{t("common.inbox")}</span>
|
|
|
|
|
</button>
|
|
|
|
|
<button
|
|
|
|
|
onClick={() => navigateTo(Routes.SETTING)}
|
|
|
|
|
className="w-full flex items-center gap-2 px-2 py-1 text-left text-sm hover:bg-gray-100 rounded-md outline-none"
|
|
|
|
|
>
|
|
|
|
|
<SettingsIcon className="w-4 h-auto opacity-60" />
|
|
|
|
|
<span className="truncate">{t("common.settings")}</span>
|
|
|
|
|
</button>
|
|
|
|
|
<button
|
|
|
|
|
onClick={handleSignOut}
|
|
|
|
|
className="w-full flex items-center gap-2 px-2 py-1 text-left text-sm hover:bg-gray-100 rounded-md outline-none"
|
|
|
|
|
>
|
|
|
|
|
<LogOutIcon className="w-4 h-auto opacity-60" />
|
|
|
|
|
<span className="truncate">{t("common.sign-out")}</span>
|
|
|
|
|
</button>
|
|
|
|
|
<div className="flex flex-col text-sm gap-0.5">
|
|
|
|
|
<button
|
|
|
|
|
onClick={() => navigateTo(`/u/${encodeURIComponent(currentUser.username)}`)}
|
|
|
|
|
className="flex items-center gap-2 px-2 py-1 text-left dark:text-zinc-300 hover:bg-gray-100 dark:hover:bg-zinc-700 outline-none rounded"
|
|
|
|
|
>
|
|
|
|
|
<SquareUserIcon className="w-4 h-auto opacity-60" />
|
|
|
|
|
<span className="truncate">{t("common.profile")}</span>
|
|
|
|
|
</button>
|
|
|
|
|
<button
|
|
|
|
|
onClick={() => navigateTo(Routes.ARCHIVED)}
|
|
|
|
|
className="flex items-center gap-2 px-2 py-1 text-left dark:text-zinc-300 hover:bg-gray-100 dark:hover:bg-zinc-700 outline-none rounded"
|
|
|
|
|
>
|
|
|
|
|
<ArchiveIcon className="w-4 h-auto opacity-60" />
|
|
|
|
|
<span className="truncate">{t("common.archived")}</span>
|
|
|
|
|
</button>
|
|
|
|
|
<button
|
|
|
|
|
onClick={() => navigateTo(Routes.INBOX)}
|
|
|
|
|
className="flex items-center gap-2 px-2 py-1 text-left dark:text-zinc-300 hover:bg-gray-100 dark:hover:bg-zinc-700 outline-none rounded"
|
|
|
|
|
>
|
|
|
|
|
<BellIcon className="w-4 h-auto opacity-60" />
|
|
|
|
|
<span className="truncate">{t("common.inbox")}</span>
|
|
|
|
|
</button>
|
|
|
|
|
<button
|
|
|
|
|
onClick={() => navigateTo(Routes.SETTING)}
|
|
|
|
|
className="flex items-center gap-2 px-2 py-1 text-left dark:text-zinc-300 hover:bg-gray-100 dark:hover:bg-zinc-700 outline-none rounded"
|
|
|
|
|
>
|
|
|
|
|
<SettingsIcon className="w-4 h-auto opacity-60" />
|
|
|
|
|
<span className="truncate">{t("common.settings")}</span>
|
|
|
|
|
</button>
|
|
|
|
|
<button
|
|
|
|
|
onClick={handleSignOut}
|
|
|
|
|
className="flex items-center gap-2 px-2 py-1 text-left dark:text-zinc-300 hover:bg-gray-100 dark:hover:bg-zinc-700 outline-none rounded"
|
|
|
|
|
>
|
|
|
|
|
<LogOutIcon className="w-4 h-auto opacity-60" />
|
|
|
|
|
<span className="truncate">{t("common.sign-out")}</span>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</PopoverContent>
|
|
|
|
|
</Popover>
|
|
|
|
|
</div>
|
|
|
|
|