From ed9ea1ffb5362211b27ba96fc96cd1cbf73a62a5 Mon Sep 17 00:00:00 2001 From: Venkatesh Date: Tue, 4 Feb 2025 16:13:11 +0530 Subject: [PATCH] chore: cleanup code --- .../ProjectProperty/ProjectProperty.vue | 27 ++++++------------- .../promptComponent/PromptComponent.vue | 7 +---- src/simulator/src/circuit.ts | 1 - 3 files changed, 9 insertions(+), 26 deletions(-) diff --git a/src/components/Panels/PropertiesPanel/ModuleProperty/ProjectProperty/ProjectProperty.vue b/src/components/Panels/PropertiesPanel/ModuleProperty/ProjectProperty/ProjectProperty.vue index acc575ef..16248019 100644 --- a/src/components/Panels/PropertiesPanel/ModuleProperty/ProjectProperty/ProjectProperty.vue +++ b/src/components/Panels/PropertiesPanel/ModuleProperty/ProjectProperty/ProjectProperty.vue @@ -124,28 +124,17 @@ const name = computed({ } } }) -const circnameInput = ref(null) +// const circnameInput = ref(null) const simulatorMobileStore = useSimulatorMobileStore() -watch(() => SimulatorState.circuit_name_clickable, () => { - setTimeout(() => { - if (circnameInput.value && SimulatorState.circuit_name_clickable) { - circnameInput.value.select() - } - }, 100) -}) +// watch(() => SimulatorState.circuit_name_clickable, () => { +// setTimeout(() => { +// if (circnameInput.value && SimulatorState.circuit_name_clickable) { +// circnameInput.value.select() +// } +// }, 100) +// }) -type SimulatorStateType = { - activeCircuit: { - id: string | number - name: string - } - circuit_list: Array - dialogBox: { - delete_circuit: boolean - } - circuit_name_clickable: boolean -} // const circuitId: Ref = ref(0) // const circuitName: Ref = ref('Untitled-Cirucit') // const ifPersistentShow: Ref = ref(false) diff --git a/src/components/helpers/promptComponent/PromptComponent.vue b/src/components/helpers/promptComponent/PromptComponent.vue index 827b497a..446fa84f 100644 --- a/src/components/helpers/promptComponent/PromptComponent.vue +++ b/src/components/helpers/promptComponent/PromptComponent.vue @@ -14,9 +14,7 @@ import messageBox from '#/components/MessageBox/messageBox.vue' import { usePromptStore } from '#/store/promptStore' import { useState } from '#/store/SimulatorStore/state' -import { createApp, ref } from 'vue' -import App from '#/App.vue' -import { createPinia } from 'pinia' +import { ref } from 'vue' interface ButtonListType extends Array<{ @@ -67,9 +65,6 @@ const promptActivator = async ( return promptInput } -const app = createApp(App) -const pinia = createPinia() -app.use(pinia) const projectStore = useState(); export const provideProjectName = async (): Promise => { diff --git a/src/simulator/src/circuit.ts b/src/simulator/src/circuit.ts index fa203f98..7cd49b6a 100644 --- a/src/simulator/src/circuit.ts +++ b/src/simulator/src/circuit.ts @@ -75,7 +75,6 @@ export function switchCircuit(id: string) { const { circuit_list } = toRefs(simulatorStore) const { activeCircuit } = toRefs(simulatorStore) const simulatorMobileStore = toRefs(useSimulatorMobileStore()) - console.log("switched",id) if (layoutModeGet()) { toggleLayoutMode()