eslint --fix

This commit is contained in:
Oscar
2026-06-08 15:09:53 +03:00
parent 10d696f4ca
commit b98387ea58
64 changed files with 6070 additions and 2467 deletions

View File

@@ -1,8 +1,3 @@
<script setup lang="ts">
import { useUi } from '@/composables/useUi';
const uiStore = useUi();
</script>
<template>
<Teleport to="body">
<div class="toast-container" role="region" aria-label="Уведомления" aria-live="polite">
@@ -16,14 +11,14 @@ const uiStore = useUi();
>
<span class="toast__icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
<path v-if="toast.type === 'success'" d="M20 6L9 17l-5-5"/>
<path v-else-if="toast.type === 'error'" d="M12 8v4m0 4h.01M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/>
<path v-else d="M12 16v-4m0-4h.01M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z"/>
<path v-if="toast.type === 'success'" d="M20 6L9 17l-5-5" />
<path v-else-if="toast.type === 'error'" d="M12 8v4m0 4h.01M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" />
<path v-else d="M12 16v-4m0-4h.01M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z" />
</svg>
</span>
<span class="toast__message">{{ toast.message }}</span>
<button class="toast__close" @click="uiStore.removeToast(toast.id)" aria-label="Закрыть">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 6L6 18M6 6l12 12"/></svg>
<button class="toast__close" aria-label="Закрыть" @click="uiStore.removeToast(toast.id)">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 6L6 18M6 6l12 12" /></svg>
</button>
</div>
</TransitionGroup>
@@ -31,6 +26,12 @@ const uiStore = useUi();
</Teleport>
</template>
<script setup lang="ts">
import { useUi } from '@/composables/useUi'
const uiStore = useUi()
</script>
<style scoped lang="scss">
.toast-container {
position: fixed;
@@ -56,9 +57,15 @@ const uiStore = useUi();
box-shadow: var(--shadow-card);
pointer-events: all;
&--success { border-color: rgba(122, 184, 80, 0.3); }
&--error { border-color: rgba(196, 92, 58, 0.4); }
&--warning { border-color: rgba(210, 151, 60, 0.3); }
&--success {
border-color: rgba(122, 184, 80, 0.3);
}
&--error {
border-color: rgba(196, 92, 58, 0.4);
}
&--warning {
border-color: rgba(210, 151, 60, 0.3);
}
&__icon {
width: 18px;
@@ -66,13 +73,24 @@ const uiStore = useUi();
flex-shrink: 0;
margin-top: 1px;
svg { width: 100%; height: 100%; }
svg {
width: 100%;
height: 100%;
}
}
&--success .toast__icon { color: #7ab850; }
&--error .toast__icon { color: var(--color-signal); }
&--warning .toast__icon { color: #d2973c; }
&--info .toast__icon { color: var(--color-muted); }
&--success .toast__icon {
color: #7ab850;
}
&--error .toast__icon {
color: var(--color-signal);
}
&--warning .toast__icon {
color: #d2973c;
}
&--info .toast__icon {
color: var(--color-muted);
}
&__message {
flex: 1;
@@ -97,9 +115,14 @@ const uiStore = useUi();
border-radius: var(--radius-xs);
transition: color var(--transition-fast);
&:hover { color: var(--color-cream); }
&:hover {
color: var(--color-cream);
}
svg { width: 14px; height: 14px; }
svg {
width: 14px;
height: 14px;
}
}
}