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