eslint --fix
This commit is contained in:
83
README.md
83
README.md
@@ -4,21 +4,21 @@ Vue 3 + Vite + Tauri v2. Работает как PWA в браузере и ка
|
||||
|
||||
## Стек
|
||||
|
||||
| Слой | Технология |
|
||||
|---|-------------------------------------------------|
|
||||
| UI framework | Vue 3 (Composition API, `<script setup>`) |
|
||||
| Build tool | Vite 6 |
|
||||
| Desktop shell | Tauri v2 |
|
||||
| State management | Composables | |
|
||||
| Routing | Vue Router 4 |
|
||||
| HTTP client | Axios (сгенерированный клиент `src/api/api.ts`) |
|
||||
| Форм-валидация | Vuelidate |
|
||||
| Анимации | GSAP 3 |
|
||||
| Карты | Leaflet |
|
||||
| Утилиты | VueUse |
|
||||
| CSS | SCSS + Tailwind v4 (reset-only) |
|
||||
| Package manager | pnpm |
|
||||
| TypeScript | строгий режим, `no any` |
|
||||
| Слой | Технология |
|
||||
| ---------------- | ----------------------------------------------- | --- |
|
||||
| UI framework | Vue 3 (Composition API, `<script setup>`) |
|
||||
| Build tool | Vite 6 |
|
||||
| Desktop shell | Tauri v2 |
|
||||
| State management | Composables | |
|
||||
| Routing | Vue Router 4 |
|
||||
| HTTP client | Axios (сгенерированный клиент `src/api/api.ts`) |
|
||||
| Форм-валидация | Vuelidate |
|
||||
| Анимации | GSAP 3 |
|
||||
| Карты | Leaflet |
|
||||
| Утилиты | VueUse |
|
||||
| CSS | SCSS + Tailwind v4 (reset-only) |
|
||||
| Package manager | pnpm |
|
||||
| TypeScript | строгий режим, `no any` |
|
||||
|
||||
---
|
||||
|
||||
@@ -118,22 +118,23 @@ dating-app-frontend/
|
||||
|
||||
## Маршрутизация
|
||||
|
||||
| Путь | Компонент | Guard |
|
||||
|---|---|---|
|
||||
| `/` | redirect → `/feed` | — |
|
||||
| `/login` | LoginView | guest only |
|
||||
| `/register` | RegisterView | guest only |
|
||||
| `/setup` | ProfileSetupView | auth |
|
||||
| `/feed` | FeedView | auth |
|
||||
| `/matches` | MatchesView | auth |
|
||||
| `/chats` | ChatsListView | auth |
|
||||
| `/chats/:chatId` | ChatRoomView | auth |
|
||||
| `/dates` | DatesView | auth |
|
||||
| `/profile/me` | MyProfileView | auth |
|
||||
| `/profile/:profileId` | ProfileDetailView | auth |
|
||||
| `/admin/reports` | ReportsView | auth + admin |
|
||||
| Путь | Компонент | Guard |
|
||||
| --------------------- | ------------------ | ------------ |
|
||||
| `/` | redirect → `/feed` | — |
|
||||
| `/login` | LoginView | guest only |
|
||||
| `/register` | RegisterView | guest only |
|
||||
| `/setup` | ProfileSetupView | auth |
|
||||
| `/feed` | FeedView | auth |
|
||||
| `/matches` | MatchesView | auth |
|
||||
| `/chats` | ChatsListView | auth |
|
||||
| `/chats/:chatId` | ChatRoomView | auth |
|
||||
| `/dates` | DatesView | auth |
|
||||
| `/profile/me` | MyProfileView | auth |
|
||||
| `/profile/:profileId` | ProfileDetailView | auth |
|
||||
| `/admin/reports` | ReportsView | auth + admin |
|
||||
|
||||
Логика guard:
|
||||
|
||||
1. При первой навигации пытается восстановить сессию через `refreshToken` из localStorage.
|
||||
2. Если пользователь авторизован, но профилей нет — редирект на `/setup`.
|
||||
3. Если токен истёк — silent refresh через `POST /api/v1/auth/refresh`.
|
||||
@@ -192,8 +193,8 @@ Tailwind v4 импортируется **отдельно** от SCSS:
|
||||
|
||||
```ts
|
||||
// main.ts — порядок важен
|
||||
import '@/styles/tailwind.css' // @import "tailwindcss"
|
||||
import '@/styles/main.scss' // custom styles
|
||||
import '@/styles/tailwind.css' // @import "tailwindcss"
|
||||
import '@/styles/main.scss' // custom styles
|
||||
```
|
||||
|
||||
Каждый SCSS-парциал (`_typography.scss`, `_animations.scss`) включает в начале:
|
||||
@@ -209,14 +210,15 @@ import '@/styles/main.scss' // custom styles
|
||||
### Дизайн-токены (CSS custom properties)
|
||||
|
||||
```scss
|
||||
--color-base: #0d0d0d // фон приложения
|
||||
--color-surface: #161614 // поверхность карточек
|
||||
--color-surface-2: #1e1e1b // инпуты, вторичные поверхности
|
||||
--color-cream: #f0ebe0 // основной текст
|
||||
--color-muted: #6b6860 // второстепенный текст
|
||||
--color-signal: #c45c3a // акцент (CTA, лайк, активный стейт)
|
||||
--font-display: 'Instrument Serif', serif
|
||||
--font-mono: 'DM Mono', monospace
|
||||
--color-base:
|
||||
#0d0d0d // фон приложения
|
||||
--color-surface: #161614 // поверхность карточек
|
||||
--color-surface-2: #1e1e1b // инпуты, вторичные поверхности
|
||||
--color-cream: #f0ebe0 // основной текст
|
||||
--color-muted: #6b6860 // второстепенный текст
|
||||
--color-signal: #c45c3a // акцент (CTA, лайк, активный стейт)
|
||||
--font-display: 'Instrument Serif',
|
||||
serif --font-mono: 'DM Mono', monospace;
|
||||
```
|
||||
|
||||
Шрифты загружаются из Google Fonts в `index.html`.
|
||||
@@ -228,7 +230,7 @@ import '@/styles/main.scss' // custom styles
|
||||
### Обнаружение среды
|
||||
|
||||
```ts
|
||||
const isTauri = typeof window !== 'undefined' && !!window.__TAURI__;
|
||||
const isTauri = typeof window !== 'undefined' && !!window.__TAURI__
|
||||
```
|
||||
|
||||
### Кастомный тайтлбар
|
||||
@@ -242,6 +244,7 @@ const isTauri = typeof window !== 'undefined' && !!window.__TAURI__;
|
||||
### Конфигурация окна
|
||||
|
||||
`src-tauri/tauri.conf.json`:
|
||||
|
||||
- `decorations: false` — убирает системный тайтлбар
|
||||
- `minWidth: 375` — соответствует мобильному брейкпойнту
|
||||
- Permissions: `dialog:allow-open`, `dialog:allow-save`, `shell:allow-open`
|
||||
|
||||
Reference in New Issue
Block a user