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:
dev
2026-10-17 00:17:00 +03:00
parent 9ae54da2e4
commit 2f8c2da280
12 changed files with 303 additions and 71 deletions
+2
View File
@@ -595,6 +595,8 @@ function normalizeRestoreData(data) {
ai_status: normalizeAiStatus(x.ai_status),
created_at: optTs(x.created_at),
updated_at: optTs(x.updated_at),
deleted_at: optTs(x.deleted_at),
purge_at: optTs(x.purge_at),
}));
const bookmarks = (data.bookmarks || []).map(x => ({
id: reqInt(x.id),