update
This commit is contained in:
1 parent
586727cb99
commit
f01f8a174d
16 files changed
+212
-133
No files matched your search
+2
-2
@@ -1,3 +1,3 @@
|
||||
import { ref } from "vue";
|
||||
import { ref } from "vue"
|
||||
|
||||
export const loginModal = ref(false)
|
||||
export const loginModal = ref(false)
|
||||
+11
-3
@@ -1,4 +1,12 @@
|
||||
import { computed, ref } from "vue"
|
||||
import { computed, reactive } from "vue"
|
||||
import { Role } from "../utils/type"
|
||||
|
||||
export const username = ref("")
|
||||
export const authed = computed(() => !!username.value)
|
||||
export const user = reactive({
|
||||
loaded: false,
|
||||
username: "",
|
||||
role: Role.Normal,
|
||||
})
|
||||
export const authed = computed(() => !!user.username)
|
||||
export const roleNormal = computed(() => user.role === Role.Normal)
|
||||
export const roleAdmin = computed(() => user.role === Role.Admin)
|
||||
export const roleSuper = computed(() => user.role !== Role.Super)
|
||||
Reference in new issue
Block a user