This commit is contained in:
muwoo
2023-04-18 10:51:38 +08:00
parent 296e3a164a
commit 9f81854139
7 changed files with 16 additions and 7 deletions

View File

@@ -23,16 +23,25 @@ import { ref } from "vue";
const { ipcRenderer } = window.require("electron");
const platform = ref(window.process.platform);
const plugInfo = ref({});
const showInput = ref(false);
const storeInfo = localStorage.getItem('rubick-system-detach') || '{}';
const plugInfo = ref({});
window.initDetach = (pluginInfo) => {
plugInfo.value = pluginInfo;
showInput.value =
pluginInfo.subInput &&
(!!pluginInfo.subInput.value || !!pluginInfo.subInput.placeholder);
console.log(showInput.value);
localStorage.setItem('rubick-system-detach', JSON.stringify(pluginInfo));
};
try {
window.initDetach(JSON.parse(storeInfo));
} catch (e) {
// ...
}
const changeValue = throttle((e) => {
ipcRenderer.send("msg-trigger", {
type: "detachInputChange",