refactor: Run prettier
This commit is contained in:
parent
05050fb4d0
commit
d029ff0ecd
1 changed files with 91 additions and 92 deletions
|
@ -15,105 +15,104 @@
|
||||||
<title>Account | Roll With It</title>
|
<title>Account | Roll With It</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<main class="container">
|
<h1>Account</h1>
|
||||||
<h1>Account</h1>
|
|
||||||
<section>
|
|
||||||
<form method="POST" action="?/updateAccount" use:enhance>
|
|
||||||
{#if form?.type === 'updateAccount'}
|
|
||||||
<small style="color: {form?.success ? 'green' : 'red'}">{form?.message}</small>
|
|
||||||
{/if}
|
|
||||||
<label for="username">
|
|
||||||
Username
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
name="username"
|
|
||||||
placeholder="Username"
|
|
||||||
value={form?.username ?? username}
|
|
||||||
aria-label="Email"
|
|
||||||
autocomplete="email"
|
|
||||||
required
|
|
||||||
/>
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<!-- Needed for spacing -->
|
<section>
|
||||||
<br />
|
<form method="POST" action="?/updateAccount" use:enhance>
|
||||||
|
{#if form?.type === 'updateAccount'}
|
||||||
|
<small style="color: {form?.success ? 'green' : 'red'}">{form?.message}</small>
|
||||||
|
{/if}
|
||||||
|
<label for="username">
|
||||||
|
Username
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
name="username"
|
||||||
|
placeholder="Username"
|
||||||
|
value={form?.username ?? username}
|
||||||
|
aria-label="Email"
|
||||||
|
autocomplete="email"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
|
||||||
<button type="submit">Save Changes</button>
|
<!-- Needed for spacing -->
|
||||||
</form>
|
<br />
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
<button type="submit">Save Changes</button>
|
||||||
<form method="POST" action="?/changePassword" use:enhance>
|
</form>
|
||||||
{#if form?.type === 'changePassword'}
|
</section>
|
||||||
<small style="color: {form?.success ? 'green' : 'red'}">{form.message}</small>
|
|
||||||
{/if}
|
<section>
|
||||||
<label for="current-password">
|
<form method="POST" action="?/changePassword" use:enhance>
|
||||||
Current Password
|
{#if form?.type === 'changePassword'}
|
||||||
|
<small style="color: {form?.success ? 'green' : 'red'}">{form.message}</small>
|
||||||
|
{/if}
|
||||||
|
<label for="current-password">
|
||||||
|
Current Password
|
||||||
|
<input
|
||||||
|
type="password"
|
||||||
|
name="current-password"
|
||||||
|
placeholder="Current password"
|
||||||
|
aria-label="Current Password"
|
||||||
|
autocomplete="current-password"
|
||||||
|
bind:value={currentPassword}
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="grid">
|
||||||
|
<label for="new-password">
|
||||||
|
New Password
|
||||||
<input
|
<input
|
||||||
type="password"
|
type="password"
|
||||||
name="current-password"
|
name="new-password"
|
||||||
placeholder="Current password"
|
placeholder="Leave empty to keep your current password"
|
||||||
aria-label="Current Password"
|
aria-label="New Password"
|
||||||
autocomplete="current-password"
|
autocomplete="new-password"
|
||||||
bind:value={currentPassword}
|
bind:value={newPassword}
|
||||||
|
aria-invalid={newPassword.length === 0 ? null : newPassword.length < 8 ? true : false}
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
|
<label for="confirm-password">
|
||||||
|
Confirm New Password
|
||||||
|
<input
|
||||||
|
type="password"
|
||||||
|
name="confirm-password"
|
||||||
|
placeholder="Confirm your new password"
|
||||||
|
aria-label="Confirm Password"
|
||||||
|
autocomplete="new-password"
|
||||||
|
bind:value={confirmPassword}
|
||||||
|
aria-invalid={confirmPassword.length === 0
|
||||||
|
? null
|
||||||
|
: newPassword !== confirmPassword
|
||||||
|
? true
|
||||||
|
: false}
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="grid">
|
<button
|
||||||
<label for="new-password">
|
type="submit"
|
||||||
New Password
|
disabled={currentPassword.length === 0 ||
|
||||||
<input
|
newPassword.length < 8 ||
|
||||||
type="password"
|
newPassword !== confirmPassword
|
||||||
name="new-password"
|
? true
|
||||||
placeholder="Leave empty to keep your current password"
|
: false}
|
||||||
aria-label="New Password"
|
>
|
||||||
autocomplete="new-password"
|
Change Password
|
||||||
bind:value={newPassword}
|
</button>
|
||||||
aria-invalid={newPassword.length === 0 ? null : newPassword.length < 8 ? true : false}
|
|
||||||
required
|
|
||||||
/>
|
|
||||||
</label>
|
|
||||||
<label for="confirm-password">
|
|
||||||
Confirm New Password
|
|
||||||
<input
|
|
||||||
type="password"
|
|
||||||
name="confirm-password"
|
|
||||||
placeholder="Confirm your new password"
|
|
||||||
aria-label="Confirm Password"
|
|
||||||
autocomplete="new-password"
|
|
||||||
bind:value={confirmPassword}
|
|
||||||
aria-invalid={confirmPassword.length === 0
|
|
||||||
? null
|
|
||||||
: newPassword !== confirmPassword
|
|
||||||
? true
|
|
||||||
: false}
|
|
||||||
required
|
|
||||||
/>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<button
|
|
||||||
type="submit"
|
|
||||||
disabled={currentPassword.length === 0 ||
|
|
||||||
newPassword.length < 8 ||
|
|
||||||
newPassword !== confirmPassword
|
|
||||||
? true
|
|
||||||
: false}
|
|
||||||
>
|
|
||||||
Change Password
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<hgroup>
|
|
||||||
<h3>Billing Information</h3>
|
|
||||||
<h4>Thank you for your support!</h4>
|
|
||||||
</hgroup>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<form method="POST" action="?/signout">
|
|
||||||
<button class="secondary" type="submit">Logout</button>
|
|
||||||
</form>
|
</form>
|
||||||
</main>
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<hgroup>
|
||||||
|
<h3>Billing Information</h3>
|
||||||
|
<h4>Thank you for your support!</h4>
|
||||||
|
</hgroup>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<form method="POST" action="?/signout">
|
||||||
|
<button class="secondary" type="submit">Logout</button>
|
||||||
|
</form>
|
||||||
|
|
Loading…
Reference in a new issue