add EditFavoriteDialog component and simloc_logo.svg

split socketio strore into seperate stores
added all routing points to sim
add vuedraggable
built icon picker for favorites
and more
This commit is contained in:
2026-04-29 13:17:49 -04:00
parent 52f05550e0
commit ddaf682d16
35 changed files with 4838 additions and 1486 deletions
+48
View File
@@ -0,0 +1,48 @@
import { defineStore, acceptHMRUpdate } from 'pinia';
import type { TunneldCommands } from 'components/models';
import { useSocketStore } from 'stores/socket';
import { socket } from 'boot/socketio';
export const useTunneldStore = defineStore('tunneldStore', {
state: () => {
return {
tunnelConnected: false as boolean,
tunneldWatcher: false as boolean,
};
},
getters: {},
actions: {
digestUpdate(data: boolean) {
this.tunnelConnected = data;
},
tunneldControl(command: TunneldCommands, udid: string = '') {
const socketStore = useSocketStore();
const debugLog = socketStore.debugLog;
let fnctRtn: { sts: string; msg?: string | undefined } = { sts: '', msg: '' };
if (debugLog) {
console.log('tunneldStore: got command: ', command);
}
let args: {command: TunneldCommands, udid?: string} = {command: command};
if (udid != '') {
args = { command: command, udid: udid };
}
socket.emit(
'tunneld_control', args, (response) => {
console.log(response.command_status, response.command);
if (response.command_status == 'ERROR') {
fnctRtn = { sts: 'error', msg: response.message?.toString() };
throw new Error(response.message);
} else {
fnctRtn = { sts: 'OK', msg: response.message?.toString() };
}
},
);
return fnctRtn;
}
}
});
if (import.meta.hot) {
import.meta.hot.accept(acceptHMRUpdate(useTunneldStore, import.meta.hot));
}