feat: offer fediverse login on login page

This commit is contained in:
Sam 2023-03-16 16:39:53 +01:00
parent cf424d3ae4
commit c6484ef066
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
5 changed files with 83 additions and 13 deletions

View file

@ -33,6 +33,7 @@
const MAX_AVATAR_BYTES = 1_000_000;
if (!$userStore) {
addToast({ header: "Error", body: "You are not logged in." });
goto("/");
}
@ -55,16 +56,9 @@
let modified = false;
$: redirectIfNoAuth($userStore);
$: modified = isModified(bio, display_name, links, names, pronouns, fields, avatar);
$: getAvatar(avatar_files).then((b64) => (avatar = b64));
const redirectIfNoAuth = (user: MeUser | null) => {
if (!user) {
goto("/");
}
};
const isModified = (
bio: string,
display_name: string,