- variables.css: tighter color palette, modern radius scale (6/8/12/16px), refined shadows, added --radius-xs/xl/full, --bg-elevated tokens - base.css: thinner 5px scrollbar with full-radius thumb, improved input focus with box-shadow ring, line-height 1.5 - AppShell: resize handle 4px→1px with invisible 6px grab zone via ::after, empty state polish (subtle icon, lift animation on CTA) - AccountSwitcher: square avatars → circular (border-radius: 50%), active state uses accent ring (box-shadow double border) instead of bg fill - FolderTreeItem: accent left-bar indicator on active item via ::before, accent-muted background on active, folder names default to text-secondary (hover → text-primary), folder header removed uppercase for email - FolderTree: removed uppercase from account email label - MessageListItem: slightly larger subject/snippet font sizes, sender defaults to text-secondary - MessageHeader: word-break: break-all → overflow-wrap: anywhere, more padding, badge borders added, flagged badge refined - StatusBar: explicit height via CSS variable, flex-shrink: 0 - AddAccountDialog: backdrop-filter blur, border-radius xl, form label uppercase style, submit button lift animation - SettingsView: more padding, border on account items, section h2 refined Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
240 lines
5.4 KiB
Vue
240 lines
5.4 KiB
Vue
<script setup lang="ts">
|
|
import { useRouter } from 'vue-router'
|
|
import { useAccountsStore } from '../stores/accounts.store'
|
|
import { useSettingsStore, SWIPE_ACTION_LABELS, type SwipeAction } from '../stores/settings.store'
|
|
|
|
const router = useRouter()
|
|
const accountsStore = useAccountsStore()
|
|
const settingsStore = useSettingsStore()
|
|
|
|
const swipeOptions: SwipeAction[] = ['delete', 'toggleRead', 'toggleFlag', 'none']
|
|
</script>
|
|
|
|
<template>
|
|
<div class="settings-view">
|
|
<div class="settings-header">
|
|
<button class="back-btn" @click="router.push('/')">
|
|
← Назад
|
|
</button>
|
|
<h1>Настройки</h1>
|
|
</div>
|
|
|
|
<div class="settings-content">
|
|
<!-- Аккаунты -->
|
|
<section>
|
|
<h2>Аккаунты</h2>
|
|
<div v-for="account in accountsStore.accounts" :key="account.id" class="account-item">
|
|
<span class="account-email">{{ account.email }}</span>
|
|
<span class="account-type">{{ account.type }}</span>
|
|
<button class="remove-btn" @click="accountsStore.removeAccount(account.id)">
|
|
Удалить
|
|
</button>
|
|
</div>
|
|
<p v-if="accountsStore.accounts.length === 0" class="empty-text">
|
|
Нет настроенных аккаунтов
|
|
</p>
|
|
</section>
|
|
|
|
<!-- Жесты -->
|
|
<section>
|
|
<h2>Жесты</h2>
|
|
<p class="section-desc">Настройте действия при свайпе по письму</p>
|
|
|
|
<div class="swipe-preview">
|
|
<div class="swipe-demo swipe-left">
|
|
<span class="swipe-arrow">←</span>
|
|
<span>Свайп влево</span>
|
|
</div>
|
|
<div class="swipe-demo swipe-right">
|
|
<span>Свайп вправо</span>
|
|
<span class="swipe-arrow">→</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="setting-row">
|
|
<label class="setting-label">
|
|
<span class="swipe-dir">← Свайп влево</span>
|
|
</label>
|
|
<select v-model="settingsStore.swipeLeftAction" class="setting-select">
|
|
<option v-for="opt in swipeOptions" :key="opt" :value="opt">
|
|
{{ SWIPE_ACTION_LABELS[opt] }}
|
|
</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="setting-row">
|
|
<label class="setting-label">
|
|
<span class="swipe-dir">→ Свайп вправо</span>
|
|
</label>
|
|
<select v-model="settingsStore.swipeRightAction" class="setting-select">
|
|
<option v-for="opt in swipeOptions" :key="opt" :value="opt">
|
|
{{ SWIPE_ACTION_LABELS[opt] }}
|
|
</option>
|
|
</select>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.settings-view {
|
|
height: 100vh;
|
|
background: var(--bg-primary);
|
|
padding: 28px 32px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.settings-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 14px;
|
|
margin-bottom: 32px;
|
|
}
|
|
|
|
.settings-header h1 {
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.back-btn {
|
|
padding: 6px 12px;
|
|
border-radius: var(--radius-sm);
|
|
background: var(--bg-tertiary);
|
|
font-size: 12px;
|
|
color: var(--text-secondary);
|
|
transition: background var(--transition-fast), color var(--transition-fast);
|
|
}
|
|
|
|
.back-btn:hover {
|
|
background: var(--bg-hover);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.settings-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 36px;
|
|
max-width: 500px;
|
|
}
|
|
|
|
.settings-content h2 {
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
margin-bottom: 12px;
|
|
color: var(--text-muted);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.8px;
|
|
}
|
|
|
|
.section-desc {
|
|
font-size: 12px;
|
|
color: var(--text-muted);
|
|
margin-bottom: 14px;
|
|
}
|
|
|
|
/* Аккаунты */
|
|
.account-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 11px 14px;
|
|
border-radius: var(--radius-md);
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border);
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.account-email {
|
|
flex: 1;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.account-type {
|
|
color: var(--text-muted);
|
|
font-size: 10px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.remove-btn {
|
|
color: var(--danger);
|
|
padding: 4px 10px;
|
|
border-radius: var(--radius-sm);
|
|
font-size: 12px;
|
|
transition: background var(--transition-fast);
|
|
}
|
|
|
|
.remove-btn:hover {
|
|
background: rgba(244, 71, 71, 0.15);
|
|
}
|
|
|
|
.empty-text {
|
|
color: var(--text-muted);
|
|
font-size: 13px;
|
|
}
|
|
|
|
/* Жесты */
|
|
.swipe-preview {
|
|
display: flex;
|
|
gap: 8px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.swipe-demo {
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
padding: 10px 14px;
|
|
border-radius: var(--radius-md);
|
|
font-size: 12px;
|
|
color: var(--text-muted);
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border);
|
|
}
|
|
|
|
.swipe-arrow {
|
|
font-size: 16px;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.setting-row {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 10px 12px;
|
|
border-radius: var(--radius-sm);
|
|
background: var(--bg-secondary);
|
|
margin-bottom: 8px;
|
|
gap: 12px;
|
|
}
|
|
|
|
.setting-label {
|
|
font-size: 13px;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.swipe-dir {
|
|
font-family: var(--font-mono);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.setting-select {
|
|
background: var(--bg-input);
|
|
color: var(--text-primary);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
padding: 5px 10px;
|
|
font-size: 12px;
|
|
cursor: pointer;
|
|
min-width: 200px;
|
|
}
|
|
|
|
.setting-select:focus {
|
|
outline: none;
|
|
border-color: var(--accent);
|
|
}
|
|
</style>
|