feat: activity logs, gallery storage filter, and upload rate limits
Add per-user activity logs with storage backend tracking, gallery storage filter, and IP/token upload rate limiting. Fix storage delete modal flash, pin local backend in filter order, and link settings version to GitHub releases.
This commit is contained in:
1 parent
901fefb3f5
commit
6fc054328d
34 files changed
+1357
-72
No files matched your search
@@ -159,6 +159,17 @@ export function listStorageBackends(maskSecrets = true): Array<StorageBackendInf
|
||||
return listStorageBackendRows().map(row => rowToInfo(row, maskSecrets))
|
||||
}
|
||||
|
||||
export function listStorageBackendNameMap(): Map<string, {
|
||||
name: string
|
||||
type: StorageBackendType
|
||||
}> {
|
||||
ensureStorageSchema()
|
||||
const rows = getDb().prepare(`
|
||||
SELECT id, name, type FROM storage_backends
|
||||
`).all() as Array<{ id: string, name: string, type: StorageBackendType }>
|
||||
return new Map(rows.map(row => [row.id, { name: row.name, type: row.type }]))
|
||||
}
|
||||
|
||||
export function getStorageBackendRow(id: string): StorageBackendRow | null {
|
||||
ensureDefaultBackends()
|
||||
const row = getDb().prepare(`
|
||||
@@ -191,6 +202,7 @@ export function getBackendIdForKey(key: string): string | null {
|
||||
}
|
||||
|
||||
export function setDefaultBackend(id: string): void {
|
||||
ensureDefaultBackends()
|
||||
const db = getDb()
|
||||
db.exec('UPDATE storage_backends SET is_default = 0')
|
||||
db.prepare(`
|
||||
|
||||
Reference in new issue
Block a user