1
0
forked from noxious/client

Creating and deleting zones now works

This commit is contained in:
2024-07-07 04:06:59 +02:00
parent a2c39dada1
commit 317906eab5
11 changed files with 175 additions and 60 deletions

View File

@ -4,6 +4,8 @@ import type { Object, ZoneObject } from '@/types'
export const useZoneEditorStore = defineStore('zoneEditor', {
state: () => ({
active: true,
isZoneListModalShown: false,
isCreateZoneModalShown: false,
name: '',
width: 10,
height: 10,
@ -21,6 +23,13 @@ export const useZoneEditorStore = defineStore('zoneEditor', {
toggleActive() {
this.active = !this.active
},
toggleZoneListModal() {
this.isZoneListModalShown = !this.isZoneListModalShown
this.isCreateZoneModalShown = false
},
toggleCreateZoneModal() {
this.isCreateZoneModalShown = !this.isCreateZoneModalShown
},
setName(name: string) {
this.name = name
},