remodel scan process and visualize external

This commit is contained in:
Julian Krauser 2025-07-15 13:19:59 +02:00
parent 9ef76a7c26
commit ed947e5777
23 changed files with 338 additions and 29 deletions

View file

@ -0,0 +1,28 @@
import { defineStore } from "pinia";
import { v4 as uuid } from "uuid";
export const useScannerStore = defineStore("scanner", {
state: () => {
return {
inUse: false as boolean,
roomId: undefined as undefined | string,
results: [] as Array<string>,
connectedDevices: 0 as number,
};
},
actions: {
startSession() {
if (this.inUse) return;
this.roomId = uuid();
this.inUse = true;
},
endSession() {
this.inUse = false;
this.roomId = undefined;
this.results = [];
},
removeElementFromResults(el: string) {
this.results = this.results.filter((result) => result !== el);
},
},
});