fix(web): minor UI refinements across header, pills, swipe, and settings

- Remove ThemeSwitcher from header (already accessible via settings)
- Increase pill padding and font size for better tap targets
- Guard non-cancelable touchmove preventDefault in SwipeAction
- Restyle settings page with grid-area layout and inline sign-out button

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-15 14:59:58 +01:00
parent 3bb2ef2759
commit b3c30738bd
4 changed files with 147 additions and 117 deletions
@@ -1,6 +1,5 @@
<script>
import ReportPicker from './ReportPicker.svelte';
import ThemeSwitcher from './ThemeSwitcher.svelte';
/**
* @type {string}
@@ -45,7 +44,6 @@
</button>
<div class="header-actions">
<ThemeSwitcher mode="cycle" />
<a href="/settings" class="settings-btn" aria-label="Settings">
<svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" />
@@ -7,14 +7,14 @@
export let visible = false;
const pills = [
{ label: 'Due', text: 'due:' },
{ label: 'Pri', text: 'priority:' },
{ label: 'Project', text: 'project:' },
{ label: 'Tag', text: '+' },
{ label: 'Recur', text: 'recur:' },
{ label: 'Scheduled', text: 'scheduled:' },
{ label: 'Wait', text: 'wait:' },
{ label: 'Until', text: 'until:' }
{ label: "Due", text: "due:" },
{ label: "Pri", text: "priority:" },
{ label: "Project", text: "project:" },
{ label: "Tag", text: "+" },
{ label: "Recur", text: "recur:" },
{ label: "Scheduled", text: "scheduled:" },
{ label: "Wait", text: "wait:" },
{ label: "Until", text: "until:" },
];
</script>
@@ -41,11 +41,11 @@
}
.pill {
padding: 0.25rem 0.625rem;
padding: 0.375rem 0.75rem;
background-color: var(--bg-tertiary);
border: 1px solid var(--border-color);
border-radius: 1rem;
font-size: var(--font-size-xs);
font-size: var(--font-size-s);
font-family: inherit;
color: var(--text-secondary);
cursor: pointer;
@@ -51,7 +51,7 @@
}
if (swiping) {
e.preventDefault();
if (e.cancelable) e.preventDefault();
// Only allow right swipe
offsetX = Math.max(0, deltaX);
}
+51 -19
View File
@@ -74,17 +74,23 @@
}
</script>
<div class="page">
<div class="container">
<div class="page-header">
<header class="settings-header">
<a href="/" class="back-link" aria-label="Back to tasks">
<svg class="back-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7" />
</svg>
</a>
<h1>Settings</h1>
</div>
{#if $authStore.isAuthenticated}
<button class="signout-btn" on:click={logout} aria-label="Sign out">
<svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1" />
</svg>
</button>
{/if}
</header>
<div class="settings-content">
<section class="section">
<h2>Theme</h2>
<ThemeSwitcher mode="full" />
@@ -126,11 +132,6 @@
{$syncStore.status === 'syncing' ? 'Syncing...' : 'Sync Now'}
</Button>
</section>
<section class="section">
<h2>Actions</h2>
<Button variant="danger" on:click={logout}>Logout</Button>
</section>
{:else}
<section class="section">
<h2>API Key Authentication</h2>
@@ -162,19 +163,23 @@
</div>
</section>
{/if}
</div>
</div>
<style>
.page-header {
.settings-header {
grid-area: header;
display: flex;
align-items: center;
gap: var(--spacing-sm);
padding-top: var(--spacing-lg);
margin-bottom: var(--spacing-md);
padding: var(--spacing-sm) var(--spacing-md);
background-color: var(--bg-primary);
border-bottom: 1px solid var(--border-color);
}
.page-header h1 {
.settings-header h1 {
flex: 1;
font-size: var(--font-size-lg);
font-weight: 600;
margin-bottom: 0;
}
@@ -190,21 +195,48 @@
}
.back-link:hover {
background-color: var(--bg-tertiary);
background-color: var(--bg-secondary);
text-decoration: none;
}
.back-icon {
.signout-btn {
display: flex;
align-items: center;
justify-content: center;
width: 44px;
height: 44px;
background: none;
border: none;
border-radius: var(--border-radius);
color: var(--text-secondary);
cursor: pointer;
transition: background-color 0.2s;
}
.signout-btn:hover {
background-color: var(--bg-secondary);
color: var(--color-danger);
}
.icon {
width: 1.25rem;
height: 1.25rem;
}
.section {
.settings-content {
grid-area: content;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
padding: var(--spacing-md);
min-height: 0;
background-color: var(--bg-primary);
}
.section {
background-color: var(--bg-secondary);
border-radius: var(--border-radius);
padding: var(--spacing-lg);
margin-bottom: var(--spacing-lg);
box-shadow: var(--shadow-sm);
}
.info-row {