mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 20:24:27 -04:00
Add about tab on the settings page
This commit is contained in:
parent
c528d4dd78
commit
b97942b10f
@ -21,10 +21,7 @@
|
|||||||
import {
|
import {
|
||||||
Account,
|
Account,
|
||||||
KyooErrors,
|
KyooErrors,
|
||||||
QueryIdentifier,
|
|
||||||
QueryPage,
|
QueryPage,
|
||||||
User,
|
|
||||||
UserP,
|
|
||||||
deleteAccount,
|
deleteAccount,
|
||||||
logout,
|
logout,
|
||||||
queryFn,
|
queryFn,
|
||||||
@ -40,6 +37,7 @@ import {
|
|||||||
HR,
|
HR,
|
||||||
Icon,
|
Icon,
|
||||||
Input,
|
Input,
|
||||||
|
Link,
|
||||||
P,
|
P,
|
||||||
Popup,
|
Popup,
|
||||||
Select,
|
Select,
|
||||||
@ -62,6 +60,8 @@ import Mail from "@material-symbols/svg-400/outlined/mail.svg";
|
|||||||
import Password from "@material-symbols/svg-400/outlined/password.svg";
|
import Password from "@material-symbols/svg-400/outlined/password.svg";
|
||||||
import Logout from "@material-symbols/svg-400/rounded/logout.svg";
|
import Logout from "@material-symbols/svg-400/rounded/logout.svg";
|
||||||
import Delete from "@material-symbols/svg-400/rounded/delete.svg";
|
import Delete from "@material-symbols/svg-400/rounded/delete.svg";
|
||||||
|
import Android from "@material-symbols/svg-400/rounded/android.svg";
|
||||||
|
import Public from "@material-symbols/svg-400/rounded/public.svg";
|
||||||
|
|
||||||
const Preference = ({
|
const Preference = ({
|
||||||
icon,
|
icon,
|
||||||
@ -385,11 +385,6 @@ const AccountSettings = ({ setPopup }: { setPopup: (e?: ReactElement) => void })
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const query: QueryIdentifier<User> = {
|
|
||||||
parser: UserP,
|
|
||||||
path: ["auth", "me"],
|
|
||||||
};
|
|
||||||
|
|
||||||
export const SettingsPage: QueryPage = () => {
|
export const SettingsPage: QueryPage = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [popup, setPopup] = useState<ReactElement | undefined>(undefined);
|
const [popup, setPopup] = useState<ReactElement | undefined>(undefined);
|
||||||
@ -414,6 +409,22 @@ export const SettingsPage: QueryPage = () => {
|
|||||||
</Preference>
|
</Preference>
|
||||||
</SettingsContainer>
|
</SettingsContainer>
|
||||||
<AccountSettings setPopup={setPopup} />
|
<AccountSettings setPopup={setPopup} />
|
||||||
|
<SettingsContainer title={t("settings.about.label")}>
|
||||||
|
<Link href="https://github.com/zoriya/kyoo/releases/latest/download/kyoo.apk" target="_blank">
|
||||||
|
<Preference
|
||||||
|
icon={Android}
|
||||||
|
label={t("settings.about.android-app.label")}
|
||||||
|
description={t("settings.about.android-app.description")}
|
||||||
|
/>
|
||||||
|
</Link>
|
||||||
|
<Link href="https://github.com/zoriya/kyoo" target="_blank">
|
||||||
|
<Preference
|
||||||
|
icon={Public}
|
||||||
|
label={t("settings.about.git.label")}
|
||||||
|
description={t("settings.about.git.description")}
|
||||||
|
/>
|
||||||
|
</Link>
|
||||||
|
</SettingsContainer>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
{popup}
|
{popup}
|
||||||
</>
|
</>
|
||||||
@ -421,5 +432,3 @@ export const SettingsPage: QueryPage = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
SettingsPage.getLayout = DefaultLayout;
|
SettingsPage.getLayout = DefaultLayout;
|
||||||
|
|
||||||
SettingsPage.getFetchUrls = () => [query];
|
|
||||||
|
@ -91,6 +91,10 @@
|
|||||||
"username": {
|
"username": {
|
||||||
"label": "Username"
|
"label": "Username"
|
||||||
},
|
},
|
||||||
|
"avatar": {
|
||||||
|
"label": "Avatar",
|
||||||
|
"description": "Change your profile icon"
|
||||||
|
},
|
||||||
"email": {
|
"email": {
|
||||||
"label": "Email"
|
"label": "Email"
|
||||||
},
|
},
|
||||||
@ -100,6 +104,17 @@
|
|||||||
"oldPassword": "Old password",
|
"oldPassword": "Old password",
|
||||||
"newPassword": "New password"
|
"newPassword": "New password"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"about": {
|
||||||
|
"label": "About",
|
||||||
|
"android-app": {
|
||||||
|
"label": "Android app",
|
||||||
|
"description": "Download the android app"
|
||||||
|
},
|
||||||
|
"git": {
|
||||||
|
"label": "Github",
|
||||||
|
"description": "Open the github repository where you can browse the code of kyoo"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"player": {
|
"player": {
|
||||||
|
@ -91,6 +91,10 @@
|
|||||||
"username": {
|
"username": {
|
||||||
"label": "Nom d'utilisateur"
|
"label": "Nom d'utilisateur"
|
||||||
},
|
},
|
||||||
|
"avatar": {
|
||||||
|
"label": "Avatar",
|
||||||
|
"description": "Changez votre photo de profil"
|
||||||
|
},
|
||||||
"email": {
|
"email": {
|
||||||
"label": "Email"
|
"label": "Email"
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user