This repository has been archived on 2024-01-12. You can view files and clone it, but cannot push or open issues or pull requests.
4 changed files with
52 additions and
1 deletions
|
|
|
@ -7,6 +7,7 @@
|
|
|
|
|
import {loginStore, profileStore, type LoginStore, type ProfileData} from "./stores/login";
|
|
|
|
|
|
|
|
|
|
loginStore.subscribe((value: LoginStore) => {
|
|
|
|
|
console.error("Change login", value);
|
|
|
|
|
getMe();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -100,7 +100,9 @@
|
|
|
|
|
<span class="oauth-picture-separator">
|
|
|
|
|
<MoreHorizontal />
|
|
|
|
|
</span>
|
|
|
|
|
<img src={$profileStore.icon} alt="" />
|
|
|
|
|
{#if $profileStore}
|
|
|
|
|
<img src={$profileStore.icon} alt="" />
|
|
|
|
|
{/if}
|
|
|
|
|
</div>
|
|
|
|
|
<h3 class="oauth-subtext">An external application</h3>
|
|
|
|
|
<h2 class="oauth-title">{app.app_name}</h2>
|
|
|
|
|
|
|
|
@ -17,6 +17,53 @@
|
|
|
|
|
<div class="settings-content">
|
|
|
|
|
{#if $profileStore}
|
|
|
|
|
<h1>Settings</h1>
|
|
|
|
|
<form>
|
|
|
|
|
<h2>Email</h2>
|
|
|
|
|
<div>
|
|
|
|
|
<span>{$profileStore.email}</span>
|
|
|
|
|
{#if $profileStore.email_verified}
|
|
|
|
|
<span> - Verified</span>
|
|
|
|
|
{:else}
|
|
|
|
|
<span> - Unverified</span>
|
|
|
|
|
{/if}
|
|
|
|
|
</div>
|
|
|
|
|
<section>
|
|
|
|
|
<input id="email" name="email" placeholder=" " autocomplete="email" required bind:value={inputEmail} />
|
|
|
|
|
</section>
|
|
|
|
|
<button type="submit">Change email</button>
|
|
|
|
|
</form>
|
|
|
|
|
<form>
|
|
|
|
|
<h2>Password</h2>
|
|
|
|
|
<section>
|
|
|
|
|
<label for="password">Password:</label>
|
|
|
|
|
<input id="password" name="password" placeholder=" " autocomplete="password" required bind:value={inputPassword} />
|
|
|
|
|
<label for="new-password">New Password:</label>
|
|
|
|
|
<input
|
|
|
|
|
id="new-password"
|
|
|
|
|
name="new-password"
|
|
|
|
|
placeholder=" "
|
|
|
|
|
autocomplete="new-password"
|
|
|
|
|
aria-describedby="password-constraints"
|
|
|
|
|
required
|
|
|
|
|
bind:value={inputNewPassword}
|
|
|
|
|
/>
|
|
|
|
|
<label for="repeat-password">Repeat Password:</label>
|
|
|
|
|
<input
|
|
|
|
|
id="repeat-password"
|
|
|
|
|
name="repeat-password"
|
|
|
|
|
placeholder=" "
|
|
|
|
|
autocomplete="repeat-password"
|
|
|
|
|
aria-describedby="password-constraints"
|
|
|
|
|
required
|
|
|
|
|
bind:value={inputRepeatPassword}
|
|
|
|
|
/>
|
|
|
|
|
</section>
|
|
|
|
|
<section>
|
|
|
|
|
<PasswordConstraints password={inputNewPassword} />
|
|
|
|
|
</section>
|
|
|
|
|
<button type="submit">Change password</button>
|
|
|
|
|
</form>
|
|
|
|
|
<section />
|
|
|
|
|
<section>Honestly I'm just too lazy to make this yet</section>
|
|
|
|
|
{:else}
|
|
|
|
|
<LazyDelay delayMs={500}>Loading...</LazyDelay>
|
|
|
|
|
|
|
|
@ -18,6 +18,7 @@ export const loginStore = writable<LoginStore>(
|
|
|
|
|
loginStore.subscribe(value => localStorage.setItem("login-session", JSON.stringify(value)));
|
|
|
|
|
|
|
|
|
|
export interface ProfileData {
|
|
|
|
|
email_verified: boolean;
|
|
|
|
|
icon: string;
|
|
|
|
|
display_name: string;
|
|
|
|
|
username: string;
|
|
|
|
|