feat: offer fediverse login on login page
This commit is contained in:
parent
cf424d3ae4
commit
c6484ef066
5 changed files with 83 additions and 13 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue