feat: Settings uses the width of a wide screen: groups sit in two columns, each narrow enough that a row's control stays near its name (M503 #5595)
release / govulncheck (push) Successful in 15s
release / web (push) Successful in 1m24s
release / go (push) Successful in 1m41s
release / integration (push) Successful in 5m13s
release / android (push) Successful in 5m15s
release / Build signed APK (releases and dev) (push) Successful in 5m25s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 26s
release / Verify release artifacts (tag releases only) (push) Skipped
release / govulncheck (push) Successful in 15s
release / web (push) Successful in 1m24s
release / go (push) Successful in 1m41s
release / integration (push) Successful in 5m13s
release / android (push) Successful in 5m15s
release / Build signed APK (releases and dev) (push) Successful in 5m25s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 26s
release / Verify release artifacts (tag releases only) (push) Skipped
The content was capped at max-w-3xl, so a wide window showed one narrow strip and a lot of empty space. SettingsColumns lays a page's groups out as one column on a phone or narrow window and two side by side from xl up; the page cap moves to 100rem so the columns don't stretch on a very wide screen. - Account: Android app, Profile and Password, with Signed-in devices beside. - Playback: "Between tracks" (crossfade) beside "Volume leveling". - Connections: ListenBrainz beside Subsonic apps. - Appearance, Notifications, About: one column's width. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<script lang="ts">
|
||||
import SettingsColumns from '#lib/components/settings/SettingsColumns.svelte';
|
||||
import { onMount } from 'svelte';
|
||||
import { useQueryClient } from '@tanstack/svelte-query';
|
||||
import { pageTitle } from '#lib/branding.js';
|
||||
@@ -103,89 +104,94 @@
|
||||
|
||||
<svelte:head><title>{pageTitle('Settings · Account')}</title></svelte:head>
|
||||
|
||||
<MobileAppDownload />
|
||||
<SettingsColumns>
|
||||
{#snippet main()}
|
||||
<MobileAppDownload />
|
||||
|
||||
<form onsubmit={onSaveProfile}>
|
||||
<SettingsGroup title="Profile" id="profile">
|
||||
{#if loadFailed}
|
||||
<div class="px-4 py-3 text-sm text-text-secondary">
|
||||
Couldn't load your profile.
|
||||
<button type="button" class="underline hover:text-text-primary" onclick={loadProfile}>Try again</button>
|
||||
</div>
|
||||
{:else}
|
||||
<SettingRow label="Username">
|
||||
<span class="text-sm text-text-secondary">{stored?.username ?? '…'}</span>
|
||||
</SettingRow>
|
||||
<SettingRow label="Display name" hint="Shown in place of your username." for="profile-displayname">
|
||||
<input
|
||||
id="profile-displayname"
|
||||
type="text"
|
||||
maxlength="64"
|
||||
disabled={!stored}
|
||||
bind:value={displayName}
|
||||
class={input}
|
||||
/>
|
||||
</SettingRow>
|
||||
<SettingRow label="Email" hint="For password resets and email notifications." for="profile-email">
|
||||
<input
|
||||
id="profile-email"
|
||||
type="email"
|
||||
autocomplete="email"
|
||||
disabled={!stored}
|
||||
bind:value={email}
|
||||
class={input}
|
||||
/>
|
||||
</SettingRow>
|
||||
<div class="flex justify-end px-4 py-3">
|
||||
<button type="submit" disabled={!dirty || profileSaving} class={primary}>
|
||||
{profileSaving ? 'Saving…' : 'Save profile'}
|
||||
</button>
|
||||
</div>
|
||||
{/if}
|
||||
</SettingsGroup>
|
||||
</form>
|
||||
<form onsubmit={onSaveProfile}>
|
||||
<SettingsGroup title="Profile" id="profile">
|
||||
{#if loadFailed}
|
||||
<div class="px-4 py-3 text-sm text-text-secondary">
|
||||
Couldn't load your profile.
|
||||
<button type="button" class="underline hover:text-text-primary" onclick={loadProfile}>Try again</button>
|
||||
</div>
|
||||
{:else}
|
||||
<SettingRow label="Username">
|
||||
<span class="text-sm text-text-secondary">{stored?.username ?? '…'}</span>
|
||||
</SettingRow>
|
||||
<SettingRow label="Display name" hint="Shown in place of your username." for="profile-displayname">
|
||||
<input
|
||||
id="profile-displayname"
|
||||
type="text"
|
||||
maxlength="64"
|
||||
disabled={!stored}
|
||||
bind:value={displayName}
|
||||
class={input}
|
||||
/>
|
||||
</SettingRow>
|
||||
<SettingRow label="Email" hint="For password resets and email notifications." for="profile-email">
|
||||
<input
|
||||
id="profile-email"
|
||||
type="email"
|
||||
autocomplete="email"
|
||||
disabled={!stored}
|
||||
bind:value={email}
|
||||
class={input}
|
||||
/>
|
||||
</SettingRow>
|
||||
<div class="flex justify-end px-4 py-3">
|
||||
<button type="submit" disabled={!dirty || profileSaving} class={primary}>
|
||||
{profileSaving ? 'Saving…' : 'Save profile'}
|
||||
</button>
|
||||
</div>
|
||||
{/if}
|
||||
</SettingsGroup>
|
||||
</form>
|
||||
|
||||
<form onsubmit={onSavePassword}>
|
||||
<SettingsGroup title="Password" hint="Changing it signs out your other devices.">
|
||||
<SettingRow label="Current password" for="password-current">
|
||||
<input
|
||||
id="password-current"
|
||||
type="password"
|
||||
required
|
||||
minlength="8"
|
||||
autocomplete="current-password"
|
||||
bind:value={current}
|
||||
class={input}
|
||||
/>
|
||||
</SettingRow>
|
||||
<SettingRow label="New password" hint="At least 8 characters." for="password-new">
|
||||
<input
|
||||
id="password-new"
|
||||
type="password"
|
||||
required
|
||||
minlength="8"
|
||||
autocomplete="new-password"
|
||||
bind:value={next}
|
||||
class={input}
|
||||
/>
|
||||
</SettingRow>
|
||||
<SettingRow label="Confirm new password" for="password-confirm">
|
||||
<input
|
||||
id="password-confirm"
|
||||
type="password"
|
||||
required
|
||||
minlength="8"
|
||||
autocomplete="new-password"
|
||||
bind:value={confirm}
|
||||
class={input}
|
||||
/>
|
||||
</SettingRow>
|
||||
<div class="flex justify-end px-4 py-3">
|
||||
<button type="submit" disabled={passwordSaving || !current || !next || !confirm} class={primary}>
|
||||
{passwordSaving ? 'Saving…' : 'Change password'}
|
||||
</button>
|
||||
</div>
|
||||
</SettingsGroup>
|
||||
</form>
|
||||
|
||||
<ActiveSessions />
|
||||
<form onsubmit={onSavePassword}>
|
||||
<SettingsGroup title="Password" hint="Changing it signs out your other devices.">
|
||||
<SettingRow label="Current password" for="password-current">
|
||||
<input
|
||||
id="password-current"
|
||||
type="password"
|
||||
required
|
||||
minlength="8"
|
||||
autocomplete="current-password"
|
||||
bind:value={current}
|
||||
class={input}
|
||||
/>
|
||||
</SettingRow>
|
||||
<SettingRow label="New password" hint="At least 8 characters." for="password-new">
|
||||
<input
|
||||
id="password-new"
|
||||
type="password"
|
||||
required
|
||||
minlength="8"
|
||||
autocomplete="new-password"
|
||||
bind:value={next}
|
||||
class={input}
|
||||
/>
|
||||
</SettingRow>
|
||||
<SettingRow label="Confirm new password" for="password-confirm">
|
||||
<input
|
||||
id="password-confirm"
|
||||
type="password"
|
||||
required
|
||||
minlength="8"
|
||||
autocomplete="new-password"
|
||||
bind:value={confirm}
|
||||
class={input}
|
||||
/>
|
||||
</SettingRow>
|
||||
<div class="flex justify-end px-4 py-3">
|
||||
<button type="submit" disabled={passwordSaving || !current || !next || !confirm} class={primary}>
|
||||
{passwordSaving ? 'Saving…' : 'Change password'}
|
||||
</button>
|
||||
</div>
|
||||
</SettingsGroup>
|
||||
</form>
|
||||
{/snippet}
|
||||
{#snippet side()}
|
||||
<ActiveSessions />
|
||||
{/snippet}
|
||||
</SettingsColumns>
|
||||
|
||||
Reference in New Issue
Block a user