feat: add licensing and access controls

This commit is contained in:
ShukeBta
2026-05-29 12:47:54 +08:00
parent 2f7ec3ab17
commit 27df93fa3d
61 changed files with 2032 additions and 237 deletions
+2 -1
View File
@@ -5,6 +5,7 @@ import toast from 'react-hot-toast'
import { libraryAPI } from '../api/library'
import { playProfilesAPI, type PlayProfileInput } from '../api/play_profiles'
import { useAuthStore } from '../stores/auth'
import { confirmAction } from '../components/ConfirmDialog'
import type { Library, PlayProfile } from '../types'
// ProfileManagementPage replicates the Vue ProfileManagementView. It
@@ -42,7 +43,7 @@ export function ProfileManagementPage() {
}, [isAdmin])
const onDelete = async (p: PlayProfile) => {
if (!confirm(`确定删除 Profile「${p.name}」?`)) return
if (!(await confirmAction({ title: '删除播放档案', message: `确定删除 Profile「${p.name}」?`, confirmText: '删除' }))) return
try {
await playProfilesAPI.remove(p.id)
toast.success('已删除')