Files
corrosion-admin-panel/frontend/src/stores/wipe.ts
Vantz Stockwell e2f2f64d33 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>
2026-02-14 21:42:21 -05:00

43 lines
979 B
TypeScript

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,
}
})