refactor: code organization

This commit is contained in:
2024-10-23 15:23:33 +02:00
parent 018357c5ed
commit 5a32c96a88
29 changed files with 1134 additions and 615 deletions
+6 -9
View File
@@ -21,18 +21,15 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { useStore } from '../store';
import { useSceneriesStore } from '../stores/sceneries.store';
export default defineComponent({
setup() {
return {
store: useStore(),
};
},
data: () => ({
sceneriesStore: useSceneriesStore(),
}),
computed: {
changesResponseComp() {
return this.store.changesResponse.map((ch) => ({
return this.sceneriesStore.changesResponse.map((ch) => ({
resolved: ch.split(' ')[0] == 'v',
message: ch.replace(/^[v|x] /, ''),
}));
@@ -41,7 +38,7 @@ export default defineComponent({
methods: {
closeCard() {
this.store.changesResponse.length = 0;
this.sceneriesStore.changesResponse.length = 0;
},
},
});