1200 lines
36 KiB
Vue
1200 lines
36 KiB
Vue
<script setup lang="ts">
|
||
import { ref, onMounted } from 'vue'
|
||
import { useRouter } from 'vue-router'
|
||
import { useAccountsStore } from '../stores/accounts.store'
|
||
import {
|
||
useSettingsStore,
|
||
SWIPE_ACTION_LABELS,
|
||
ACCENT_QUICK_PICKS,
|
||
AUTO_CHECK_INTERVALS,
|
||
MATERIAL3_SEED_PRESETS,
|
||
type SwipeAction
|
||
} from '../stores/settings.store'
|
||
import CustomSelect from '../components/CustomSelect.vue'
|
||
import ColorPicker from '../components/ColorPicker.vue'
|
||
import Switch from '../components/Switch.vue'
|
||
import AppIcon from '../components/AppIcon.vue'
|
||
import EditAccountDialog from '../components/accounts/EditAccountDialog.vue'
|
||
import { useUpdaterStore } from '../stores/updater.store'
|
||
import type { AccountConfig } from '@shared/types/account'
|
||
import type { MeetingReminderSettings } from '@shared/types/calendar'
|
||
|
||
const router = useRouter()
|
||
const accountsStore = useAccountsStore()
|
||
const settingsStore = useSettingsStore()
|
||
|
||
const editingAccount = ref<AccountConfig | null>(null)
|
||
const updaterStore = useUpdaterStore()
|
||
const changelogOpen = ref(false)
|
||
const appVersion = __APP_VERSION__
|
||
|
||
const swipeOptions: { value: SwipeAction; label: string }[] = (
|
||
['delete', 'toggleRead', 'toggleFlag', 'none'] as SwipeAction[]
|
||
).map((v) => ({ value: v, label: SWIPE_ACTION_LABELS[v] }))
|
||
|
||
// Настройки напоминаний живут в main: там работает планировщик
|
||
const reminderSettings = ref<MeetingReminderSettings | null>(null)
|
||
|
||
onMounted(async () => {
|
||
reminderSettings.value = await window.api.invoke('reminder:getSettings')
|
||
})
|
||
|
||
async function updateReminderSettings(patch: Partial<MeetingReminderSettings>): Promise<void> {
|
||
if (!reminderSettings.value) return
|
||
const next = { ...reminderSettings.value, ...patch }
|
||
reminderSettings.value = next
|
||
await window.api.invoke('reminder:setSettings', next)
|
||
}
|
||
|
||
async function chooseDownloadFolder(): Promise<void> {
|
||
const picked = await window.api.invoke('app:chooseFolder')
|
||
if (picked) settingsStore.downloadFolder = picked
|
||
}
|
||
|
||
async function resetDownloadFolder(): Promise<void> {
|
||
settingsStore.downloadFolder = await window.api.invoke('app:getDownloadsFolder')
|
||
}
|
||
|
||
function folderDisplayName(path: string): string {
|
||
if (!path) return ''
|
||
const parts = path.replace(/\\/g, '/').split('/').filter(Boolean)
|
||
return parts.length > 2 ? '…/' + parts.slice(-2).join('/') : path
|
||
}
|
||
</script>
|
||
|
||
<template>
|
||
<div class="settings-view">
|
||
<div class="settings-panel">
|
||
|
||
<!-- Шапка панели — как заголовок письма -->
|
||
<div class="panel-header">
|
||
<button class="back-btn" @click="router.push('/')">
|
||
<AppIcon name="chevron-right" :size="11" class="back-icon" />
|
||
Назад
|
||
</button>
|
||
<h1 class="panel-title">Настройки</h1>
|
||
</div>
|
||
|
||
<!-- Секции в стиле header-details -->
|
||
<div class="sections">
|
||
|
||
<!-- Аккаунты -->
|
||
<div class="section">
|
||
<div class="section-label">Аккаунты</div>
|
||
<div class="section-body">
|
||
<template v-if="accountsStore.accounts.length > 0">
|
||
<div
|
||
v-for="account in accountsStore.accounts"
|
||
:key="account.id"
|
||
class="row account-row"
|
||
>
|
||
<div class="account-avatar">{{ account.email[0].toUpperCase() }}</div>
|
||
<div class="account-meta">
|
||
<span class="account-email">{{ account.email }}</span>
|
||
<span class="account-type">{{ account.type }}</span>
|
||
</div>
|
||
<div class="row-actions">
|
||
<button class="action-btn" @click="editingAccount = account">Изменить</button>
|
||
<button class="action-btn danger" @click="accountsStore.removeAccount(account.id)">Удалить</button>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
<div v-else class="row">
|
||
<span class="col-label">Почта</span>
|
||
<span class="col-value muted">Нет настроенных аккаунтов</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Акцентный цвет -->
|
||
<div class="section">
|
||
<div class="section-label">Внешний вид</div>
|
||
<div class="section-body">
|
||
<div class="row">
|
||
<span class="col-label">Дизайн</span>
|
||
<div class="col-value design-row-content">
|
||
<span class="design-name">{{ settingsStore.designSystem === 'material3' ? 'Material 3' : 'Liquid Glass' }}</span>
|
||
<Switch
|
||
:model-value="settingsStore.designSystem === 'material3'"
|
||
@update:model-value="(v) => settingsStore.designSystem = v ? 'material3' : 'liquid-glass'"
|
||
/>
|
||
</div>
|
||
</div>
|
||
<div v-if="settingsStore.designSystem === 'material3'" class="row">
|
||
<span class="col-label">M3 палитра</span>
|
||
<div class="col-value color-row-content">
|
||
<span
|
||
class="color-dot"
|
||
:style="{ background: settingsStore.material3Seed }"
|
||
v-tooltip="settingsStore.material3Seed"
|
||
/>
|
||
<div class="quick-picks">
|
||
<button
|
||
v-for="hex in MATERIAL3_SEED_PRESETS"
|
||
:key="hex"
|
||
class="quick-dot"
|
||
:class="{ active: settingsStore.material3Seed.toLowerCase() === hex.toLowerCase() }"
|
||
:style="{ '--dot-color': hex }"
|
||
v-tooltip="hex"
|
||
@click="settingsStore.material3Seed = hex"
|
||
/>
|
||
</div>
|
||
<ColorPicker v-model="settingsStore.material3Seed" />
|
||
</div>
|
||
</div>
|
||
<div v-if="settingsStore.designSystem === 'liquid-glass'" class="row">
|
||
<span class="col-label">Акцент</span>
|
||
<div class="col-value color-row-content">
|
||
<span
|
||
class="color-dot"
|
||
:style="{ background: settingsStore.accentColor }"
|
||
v-tooltip="settingsStore.accentColor"
|
||
/>
|
||
<div class="quick-picks">
|
||
<button
|
||
v-for="hex in ACCENT_QUICK_PICKS"
|
||
:key="hex"
|
||
class="quick-dot"
|
||
:class="{ active: settingsStore.accentColor.toLowerCase() === hex.toLowerCase() }"
|
||
:style="{ '--dot-color': hex }"
|
||
v-tooltip="hex"
|
||
@click="settingsStore.accentColor = hex"
|
||
/>
|
||
</div>
|
||
<ColorPicker v-model="settingsStore.accentColor" />
|
||
</div>
|
||
</div>
|
||
<div class="row scale-full-row">
|
||
<span class="col-label">Масштаб</span>
|
||
<div class="col-value scale-content">
|
||
<input
|
||
type="range"
|
||
class="scale-slider"
|
||
min="50"
|
||
max="200"
|
||
step="5"
|
||
:value="Math.round(settingsStore.uiScale * 100)"
|
||
:style="{ '--pct': ((settingsStore.uiScale * 100 - 50) / 150 * 100) + '%' }"
|
||
@input="settingsStore.uiScale = ($event.target as HTMLInputElement).valueAsNumber / 100"
|
||
/>
|
||
<div class="scale-right">
|
||
<span class="scale-val">{{ Math.round(settingsStore.uiScale * 100) }}%</span>
|
||
<button
|
||
v-if="settingsStore.uiScale !== 1"
|
||
class="scale-reset"
|
||
v-tooltip="'Сбросить'"
|
||
@click="settingsStore.uiScale = 1"
|
||
>↺</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Уведомления -->
|
||
<div class="section">
|
||
<div class="section-label">Уведомления</div>
|
||
<div class="section-body">
|
||
<div class="row">
|
||
<span class="col-label">Проверка</span>
|
||
<div class="col-value">
|
||
<CustomSelect v-model="settingsStore.autoCheckInterval" :options="AUTO_CHECK_INTERVALS" />
|
||
</div>
|
||
</div>
|
||
<template v-if="reminderSettings">
|
||
<div class="row">
|
||
<span class="col-label">Встречи</span>
|
||
<div class="col-value design-row-content">
|
||
<span class="design-name">За 15 минут и в начале</span>
|
||
<Switch
|
||
:model-value="reminderSettings.enabled"
|
||
@update:model-value="(v) => updateReminderSettings({ enabled: v })"
|
||
/>
|
||
</div>
|
||
</div>
|
||
<div v-if="reminderSettings.enabled" class="row">
|
||
<span class="col-label">Отменённые</span>
|
||
<div class="col-value design-row-content">
|
||
<span class="design-name">Не напоминать</span>
|
||
<Switch
|
||
:model-value="reminderSettings.skipCancelled"
|
||
@update:model-value="(v) => updateReminderSettings({ skipCancelled: v })"
|
||
/>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Вложения -->
|
||
<div class="section">
|
||
<div class="section-label">Вложения</div>
|
||
<div class="section-body">
|
||
<div class="row">
|
||
<span class="col-label">Папка</span>
|
||
<div class="col-value folder-value">
|
||
<div class="folder-path-wrap">
|
||
<AppIcon name="folder" :size="13" class="folder-icon" />
|
||
<span class="folder-path" v-tooltip="settingsStore.downloadFolder">
|
||
{{ folderDisplayName(settingsStore.downloadFolder) || '…' }}
|
||
</span>
|
||
</div>
|
||
<div class="row-actions">
|
||
<button class="action-btn" @click="chooseDownloadFolder">Изменить</button>
|
||
<button class="action-btn" v-tooltip="'Сбросить в Downloads'" @click="resetDownloadFolder">↺</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Жесты -->
|
||
<div class="section">
|
||
<div class="section-label">Жесты</div>
|
||
<div class="section-body">
|
||
<div class="row">
|
||
<span class="col-label">← Влево</span>
|
||
<div class="col-value">
|
||
<CustomSelect v-model="settingsStore.swipeLeftAction" :options="swipeOptions" />
|
||
</div>
|
||
</div>
|
||
<div class="row">
|
||
<span class="col-label">→ Вправо</span>
|
||
<div class="col-value">
|
||
<CustomSelect v-model="settingsStore.swipeRightAction" :options="swipeOptions" />
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Обновления -->
|
||
<div class="section">
|
||
<div class="section-label">Приложение</div>
|
||
<div class="section-body">
|
||
|
||
<!-- Текущая версия + статус + кнопка -->
|
||
<div class="row update-main-row">
|
||
<span class="col-label">Версия</span>
|
||
<div class="col-value update-version-line">
|
||
<span class="ver-chip">v{{ appVersion }}</span>
|
||
<Transition name="status-fade" mode="out-in">
|
||
<span v-if="updaterStore.upToDate && !updaterStore.available" key="ok" class="status-chip status-ok">
|
||
✓ актуальная
|
||
</span>
|
||
<span v-else-if="updaterStore.available" key="new" class="status-chip status-new">
|
||
↑ {{ updaterStore.version }}
|
||
</span>
|
||
</Transition>
|
||
</div>
|
||
<button
|
||
class="action-btn update-check-btn"
|
||
:disabled="updaterStore.checking"
|
||
@click="updaterStore.check()"
|
||
>{{ updaterStore.checking ? 'Проверка…' : 'Проверить' }}</button>
|
||
</div>
|
||
|
||
<!-- Ошибка -->
|
||
<div v-if="updaterStore.error" class="row">
|
||
<span class="col-label"></span>
|
||
<span class="col-value update-error">{{ updaterStore.error }}</span>
|
||
</div>
|
||
|
||
<!-- Доступно обновление -->
|
||
<div v-if="updaterStore.available && !updaterStore.downloaded && !updaterStore.downloading" class="row">
|
||
<span class="col-label"></span>
|
||
<div class="col-value update-action-line">
|
||
<span class="update-desc">Новая версия {{ updaterStore.version }} готова к загрузке</span>
|
||
<button class="action-btn accent-btn" @click="updaterStore.download()">Скачать</button>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Что нового -->
|
||
<div v-if="updaterStore.available && updaterStore.notes" class="row changelog-row">
|
||
<span class="col-label"></span>
|
||
<div class="col-value changelog-wrap">
|
||
<button class="changelog-toggle" @click="changelogOpen = !changelogOpen">
|
||
<span>Что нового</span>
|
||
<span class="changelog-arrow" :class="{ open: changelogOpen }">›</span>
|
||
</button>
|
||
<Transition name="changelog">
|
||
<div v-if="changelogOpen" class="changelog-body">
|
||
<pre class="changelog-text">{{ updaterStore.notes }}</pre>
|
||
</div>
|
||
</Transition>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Прогресс загрузки -->
|
||
<div v-if="updaterStore.downloading" class="row">
|
||
<span class="col-label"></span>
|
||
<div class="col-value update-progress-row">
|
||
<div class="update-progress-track">
|
||
<div class="update-progress-fill" :style="{ width: updaterStore.percent + '%' }" />
|
||
</div>
|
||
<span class="update-pct">{{ updaterStore.percent }}%</span>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Готово к установке -->
|
||
<div v-if="updaterStore.downloaded" class="row">
|
||
<span class="col-label"></span>
|
||
<div class="col-value update-action-line">
|
||
<span class="update-desc">Обновление загружено</span>
|
||
<button class="action-btn accent-btn" @click="updaterStore.install()">Установить и перезапустить</button>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<EditAccountDialog
|
||
v-if="editingAccount"
|
||
:account="editingAccount"
|
||
@close="editingAccount = null"
|
||
/>
|
||
</div>
|
||
</template>
|
||
|
||
<style scoped>
|
||
/* ── Центрирование ───────────────────────────────────────────────────────── */
|
||
|
||
.settings-view {
|
||
height: 100vh;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding: 20px;
|
||
overflow-y: auto;
|
||
}
|
||
|
||
/* ── Главная панель — стиль MessageHeader ────────────────────────────────── */
|
||
|
||
.settings-panel {
|
||
width: 100%;
|
||
max-width: 520px;
|
||
max-height: calc(100vh - 40px);
|
||
overflow-y: auto;
|
||
scrollbar-width: none;
|
||
|
||
border-radius: 16px;
|
||
border: 1px solid rgba(255, 255, 255, 0.12);
|
||
background:
|
||
linear-gradient(145deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.03) 100%),
|
||
rgba(12, 12, 20, 0.82);
|
||
backdrop-filter: blur(32px) saturate(2.0);
|
||
-webkit-backdrop-filter: blur(32px) saturate(2.0);
|
||
box-shadow:
|
||
inset 0 1px 0 rgba(255, 255, 255, 0.18),
|
||
0 8px 40px rgba(0, 0, 0, 0.45),
|
||
0 2px 10px rgba(0, 0, 0, 0.22);
|
||
}
|
||
|
||
.settings-panel::-webkit-scrollbar { display: none; }
|
||
|
||
/* ── Заголовок панели — стиль .subject из MessageHeader ─────────────────── */
|
||
|
||
.panel-header {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12px;
|
||
padding: 18px 20px 16px;
|
||
border-bottom: 1px solid rgba(255, 255, 255, 0.07);
|
||
}
|
||
|
||
.panel-title {
|
||
font-size: 17px;
|
||
font-weight: 600;
|
||
color: var(--text-primary);
|
||
letter-spacing: -0.01em;
|
||
line-height: 1;
|
||
}
|
||
|
||
.back-btn {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 3px;
|
||
padding: 5px 11px;
|
||
border-radius: var(--radius-full);
|
||
background: rgba(255, 255, 255, 0.06);
|
||
border: 1px solid rgba(255, 255, 255, 0.10);
|
||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
|
||
font-size: 12px;
|
||
font-weight: 500;
|
||
color: var(--text-secondary);
|
||
transition:
|
||
background var(--transition-fast),
|
||
color var(--transition-fast),
|
||
border-color var(--transition-fast);
|
||
}
|
||
|
||
.back-btn:hover {
|
||
background: rgba(255, 255, 255, 0.10);
|
||
border-color: rgba(255, 255, 255, 0.16);
|
||
color: var(--text-primary);
|
||
}
|
||
|
||
.back-btn:active {
|
||
transform: translateY(1px);
|
||
background: rgba(255, 255, 255, 0.04);
|
||
}
|
||
|
||
.back-icon {
|
||
transform: rotate(180deg);
|
||
opacity: 0.55;
|
||
margin-right: 1px;
|
||
}
|
||
|
||
/* ── Секции ──────────────────────────────────────────────────────────────── */
|
||
|
||
.sections {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 0;
|
||
padding: 16px 20px 20px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 16px;
|
||
}
|
||
|
||
.section-label {
|
||
font-size: 10px;
|
||
font-weight: 600;
|
||
text-transform: uppercase;
|
||
letter-spacing: 0.7px;
|
||
color: var(--text-muted);
|
||
padding: 0 2px 5px;
|
||
}
|
||
|
||
/* Внутренний блок секции — стиль .header-details из MessageHeader */
|
||
.section-body {
|
||
background: rgba(255, 255, 255, 0.055);
|
||
border: 1px solid rgba(255, 255, 255, 0.11);
|
||
border-radius: 10px;
|
||
overflow: hidden;
|
||
backdrop-filter: blur(16px);
|
||
-webkit-backdrop-filter: blur(16px);
|
||
box-shadow:
|
||
inset 0 1px 0 rgba(255, 255, 255, 0.10),
|
||
0 4px 16px rgba(0, 0, 0, 0.18);
|
||
}
|
||
|
||
/* Строки — стиль .header-row из MessageHeader */
|
||
.row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 0;
|
||
font-size: 12px;
|
||
padding: 9px 14px;
|
||
border-bottom: 1px solid rgba(255, 255, 255, 0.055);
|
||
}
|
||
|
||
.row:last-child {
|
||
border-bottom: none;
|
||
}
|
||
|
||
/* Метка слева — стиль .label из MessageHeader */
|
||
.col-label {
|
||
color: var(--text-muted);
|
||
min-width: 62px;
|
||
flex-shrink: 0;
|
||
font-size: 10px;
|
||
font-weight: 600;
|
||
text-transform: uppercase;
|
||
letter-spacing: 0.6px;
|
||
padding-top: 1px;
|
||
}
|
||
|
||
/* Значение справа — стиль .value из MessageHeader */
|
||
.col-value {
|
||
flex: 1;
|
||
color: var(--text-secondary);
|
||
display: flex;
|
||
align-items: center;
|
||
min-width: 0;
|
||
}
|
||
|
||
.col-value.muted {
|
||
color: var(--text-muted);
|
||
}
|
||
|
||
/* ── Аккаунты ────────────────────────────────────────────────────────────── */
|
||
|
||
.account-row {
|
||
min-height: 48px;
|
||
padding: 8px 14px;
|
||
align-items: center;
|
||
gap: 10px;
|
||
}
|
||
|
||
.account-avatar {
|
||
width: 30px;
|
||
height: 30px;
|
||
border-radius: 50%;
|
||
background: color-mix(in srgb, var(--accent) 16%, rgba(255, 255, 255, 0.07));
|
||
border: 1.5px solid color-mix(in srgb, var(--accent) 25%, transparent);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
font-size: 12px;
|
||
font-weight: 700;
|
||
color: var(--accent);
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.account-meta {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 1px;
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
|
||
.account-email {
|
||
font-size: 12.5px;
|
||
color: var(--text-primary);
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
|
||
.account-type {
|
||
font-size: 9.5px;
|
||
font-weight: 600;
|
||
text-transform: uppercase;
|
||
letter-spacing: 0.5px;
|
||
color: var(--text-muted);
|
||
}
|
||
|
||
.row-actions {
|
||
display: flex;
|
||
gap: 5px;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.action-btn {
|
||
font-size: 11px;
|
||
font-weight: 500;
|
||
padding: 3px 10px;
|
||
border-radius: var(--radius-full);
|
||
background: rgba(255, 255, 255, 0.06);
|
||
border: 1px solid rgba(255, 255, 255, 0.10);
|
||
color: var(--text-secondary);
|
||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
|
||
transition:
|
||
background var(--transition-fast),
|
||
color var(--transition-fast),
|
||
border-color var(--transition-fast);
|
||
}
|
||
|
||
.action-btn:hover {
|
||
background: rgba(255, 255, 255, 0.10);
|
||
border-color: rgba(255, 255, 255, 0.17);
|
||
color: var(--text-primary);
|
||
}
|
||
|
||
.action-btn.danger {
|
||
color: var(--danger);
|
||
border-color: rgba(255, 85, 85, 0.18);
|
||
background: rgba(255, 85, 85, 0.05);
|
||
}
|
||
|
||
.action-btn.danger:hover {
|
||
background: rgba(255, 85, 85, 0.12);
|
||
border-color: rgba(255, 85, 85, 0.30);
|
||
}
|
||
|
||
/* ── Дизайн-система ──────────────────────────────────────────────────────── */
|
||
|
||
.design-row-content {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
}
|
||
|
||
.design-name {
|
||
font-size: 12.5px;
|
||
color: var(--text-secondary);
|
||
}
|
||
|
||
/* ── Цвет ────────────────────────────────────────────────────────────────── */
|
||
|
||
.color-row-content {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
flex-wrap: wrap;
|
||
}
|
||
|
||
.color-dot {
|
||
width: 18px;
|
||
height: 18px;
|
||
border-radius: 50%;
|
||
flex-shrink: 0;
|
||
box-shadow:
|
||
inset 0 1px 0 rgba(255, 255, 255, 0.3),
|
||
0 1px 4px rgba(0, 0, 0, 0.4);
|
||
border: 1.5px solid rgba(255, 255, 255, 0.18);
|
||
}
|
||
|
||
.quick-picks {
|
||
display: flex;
|
||
gap: 5px;
|
||
align-items: center;
|
||
}
|
||
|
||
.quick-dot {
|
||
width: 18px;
|
||
height: 18px;
|
||
border-radius: 50%;
|
||
background: var(--dot-color);
|
||
border: 1.5px solid transparent;
|
||
cursor: pointer;
|
||
box-shadow:
|
||
0 1px 5px rgba(0, 0, 0, 0.4),
|
||
inset 0 1px 0 rgba(255, 255, 255, 0.25);
|
||
transition:
|
||
transform var(--transition-fast),
|
||
box-shadow var(--transition-fast),
|
||
border-color var(--transition-fast);
|
||
}
|
||
|
||
.quick-dot:hover {
|
||
transform: scale(1.2);
|
||
}
|
||
|
||
.quick-dot.active {
|
||
border-color: rgba(255, 255, 255, 0.80);
|
||
transform: scale(1.15);
|
||
box-shadow:
|
||
0 0 0 2px var(--dot-color),
|
||
0 2px 8px rgba(0, 0, 0, 0.45),
|
||
inset 0 1px 0 rgba(255, 255, 255, 0.3);
|
||
}
|
||
|
||
/* ── Масштаб ─────────────────────────────────────────────────────────────── */
|
||
|
||
.scale-content {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
flex: 1;
|
||
}
|
||
|
||
.scale-slider {
|
||
flex: 1;
|
||
-webkit-appearance: none;
|
||
appearance: none;
|
||
height: 3px;
|
||
border-radius: var(--radius-full);
|
||
background: rgba(255, 255, 255, 0.10);
|
||
border: none;
|
||
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
|
||
outline: none;
|
||
cursor: pointer;
|
||
padding: 0;
|
||
}
|
||
|
||
.scale-slider::-webkit-slider-runnable-track {
|
||
height: 3px;
|
||
border-radius: var(--radius-full);
|
||
background: linear-gradient(
|
||
to right,
|
||
var(--accent) var(--pct, 33%),
|
||
rgba(255, 255, 255, 0.10) var(--pct, 33%)
|
||
);
|
||
}
|
||
|
||
.scale-slider::-webkit-slider-thumb {
|
||
-webkit-appearance: none;
|
||
appearance: none;
|
||
width: 16px;
|
||
height: 16px;
|
||
border-radius: 50%;
|
||
background: #fff;
|
||
box-shadow:
|
||
inset 0 1px 0 rgba(255, 255, 255, 1),
|
||
0 2px 6px rgba(0, 0, 0, 0.45),
|
||
0 0 0 1px rgba(0, 0, 0, 0.12);
|
||
cursor: pointer;
|
||
margin-top: -6.5px;
|
||
transition: transform var(--transition-fast), box-shadow var(--transition-fast);
|
||
}
|
||
|
||
.scale-slider::-webkit-slider-thumb:hover {
|
||
transform: scale(1.2);
|
||
box-shadow:
|
||
inset 0 1px 0 rgba(255, 255, 255, 1),
|
||
0 3px 10px rgba(0, 0, 0, 0.5),
|
||
0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
|
||
}
|
||
|
||
.scale-right {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 5px;
|
||
flex-shrink: 0;
|
||
min-width: 46px;
|
||
}
|
||
|
||
.scale-val {
|
||
font-size: 11.5px;
|
||
font-weight: 600;
|
||
color: var(--text-secondary);
|
||
font-variant-numeric: tabular-nums;
|
||
text-align: right;
|
||
flex: 1;
|
||
}
|
||
|
||
.scale-reset {
|
||
font-size: 13px;
|
||
color: var(--text-muted);
|
||
line-height: 1;
|
||
transition: color var(--transition-fast), transform var(--transition-fast);
|
||
}
|
||
|
||
.scale-reset:hover {
|
||
color: var(--text-secondary);
|
||
transform: rotate(-30deg);
|
||
}
|
||
|
||
/* ── Папка ───────────────────────────────────────────────────────────────── */
|
||
|
||
.folder-value {
|
||
justify-content: space-between;
|
||
gap: 10px;
|
||
}
|
||
|
||
.folder-path-wrap {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
min-width: 0;
|
||
flex: 1;
|
||
}
|
||
|
||
.folder-icon {
|
||
color: var(--text-muted);
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.folder-path {
|
||
font-size: 11.5px;
|
||
color: var(--text-secondary);
|
||
font-family: var(--font-mono);
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
|
||
/* ── Обновления ──────────────────────────────────────────────────────────── */
|
||
|
||
.update-main-row {
|
||
align-items: center;
|
||
}
|
||
|
||
.update-version-line {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 7px;
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
|
||
.ver-chip {
|
||
font-size: 11px;
|
||
font-family: var(--font-mono);
|
||
font-weight: 600;
|
||
color: var(--text-secondary);
|
||
flex-shrink: 0;
|
||
background: rgba(255, 255, 255, 0.07);
|
||
border: 1px solid rgba(255, 255, 255, 0.12);
|
||
border-radius: var(--radius-full);
|
||
padding: 1px 8px;
|
||
}
|
||
|
||
.status-chip {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
padding: 1px 7px;
|
||
border-radius: var(--radius-full);
|
||
font-size: 10.5px;
|
||
font-weight: 600;
|
||
letter-spacing: 0.15px;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.status-ok {
|
||
background: rgba(74, 222, 128, 0.12);
|
||
color: #4ade80;
|
||
border: 1px solid rgba(74, 222, 128, 0.25);
|
||
}
|
||
|
||
.status-new {
|
||
background: color-mix(in srgb, var(--accent) 14%, transparent);
|
||
color: var(--accent);
|
||
border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
|
||
}
|
||
|
||
.status-fade-enter-active,
|
||
.status-fade-leave-active {
|
||
transition: opacity 0.25s ease, transform 0.2s ease;
|
||
}
|
||
|
||
.status-fade-enter-from,
|
||
.status-fade-leave-to {
|
||
opacity: 0;
|
||
transform: translateY(3px);
|
||
}
|
||
|
||
.update-check-btn {
|
||
flex-shrink: 0;
|
||
margin-left: 8px;
|
||
}
|
||
|
||
.update-action-line {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
|
||
.update-desc {
|
||
font-size: 11.5px;
|
||
color: var(--text-muted);
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
|
||
.accent-btn {
|
||
background: color-mix(in srgb, var(--accent) 15%, rgba(255,255,255,0.05));
|
||
border-color: color-mix(in srgb, var(--accent) 35%, transparent);
|
||
color: var(--accent);
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.accent-btn:hover {
|
||
background: color-mix(in srgb, var(--accent) 22%, rgba(255,255,255,0.07));
|
||
border-color: color-mix(in srgb, var(--accent) 50%, transparent);
|
||
}
|
||
|
||
.update-error {
|
||
font-size: 11px;
|
||
color: var(--danger, #f87171);
|
||
flex: 1;
|
||
}
|
||
|
||
.update-progress-row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
flex: 1;
|
||
}
|
||
|
||
.update-progress-track {
|
||
flex: 1;
|
||
height: 3px;
|
||
border-radius: var(--radius-full);
|
||
background: rgba(255, 255, 255, 0.10);
|
||
overflow: hidden;
|
||
}
|
||
|
||
.update-progress-fill {
|
||
height: 100%;
|
||
background: var(--accent);
|
||
border-radius: var(--radius-full);
|
||
transition: width 0.3s ease;
|
||
}
|
||
|
||
.update-pct {
|
||
font-size: 11px;
|
||
font-weight: 600;
|
||
color: var(--text-muted);
|
||
font-variant-numeric: tabular-nums;
|
||
min-width: 30px;
|
||
text-align: right;
|
||
}
|
||
|
||
.action-btn:disabled {
|
||
opacity: 0.45;
|
||
cursor: not-allowed;
|
||
}
|
||
|
||
/* ── Changelog ───────────────────────────────────────────────────────────── */
|
||
|
||
.changelog-row {
|
||
flex-direction: column;
|
||
align-items: stretch;
|
||
gap: 0;
|
||
padding: 0;
|
||
}
|
||
|
||
.changelog-wrap {
|
||
flex-direction: column;
|
||
align-items: stretch;
|
||
width: 100%;
|
||
gap: 0;
|
||
}
|
||
|
||
.changelog-toggle {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
width: 100%;
|
||
padding: 9px 14px;
|
||
padding-left: calc(62px + 14px);
|
||
font-size: 11px;
|
||
font-weight: 500;
|
||
color: var(--text-muted);
|
||
background: transparent;
|
||
border: none;
|
||
cursor: pointer;
|
||
transition: color var(--transition-fast);
|
||
text-align: left;
|
||
}
|
||
|
||
.changelog-toggle:hover {
|
||
color: var(--text-secondary);
|
||
}
|
||
|
||
.changelog-arrow {
|
||
font-size: 14px;
|
||
line-height: 1;
|
||
transition: transform 0.2s ease;
|
||
display: inline-block;
|
||
}
|
||
|
||
.changelog-arrow.open {
|
||
transform: rotate(90deg);
|
||
}
|
||
|
||
.changelog-body {
|
||
padding: 0 14px 10px calc(62px + 14px);
|
||
overflow: hidden;
|
||
}
|
||
|
||
.changelog-text {
|
||
font-size: 11px;
|
||
font-family: var(--font-mono);
|
||
color: var(--text-muted);
|
||
white-space: pre-wrap;
|
||
word-break: break-word;
|
||
line-height: 1.6;
|
||
margin: 0;
|
||
max-height: 200px;
|
||
overflow-y: auto;
|
||
scrollbar-width: thin;
|
||
scrollbar-color: rgba(255,255,255,0.12) transparent;
|
||
}
|
||
|
||
.changelog-enter-active,
|
||
.changelog-leave-active {
|
||
transition: opacity 0.2s ease, transform 0.2s ease;
|
||
}
|
||
|
||
.changelog-enter-from,
|
||
.changelog-leave-to {
|
||
opacity: 0;
|
||
transform: translateY(-4px);
|
||
}
|
||
|
||
/* ══════════════════════════════════════════════════════════════════════════
|
||
Material Design 3 — переопределения (активны только под data-design=material3)
|
||
══════════════════════════════════════════════════════════════════════════ */
|
||
|
||
html[data-design='material3'] .settings-panel {
|
||
border: 1px solid var(--md-sys-color-outline-variant);
|
||
background: var(--md-sys-color-surface-container-low);
|
||
box-shadow: var(--md-sys-elevation-2);
|
||
border-radius: var(--md-sys-shape-corner-large);
|
||
}
|
||
|
||
html[data-design='material3'] .panel-header {
|
||
border-bottom: 1px solid var(--md-sys-color-outline-variant);
|
||
}
|
||
|
||
html[data-design='material3'] .panel-title {
|
||
font-size: var(--md-sys-typescale-title-large-size);
|
||
line-height: var(--md-sys-typescale-title-large-line);
|
||
font-weight: var(--md-sys-typescale-title-large-weight);
|
||
letter-spacing: var(--md-sys-typescale-title-large-tracking);
|
||
}
|
||
|
||
html[data-design='material3'] .back-btn {
|
||
font-size: var(--md-sys-typescale-label-large-size);
|
||
font-weight: var(--md-sys-typescale-label-large-weight);
|
||
letter-spacing: var(--md-sys-typescale-label-large-tracking);
|
||
background: transparent;
|
||
border: 1px solid var(--md-sys-color-outline);
|
||
box-shadow: none;
|
||
}
|
||
|
||
html[data-design='material3'] .back-btn:hover {
|
||
background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent);
|
||
border-color: var(--md-sys-color-outline);
|
||
color: var(--md-sys-color-on-surface);
|
||
}
|
||
|
||
html[data-design='material3'] .back-btn:active {
|
||
background: color-mix(in srgb, var(--md-sys-color-on-surface) 10%, transparent);
|
||
}
|
||
|
||
/* Заголовки секций — title-medium согласно контракту типографики */
|
||
html[data-design='material3'] .section-label {
|
||
font-size: var(--md-sys-typescale-title-medium-size);
|
||
line-height: var(--md-sys-typescale-title-medium-line);
|
||
font-weight: var(--md-sys-typescale-title-medium-weight);
|
||
letter-spacing: var(--md-sys-typescale-title-medium-tracking);
|
||
text-transform: none;
|
||
color: var(--md-sys-color-on-surface);
|
||
padding-bottom: 6px;
|
||
}
|
||
|
||
html[data-design='material3'] .section-body {
|
||
background: var(--md-sys-color-surface-container);
|
||
border: 1px solid var(--md-sys-color-outline-variant);
|
||
box-shadow: none;
|
||
border-radius: var(--md-sys-shape-corner-medium);
|
||
}
|
||
|
||
html[data-design='material3'] .row {
|
||
border-bottom: 1px solid var(--md-sys-color-outline-variant);
|
||
}
|
||
|
||
/* Метки и значения строк — body-medium согласно контракту */
|
||
html[data-design='material3'] .col-label {
|
||
font-size: var(--md-sys-typescale-body-medium-size);
|
||
line-height: var(--md-sys-typescale-body-medium-line);
|
||
font-weight: var(--md-sys-typescale-body-medium-weight);
|
||
letter-spacing: var(--md-sys-typescale-body-medium-tracking);
|
||
text-transform: none;
|
||
color: var(--md-sys-color-on-surface-variant);
|
||
}
|
||
|
||
html[data-design='material3'] .col-value {
|
||
font-size: var(--md-sys-typescale-body-medium-size);
|
||
line-height: var(--md-sys-typescale-body-medium-line);
|
||
font-weight: var(--md-sys-typescale-body-medium-weight);
|
||
letter-spacing: var(--md-sys-typescale-body-medium-tracking);
|
||
color: var(--md-sys-color-on-surface);
|
||
}
|
||
|
||
/* Кнопки строк (Изменить/Удалить/Проверить) — Outlined tier */
|
||
html[data-design='material3'] .action-btn {
|
||
font-size: var(--md-sys-typescale-label-large-size);
|
||
font-weight: var(--md-sys-typescale-label-large-weight);
|
||
letter-spacing: var(--md-sys-typescale-label-large-tracking);
|
||
background: transparent;
|
||
border: 1px solid var(--md-sys-color-outline);
|
||
box-shadow: none;
|
||
border-radius: var(--md-sys-shape-corner-full);
|
||
color: var(--md-sys-color-on-surface);
|
||
}
|
||
|
||
html[data-design='material3'] .action-btn:hover {
|
||
background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent);
|
||
border-color: var(--md-sys-color-outline);
|
||
color: var(--md-sys-color-on-surface);
|
||
}
|
||
|
||
html[data-design='material3'] .action-btn.danger {
|
||
color: var(--md-sys-color-error);
|
||
border-color: color-mix(in srgb, var(--md-sys-color-error) 55%, transparent);
|
||
background: transparent;
|
||
}
|
||
|
||
html[data-design='material3'] .action-btn.danger:hover {
|
||
background: color-mix(in srgb, var(--md-sys-color-error) 8%, transparent);
|
||
border-color: var(--md-sys-color-error);
|
||
}
|
||
|
||
/* Filled tonal — второстепенные акцентные действия (Скачать/Установить) */
|
||
html[data-design='material3'] .accent-btn {
|
||
background: var(--md-sys-color-secondary-container);
|
||
border: 1px solid transparent;
|
||
color: var(--md-sys-color-on-secondary-container);
|
||
}
|
||
|
||
html[data-design='material3'] .accent-btn:hover {
|
||
background: color-mix(in srgb, var(--md-sys-color-secondary-container) 88%, var(--md-sys-color-on-secondary-container) 12%);
|
||
border-color: transparent;
|
||
}
|
||
|
||
html[data-design='material3'] .design-name {
|
||
font-size: var(--md-sys-typescale-body-medium-size);
|
||
line-height: var(--md-sys-typescale-body-medium-line);
|
||
}
|
||
|
||
/* Точки-цвета — общие для акцента и M3-палитры */
|
||
html[data-design='material3'] .color-dot {
|
||
border: 1px solid var(--md-sys-color-outline-variant);
|
||
box-shadow: var(--md-sys-elevation-1);
|
||
}
|
||
|
||
html[data-design='material3'] .quick-dot {
|
||
border: 1px solid var(--md-sys-color-outline-variant);
|
||
box-shadow: none;
|
||
}
|
||
|
||
html[data-design='material3'] .quick-dot:hover {
|
||
box-shadow: var(--md-sys-elevation-1);
|
||
}
|
||
|
||
html[data-design='material3'] .quick-dot.active {
|
||
border-color: var(--md-sys-color-on-surface);
|
||
box-shadow: 0 0 0 2px var(--md-sys-color-surface-container), 0 0 0 3px var(--dot-color);
|
||
}
|
||
|
||
/* Слайдер масштаба */
|
||
html[data-design='material3'] .scale-slider {
|
||
background: var(--md-sys-color-surface-container-highest);
|
||
box-shadow: none;
|
||
}
|
||
|
||
html[data-design='material3'] .scale-slider::-webkit-slider-runnable-track {
|
||
background: linear-gradient(
|
||
to right,
|
||
var(--md-sys-color-primary) var(--pct, 33%),
|
||
var(--md-sys-color-surface-container-highest) var(--pct, 33%)
|
||
);
|
||
}
|
||
|
||
html[data-design='material3'] .scale-slider::-webkit-slider-thumb {
|
||
background: var(--md-sys-color-primary);
|
||
box-shadow: var(--md-sys-elevation-1);
|
||
}
|
||
|
||
html[data-design='material3'] .scale-slider::-webkit-slider-thumb:hover {
|
||
box-shadow: var(--md-sys-elevation-2), 0 0 0 8px color-mix(in srgb, var(--md-sys-color-primary) 12%, transparent);
|
||
}
|
||
|
||
/* Версия приложения / статус обновлений */
|
||
html[data-design='material3'] .ver-chip {
|
||
background: var(--md-sys-color-surface-container-highest);
|
||
border: 1px solid var(--md-sys-color-outline-variant);
|
||
color: var(--md-sys-color-on-surface-variant);
|
||
}
|
||
|
||
html[data-design='material3'] .status-ok {
|
||
background: var(--md-sys-color-tertiary-container);
|
||
color: var(--md-sys-color-on-tertiary-container);
|
||
border: 1px solid transparent;
|
||
}
|
||
|
||
html[data-design='material3'] .status-new {
|
||
background: var(--md-sys-color-primary-container);
|
||
color: var(--md-sys-color-on-primary-container);
|
||
border: 1px solid transparent;
|
||
}
|
||
|
||
html[data-design='material3'] .update-progress-track {
|
||
background: var(--md-sys-color-surface-container-highest);
|
||
}
|
||
|
||
html[data-design='material3'] .update-error {
|
||
color: var(--md-sys-color-error);
|
||
}
|
||
</style>
|