feat(web): sign-in, first-run setup, app shell and user admin (M1)
ci / contract / contract (сгенерированный код совпадает с openapi.yaml) (push) Successful in 50s
ci / ts / ts (packages + web) (push) Successful in 43s
ci / docker / docker (образы собираются — их сервер собирает сам при обновлении) (push) Successful in 27s
ci / mobile / mobile (Metro-бандл Android) (push) Successful in 1m22s

- core: AuthSession keeps the access token in memory, refreshes it
  once for all parallel requests (single-flight) and retries them;
  refresh races between tabs are retried, reuse signs out; ApiError
  carries problem+json codes and field errors
- web: TanStack Router with guards — guests go to /login, the bootstrap
  admin to /setup/admin, temporary passwords to /setup/password, admin
  pages by role
- login, setup screens, Classic shell (top bar, role-based sidebar,
  empty player), settings: name, theme, language, password, devices
- users admin: search, role filter, create with a one-time temporary
  password, reset, block, role change, delete as the policy allows;
  audit log for admins
- ru/en strings for auth, admin and error codes; language and theme
  are saved in the profile

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mrleo1nidandClaude Opus 5.5 committed 2026-10-20 06:33:46 +03:00
1 parent f075863f15
commit ab092def54
44 files changed
+4070 -203

No files matched your search

+343
View File
@@ -0,0 +1,343 @@
.page {
max-width: 1100px;
margin: 0 auto;
display: flex;
flex-direction: column;
gap: 24px;
}
.narrow {
max-width: 720px;
}
.head {
display: flex;
align-items: flex-end;
justify-content: space-between;
gap: 16px;
flex-wrap: wrap;
}
.head h1 {
margin: 0;
font-family: var(--font-display);
font-size: 28px;
font-weight: 600;
letter-spacing: -0.01em;
}
.subtitle {
margin: 6px 0 0;
color: var(--text2);
}
.section {
display: flex;
flex-direction: column;
gap: 16px;
padding: 24px;
border-radius: var(--radius-lg);
background: var(--surface-a);
border: 1px solid var(--line);
}
.section h2 {
margin: 0;
font-size: 17px;
font-weight: 600;
}
.section form {
display: flex;
flex-direction: column;
gap: 14px;
}
.row {
display: flex;
align-items: flex-end;
gap: 12px;
flex-wrap: wrap;
}
.row > :first-child {
flex: 1;
min-width: 220px;
}
.settingRow {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
flex-wrap: wrap;
}
.ok {
color: var(--ok);
font-size: 13px;
font-weight: 500;
}
.actions {
display: flex;
gap: 10px;
justify-content: flex-end;
}
.toolbar {
display: flex;
align-items: center;
gap: 12px;
flex-wrap: wrap;
}
.search {
position: relative;
flex: 1;
min-width: 220px;
max-width: 360px;
}
.search input {
width: 100%;
height: 40px;
padding: 0 12px 0 38px;
border-radius: 10px;
border: 1px solid var(--line);
background: var(--surface2);
color: var(--text);
font: inherit;
outline: none;
}
.search input:focus {
border-color: var(--accent);
box-shadow: 0 0 0 3px var(--accent-soft);
}
.searchIcon {
position: absolute;
left: 12px;
top: 50%;
transform: translateY(-50%);
color: var(--text3);
}
.chips {
display: flex;
gap: 6px;
flex-wrap: wrap;
}
.chip {
height: 32px;
padding: 0 14px;
border-radius: var(--radius-pill);
border: 1px solid var(--line);
background: var(--surface2);
font-size: 13px;
font-weight: 600;
color: var(--text2);
}
.chip[aria-pressed='true'] {
background: var(--accent-soft);
border-color: var(--accent);
color: var(--text);
}
.tableWrap {
border-radius: var(--radius-lg);
border: 1px solid var(--line);
background: var(--surface-a);
}
/* Горизонтальная прокрутка только там, где таблица не помещается: она обрезала бы меню действий. */
@media (max-width: 900px) {
.tableWrap {
overflow-x: auto;
}
}
.table {
width: 100%;
border-collapse: collapse;
font-size: 14px;
}
.table th {
height: 44px;
padding: 0 16px;
text-align: left;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--text3);
border-bottom: 1px solid var(--line);
white-space: nowrap;
}
.table td {
height: 60px;
padding: 0 16px;
border-bottom: 1px solid var(--line);
vertical-align: middle;
}
.table tr:last-child td {
border-bottom: 0;
}
.table tbody tr:hover {
background: var(--hover);
}
.userCell {
display: flex;
align-items: center;
gap: 12px;
min-width: 200px;
}
.userName {
font-weight: 600;
}
.userLogin {
font-size: 12px;
color: var(--text3);
}
.you {
margin-left: 6px;
font-size: 11px;
font-weight: 600;
color: var(--text3);
}
.badge {
display: inline-flex;
align-items: center;
height: 24px;
padding: 0 10px;
border-radius: var(--radius-pill);
font-size: 12px;
font-weight: 600;
white-space: nowrap;
}
.role_admin {
background: var(--violet-soft);
color: var(--violet);
}
.role_moderator {
background: var(--accent-soft);
color: var(--accent2);
}
.role_user {
background: var(--hover);
color: var(--text2);
}
.status {
display: inline-flex;
align-items: center;
gap: 8px;
white-space: nowrap;
}
.status::before {
content: '';
width: 7px;
height: 7px;
border-radius: 50%;
background: currentColor;
}
.status_active {
color: var(--ok);
}
.status_blocked {
color: var(--danger);
}
.status_must_change {
color: var(--warn);
}
.muted {
color: var(--text3);
white-space: nowrap;
}
.empty {
padding: 40px 16px;
text-align: center;
color: var(--text3);
}
.more {
align-self: center;
}
.mono {
font-family: var(--font-mono);
}
.secret {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 14px 16px;
border-radius: var(--radius-md);
background: var(--surface2);
border: 1px dashed var(--line2);
font-family: var(--font-mono);
font-size: 18px;
letter-spacing: 0.04em;
word-break: break-all;
}
.select {
height: 48px;
padding: 0 12px;
border-radius: var(--radius-md);
border: 1px solid var(--line2);
background: var(--surface2);
color: var(--text);
font: inherit;
}
.note {
margin: 0;
font-size: 13px;
color: var(--text2);
line-height: 1.5;
}
.sessions {
display: flex;
flex-direction: column;
gap: 8px;
}
.session {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 12px 14px;
border-radius: var(--radius-md);
background: var(--surface2);
}
.sessionMeta {
font-size: 12px;
color: var(--text3);
}