#29 refactor: replace admin code with role-based auth using Pinia

This commit is contained in:
mono
2026-03-14 22:55:24 -05:00
parent 2c9ea4b871
commit 786d0551bb
12 changed files with 105 additions and 129 deletions

View File

@@ -1,20 +1,19 @@
<template>
<div>
<CodeDialog @code-verified="(verified) => showComponent = verified"/>
</div>
<ReconciliationJar v-if="showComponent" />
<ReconciliationJar v-if="authStore.isAdmin" />
</template>
<script >
import CodeDialog from '../components/CodeDialog.vue'
import { useAuthStore } from '@/stores/auth';
export default {
data() {
return {
showComponent: false,
setup() {
const authStore = useAuthStore();
return { authStore };
},
mounted() {
if (!this.authStore.isAdmin) {
this.$router.push('/');
}
},
components: { CodeDialog },
methods: {},
}
</script>