mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Add icons for logout and delete account
This commit is contained in:
parent
6ac8af9946
commit
12f685010b
@ -145,8 +145,8 @@ const MenuItem = ({
|
||||
props as any,
|
||||
)}
|
||||
>
|
||||
{selected && <Icon icon={icon ?? Check} color={theme.paragraph} size={24} />}
|
||||
<P {...css({ paddingLeft: ts(2) + +!selected * px(24) })}>{label}</P>
|
||||
{(icon || selected) && <Icon icon={icon ?? Check} color={theme.paragraph} size={24} {...css({ paddingLeft: icon ? ts(2) : 0 })}/>}
|
||||
<P {...css({ paddingLeft: ts(2) + +!(icon || selected) * px(24) })}>{label}</P>
|
||||
</PressableFeedback>
|
||||
);
|
||||
};
|
||||
|
@ -152,7 +152,7 @@ const MenuItem = ({
|
||||
props as any,
|
||||
)}
|
||||
>
|
||||
{selected && (
|
||||
{(icon || selected) && (
|
||||
<Icon
|
||||
icon={icon ?? Dot}
|
||||
color={theme.paragraph}
|
||||
|
@ -49,6 +49,8 @@ import { useRouter } from "solito/router";
|
||||
import { px, rem, Stylable, useYoshiki } from "yoshiki/native";
|
||||
import MenuIcon from "@material-symbols/svg-400/rounded/menu-fill.svg";
|
||||
import Search from "@material-symbols/svg-400/rounded/search-fill.svg";
|
||||
import Logout from "@material-symbols/svg-400/rounded/logout.svg";
|
||||
import Delete from "@material-symbols/svg-400/rounded/delete.svg";
|
||||
import { Fetch, FetchNE } from "../fetch";
|
||||
import { KyooLongLogo } from "./icon";
|
||||
import { forwardRef, useRef, useState } from "react";
|
||||
@ -127,6 +129,7 @@ export const NavbarProfile = () => {
|
||||
<>
|
||||
<Menu.Item
|
||||
label={t("login.logout")}
|
||||
icon={Logout}
|
||||
onSelect={async () => {
|
||||
await logout();
|
||||
queryClient.invalidateQueries(["auth", "me"]);
|
||||
@ -134,6 +137,7 @@ export const NavbarProfile = () => {
|
||||
/>
|
||||
<Menu.Item
|
||||
label={t("login.delete")}
|
||||
icon={Delete}
|
||||
onSelect={async () => {
|
||||
Alert.alert(
|
||||
t("login.delete"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user