1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-20 14:37:43 +01:00

Add reload button to failed to load profile

This commit is contained in:
Cooper Ransom 2024-03-16 00:40:41 -04:00
parent 4bf7698f64
commit e7c3dd072e
2 changed files with 9 additions and 0 deletions

View file

@ -458,6 +458,7 @@
"logout": "Logout", "logout": "Logout",
"reset": "Reset custom server", "reset": "Reset custom server",
"text": "Failed to load your profile", "text": "Failed to load your profile",
"reload": "Reload",
"textWithReset": "Failed to load your profile from your custom server, want to reset back to the default server?" "textWithReset": "Failed to load your profile from your custom server, want to reset back to the default server?"
}, },
"migration": { "migration": {

View file

@ -54,6 +54,7 @@ function ErrorScreen(props: {
children: ReactNode; children: ReactNode;
showResetButton?: boolean; showResetButton?: boolean;
showLogoutButton?: boolean; showLogoutButton?: boolean;
showReloadButton?: boolean;
}) { }) {
const { t } = useTranslation(); const { t } = useTranslation();
const { logout } = useAuth(); const { logout } = useAuth();
@ -91,6 +92,13 @@ function ErrorScreen(props: {
</Button> </Button>
</div> </div>
) : null} ) : null}
{props.showReloadButton ? (
<div className="mt-6">
<Button theme="secondary" onClick={() => window.location.reload()}>
{t("screens.loadingUserError.reload")}
</Button>
</div>
) : null}
</LargeTextPart> </LargeTextPart>
); );
} }