feat(notes,profile): trash for notes and personal model connection check
Notes: - soft delete via deleted_at/purge_at with trashPurgeDays(), restore and permanent-delete routes, ?deleted=1 list switch - GET /api/notes now always returns only own notes (admin included) - purge user_notes in purgeScheduledDeletions(), skip deleted rows in reorder and in the note title worker - deleted_at/purge_at in init.sql, migration.sql, ensureUserNotesTable(), normalizeRestoreData and restore-insert Profile: - POST /api/user-settings/models/test probes a personal model from the client payload (works before save), shared probeAiModel() with the admin profile test, AI_MODEL_TEST_TIMEOUT_MS env in .env.example/compose - "Проверить" button in the model list and in the model form - password fields: autocomplete hints, values cleared on every toggle Notes page: #notesDeleted trash toggle, deleted card state, restore/permanent actions; fmtTs() uses the global fmtDateTime() instead of the non-existent window.datetime.
This commit is contained in:
+8
-3
@@ -74,6 +74,9 @@
|
||||
.sp-model-name{font-size:.9rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:flex;align-items:center;gap:7px}
|
||||
.sp-model-sub{font-size:.78rem;color:var(--muted);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
||||
.sp-model-acts{display:flex;gap:6px;flex:none}
|
||||
.sp-model-info .ai-test-status{min-height:0}
|
||||
.sp-model-form .ai-test-status{margin-top:12px}
|
||||
.sp-model-acts button:disabled{opacity:.6;cursor:default}
|
||||
.sp-model-empty{font-size:.85rem;color:var(--muted);display:flex;flex-direction:column;align-items:center;gap:8px;padding:26px 16px;border:1px dashed var(--border);border-radius:12px;text-align:center}
|
||||
.sp-model-empty svg{width:22px;height:22px;color:var(--muted);opacity:.7}
|
||||
.sp-model-form{border:1px solid var(--border);border-radius:12px;background:var(--bg);padding:16px;margin-top:14px}
|
||||
@@ -184,17 +187,17 @@
|
||||
<div class="sp-toggle-panel" id="passwordFields" style="display:none">
|
||||
<div class="sp-field">
|
||||
<label>Текущий пароль</label>
|
||||
<input type="password" id="pfOldPassword" placeholder="••••••••">
|
||||
<input type="password" id="pfOldPassword" placeholder="••••••••" autocomplete="new-password" data-1p-ignore data-lpignore="true">
|
||||
<div class="field-error" id="pfOldPasswordErr"></div>
|
||||
</div>
|
||||
<div class="sp-field">
|
||||
<label>Новый пароль</label>
|
||||
<input type="password" id="pfNewPassword" placeholder="•••••••• (минимум 6 символов)">
|
||||
<input type="password" id="pfNewPassword" placeholder="•••••••• (минимум 6 символов)" autocomplete="new-password">
|
||||
<div class="field-error" id="pfNewPasswordErr"></div>
|
||||
</div>
|
||||
<div class="sp-field">
|
||||
<label>Повторите новый пароль</label>
|
||||
<input type="password" id="pfNewPasswordConfirm" placeholder="••••••••">
|
||||
<input type="password" id="pfNewPasswordConfirm" placeholder="••••••••" autocomplete="new-password">
|
||||
<div class="field-error" id="pfNewPasswordConfirmErr"></div>
|
||||
</div>
|
||||
<div class="sp-hint">Пароль будет обновлён только при успешном сохранении</div>
|
||||
@@ -261,7 +264,9 @@
|
||||
<div class="field-error" id="pfMMaxTokErr"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ai-test-status" id="pfMTestStatus"></div>
|
||||
<div class="card-foot">
|
||||
<button type="button" class="btn-secondary" id="pfMTest"><i data-lucide="plug-zap"></i> Проверить</button>
|
||||
<button type="button" class="btn-secondary" id="pfMCancel">Отмена</button>
|
||||
<button type="button" class="btn-primary" id="pfMSave">Готово</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user