scaffold: Vue 3 frontend — router, stores, views, composables, layouts
Complete frontend skeleton: Vite + Vue 3 + TypeScript + Tailwind CSS, Pinia stores (auth, server, wipe, plugins), authenticated API composable, full route tree with auth guards, DashboardLayout with sidebar nav, 23 view stubs across auth/admin/public, all TypeScript interfaces. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
42
frontend/src/stores/wipe.ts
Normal file
42
frontend/src/stores/wipe.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
import type { WipeProfile, WipeSchedule, WipeHistory } from '@/types'
|
||||
|
||||
export const useWipeStore = defineStore('wipe', () => {
|
||||
const profiles = ref<WipeProfile[]>([])
|
||||
const schedules = ref<WipeSchedule[]>([])
|
||||
const history = ref<WipeHistory[]>([])
|
||||
const isLoading = ref(false)
|
||||
|
||||
async function fetchProfiles() {
|
||||
// TODO: GET /api/profiles
|
||||
}
|
||||
|
||||
async function fetchSchedules() {
|
||||
// TODO: GET /api/schedules
|
||||
}
|
||||
|
||||
async function fetchHistory() {
|
||||
// TODO: GET /api/wipes/history
|
||||
}
|
||||
|
||||
async function triggerWipe(wipeType: string, profileId: string) {
|
||||
// TODO: POST /api/wipes/:server_id/trigger
|
||||
}
|
||||
|
||||
async function triggerDryRun(wipeType: string, profileId: string) {
|
||||
// TODO: POST /api/wipes/:server_id/dry-run
|
||||
}
|
||||
|
||||
return {
|
||||
profiles,
|
||||
schedules,
|
||||
history,
|
||||
isLoading,
|
||||
fetchProfiles,
|
||||
fetchSchedules,
|
||||
fetchHistory,
|
||||
triggerWipe,
|
||||
triggerDryRun,
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user