diff --git a/launcher.zip b/launcher.zip deleted file mode 100644 index e43f81ef3..000000000 Binary files a/launcher.zip and /dev/null differ diff --git a/launcher/package.json b/launcher/package.json index 3bbba1b34..72808fa92 100755 --- a/launcher/package.json +++ b/launcher/package.json @@ -44,7 +44,6 @@ "geoip-lite": "^1.4.7", "jszip": "^3.10.1", "leader-line-new": "^1.1.9", - "loudness": "^0.4.2", "ping": "^0.4.4", "pinia": "^2.0.33", "qrcode": "^1.5.1", diff --git a/launcher/public/output.css b/launcher/public/output.css index e6342ddba..b9f637fad 100755 --- a/launcher/public/output.css +++ b/launcher/public/output.css @@ -887,6 +887,10 @@ video { left: 40%; } +.left-\[50\%\]{ + left: 50%; +} + .left-\[920px\]{ left: 920px; } @@ -983,6 +987,10 @@ video { top: 1px; } +.top-\[25\%\]{ + top: 25%; +} + .top-\[33\%\]{ top: 33%; } @@ -991,6 +999,10 @@ video { top: 42%; } +.top-\[50\%\]{ + top: 50%; +} + .top-\[56px\]{ top: 56px; } @@ -1035,6 +1047,10 @@ video { grid-column: span 10 / span 10; } +.col-span-12{ + grid-column: span 12 / span 12; +} + .col-span-2{ grid-column: span 2 / span 2; } @@ -1616,6 +1632,14 @@ video { height: 33.333333%; } +.h-1\/4{ + height: 25%; +} + +.h-1\/5{ + height: 20%; +} + .h-1\/6{ height: 16.666667%; } @@ -1844,6 +1868,10 @@ video { height: 80px; } +.h-\[90\%\]{ + height: 90%; +} + .h-\[90px\]{ height: 90px; } @@ -2086,6 +2114,10 @@ video { width: 25%; } +.w-1\/5{ + width: 20%; +} + .w-1\/6{ width: 16.666667%; } @@ -2098,6 +2130,10 @@ video { width: 83.333333%; } +.w-11{ + width: 2.75rem; +} + .w-11\/12{ width: 91.666667%; } @@ -2126,6 +2162,14 @@ video { width: 50%; } +.w-2\/5{ + width: 40%; +} + +.w-2\/6{ + width: 33.333333%; +} + .w-20{ width: 5rem; } @@ -2218,6 +2262,10 @@ video { width: 2rem; } +.w-8\/12{ + width: 66.666667%; +} + .w-9{ width: 2.25rem; } @@ -2226,6 +2274,10 @@ video { width: 75%; } +.w-\[10\%\]{ + width: 10%; +} + .w-\[100px\]{ width: 100px; } @@ -2278,6 +2330,10 @@ video { width: 200px; } +.w-\[24\%\]{ + width: 24%; +} + .w-\[27px\]{ width: 27px; } @@ -2346,6 +2402,10 @@ video { width: 8rem; } +.w-\[90\%\]{ + width: 90%; +} + .w-fit{ width: -webkit-fit-content; width: -moz-fit-content; @@ -2473,6 +2533,18 @@ video { transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } +.rotate-90{ + --tw-rotate: 90deg; + -webkit-transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + +.rotate-\[270deg\]{ + --tw-rotate: 270deg; + -webkit-transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + .scale-100{ --tw-scale-x: 1; --tw-scale-y: 1; @@ -2866,6 +2938,12 @@ video { margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse))); } +.space-x-3 > :not([hidden]) ~ :not([hidden]){ + --tw-space-x-reverse: 0; + margin-right: calc(0.75rem * var(--tw-space-x-reverse)); + margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse))); +} + .space-x-4 > :not([hidden]) ~ :not([hidden]){ --tw-space-x-reverse: 0; margin-right: calc(1rem * var(--tw-space-x-reverse)); @@ -4244,6 +4322,14 @@ video { padding: 2rem; } +.p-\[\.10rem\]{ + padding: .10rem; +} + +.p-\[0\.10rem\]{ + padding: 0.10rem; +} + .p-\[1px\]{ padding: 1px; } @@ -4464,6 +4550,10 @@ video { line-height: 2.25rem; } +.text-\[100\%\]{ + font-size: 100%; +} + .text-\[10px\]{ font-size: 10px; } @@ -4496,10 +4586,42 @@ video { font-size: 26px; } +.text-\[30\%\]{ + font-size: 30%; +} + +.text-\[40\%\]{ + font-size: 40%; +} + +.text-\[45\%\]{ + font-size: 45%; +} + +.text-\[50\%\]{ + font-size: 50%; +} + +.text-\[55\%\]{ + font-size: 55%; +} + +.text-\[60\%\]{ + font-size: 60%; +} + +.text-\[7px\]{ + font-size: 7px; +} + .text-\[8px\]{ font-size: 8px; } +.text-\[90\%\]{ + font-size: 90%; +} + .text-\[9px\]{ font-size: 9px; } @@ -4562,6 +4684,10 @@ video { font-weight: 600; } +.font-thin{ + font-weight: 100; +} + .uppercase{ text-transform: uppercase; } @@ -4658,6 +4784,11 @@ video { color: rgb(0 0 0 / var(--tw-text-opacity)); } +.text-blue-300{ + --tw-text-opacity: 1; + color: rgb(147 197 253 / var(--tw-text-opacity)); +} + .text-blue-400{ --tw-text-opacity: 1; color: rgb(96 165 250 / var(--tw-text-opacity)); @@ -4748,6 +4879,11 @@ video { color: rgb(249 115 22 / var(--tw-text-opacity)); } +.text-orange-600{ + --tw-text-opacity: 1; + color: rgb(234 88 12 / var(--tw-text-opacity)); +} + .text-red-400{ --tw-text-opacity: 1; color: rgb(248 113 113 / var(--tw-text-opacity)); @@ -5096,6 +5232,12 @@ video { filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); } +.sepia{ + --tw-sepia: sepia(100%); + -webkit-filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} + .filter{ -webkit-filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); diff --git a/launcher/src/background.js b/launcher/src/background.js index d8ed5095a..d83143082 100755 --- a/launcher/src/background.js +++ b/launcher/src/background.js @@ -18,7 +18,6 @@ import path from "path"; import { readFileSync } from "fs"; import url from "url"; import checkSigningKeys from "./backend/web3/CSM.js"; -const loudness = require("loudness"); const isDevelopment = process.env.NODE_ENV !== "production"; const nodeConnection = new NodeConnection(); const storageService = new StorageService(); @@ -692,15 +691,6 @@ ipcMain.handle("checkConnectionQuality", async (event, args) => { return await nodeConnection.sshService.checkConnectionQuality(args); }); -ipcMain.handle("set-system-volume", async (event, volume) => { - await loudness.setVolume(volume * 100); -}); - -ipcMain.handle("get-system-volume", async () => { - const volume = await loudness.getVolume(); - return volume / 100; -}); - ipcMain.handle("startShell", async (event) => { if (!nodeConnection.sshService.shellStream) { try { diff --git a/launcher/src/components/UI/node-page/components/alert/NodeAlert.vue b/launcher/src/components/UI/node-page/components/alert/NodeAlert.vue index 274c39a7b..6cbeef823 100755 --- a/launcher/src/components/UI/node-page/components/alert/NodeAlert.vue +++ b/launcher/src/components/UI/node-page/components/alert/NodeAlert.vue @@ -351,7 +351,6 @@ export default { criticalCsm: [], notifCsm: [], csmInterval: null, - volumeSyncInterval: null, }; }, computed: { @@ -455,7 +454,6 @@ export default { }, }, mounted() { - this.volumeSyncInterval = setInterval(this.syncSystemVolume, 2000); this.checkSettings(); this.readService(); this.watchAlertStatus(); @@ -472,7 +470,6 @@ export default { }, 120000); }, beforeUnmount() { - clearInterval(this.volumeSyncInterval); clearInterval(this.polling); if (this.obolInterval) { clearInterval(this.obolInterval); @@ -562,25 +559,10 @@ export default { } }, - async volToggle() { - if (this.volState) { - this.currentVolume = await window.promiseIpc.getVolume(); - await window.promiseIpc.setVolume(0); - this.volState = false; - } else { - await window.promiseIpc.setVolume(this.currentVolume || 0.95); - this.volState = true; - } - }, - - async syncSystemVolume() { - try { - const systemVolume = await window.promiseIpc.getVolume(); - this.currentVolume = systemVolume; - this.volState = systemVolume > 0; - } catch (error) { - console.error("Failed to sync system volume:", error); - } + volToggle() { + this.volState = !this.volState; + this.updateSettings(this.volState ? 0.95 : 0); + this.cursorLocation = ``; }, iconFilter(arg) { if (arg.name === "PrometheusNodeExporter") { diff --git a/launcher/src/components/UI/setting-page/components/VolumeSlider.vue b/launcher/src/components/UI/setting-page/components/VolumeSlider.vue index f33bf1de9..da5c5d7c9 100644 --- a/launcher/src/components/UI/setting-page/components/VolumeSlider.vue +++ b/launcher/src/components/UI/setting-page/components/VolumeSlider.vue @@ -21,11 +21,9 @@ import { ref, onMounted, onUnmounted } from "vue"; import { useLangStore } from "@/store/languages"; import { useSoundStore } from "@/store/sound"; import ControlService from "@/store/ControlService"; -import { useFooter } from "@/store/theFooter"; const soundStore = useSoundStore(); const langStore = useLangStore(); -const footerStore = useFooter(); const sliderBar = ref(null); const volumePercentage = ref(95); @@ -33,12 +31,17 @@ const volumePercentage = ref(95); const checkSettings = async () => { try { const savedConfig = await ControlService.readConfig(); + if (savedConfig?.savedVolume?.volume) { langStore.currentVolume = savedConfig.savedVolume.volume; + volumePercentage.value = savedConfig.savedVolume.volume * 100; + } else if (savedConfig?.savedVolume?.volume === 0) { + langStore.currentVolume = 0; + volumePercentage.value = 0; } else { - langStore.currentVolume = await window.promiseIpc.getVolume(); + langStore.currentVolume = 0.95; + volumePercentage.value = 95; } - volumePercentage.value = langStore.currentVolume * 100; } catch (error) { console.error("Failed to load saved settings:", error); } @@ -62,21 +65,9 @@ const updateVolume = async (clientX) => { const newVolume = Math.max(0, Math.min(1, (clientX - barRect.left) / barRect.width)); langStore.currentVolume = newVolume; volumePercentage.value = newVolume * 100; - - await window.promiseIpc.setVolume(langStore.currentVolume); - - footerStore.volState = newVolume > 0; - await updateSettings(langStore.currentVolume); }; -const syncSystemVolume = async () => { - const systemVolume = await window.promiseIpc.getVolume(); - langStore.currentVolume = systemVolume; - volumePercentage.value = systemVolume * 100; - footerStore.volState = systemVolume > 0; -}; - const playSoundEffect = async (base64Data) => { const audio = new Audio(base64Data); audio.volume = langStore.currentVolume; @@ -114,20 +105,16 @@ const startDrag = () => { document.addEventListener("mouseup", onMouseUp); }; -let volumeSyncInterval; onMounted(() => { checkSettings(); sliderBar.value.addEventListener("click", (event) => { updateVolume(event.clientX); }); - - volumeSyncInterval = setInterval(syncSystemVolume, 2000); }); onUnmounted(() => { document.removeEventListener("mousemove", onMouseMove); document.removeEventListener("mouseup", onMouseUp); - clearInterval(volumeSyncInterval); }); diff --git a/launcher/src/components/UI/the-control/ControlAlert.vue b/launcher/src/components/UI/the-control/ControlAlert.vue index a4b8ea51f..3570812a7 100755 --- a/launcher/src/components/UI/the-control/ControlAlert.vue +++ b/launcher/src/components/UI/the-control/ControlAlert.vue @@ -348,7 +348,6 @@ export default { criticalCsm: [], notifCsm: [], csmInterval: null, - volumeSyncInterval: null, }; }, computed: { @@ -380,7 +379,6 @@ export default { ...mapWritableState(useFooter, { cursorLocation: "cursorLocation", volState: "volState", - isMuted: "isMuted", }), pointStatus() { let port = []; @@ -457,11 +455,8 @@ export default { this.csmInterval = setInterval(() => { this.fetchCsm(); }, 120000); - - this.volumeSyncInterval = setInterval(this.syncSystemVolume, 2000); }, beforeUnmount() { - clearInterval(this.volumeSyncInterval); clearInterval(this.polling); if (this.obolInterval) { clearInterval(this.obolInterval); @@ -550,26 +545,10 @@ export default { } }, - async volToggle() { - if (this.volState) { - this.currentVolume = await window.promiseIpc.getVolume(); - await window.promiseIpc.setVolume(0); - this.volState = false; - } else { - await window.promiseIpc.setVolume(this.currentVolume || 0.95); - this.volState = true; - } - }, - - async syncSystemVolume() { - try { - const systemVolume = await window.promiseIpc.getVolume(); - - this.currentVolume = systemVolume; - this.volState = systemVolume > 0; - } catch (error) { - console.error("Failed to sync system volume:", error); - } + volToggle() { + this.volState = !this.volState; + this.updateSettings(this.volState ? 0.95 : 0); + this.cursorLocation = ``; }, iconFilter(arg) { if (arg.name === "PrometheusNodeExporter") { diff --git a/launcher/src/preload.js b/launcher/src/preload.js index 9b099fc8e..d779442e4 100755 --- a/launcher/src/preload.js +++ b/launcher/src/preload.js @@ -11,8 +11,4 @@ contextBridge.exposeInMainWorld("promiseIpc", { ipcRenderer.on("terminal-output", (_, arg) => callback(arg)); return () => ipcRenderer.removeListener("terminal-output", callback); }, - - // Audio control functions - setVolume: (volume) => ipcRenderer.invoke("set-system-volume", volume), - getVolume: () => ipcRenderer.invoke("get-system-volume"), }); diff --git a/launcher/src/store/theFooter.js b/launcher/src/store/theFooter.js index da3e7eb70..59247af58 100644 --- a/launcher/src/store/theFooter.js +++ b/launcher/src/store/theFooter.js @@ -18,11 +18,9 @@ export const useFooter = defineStore("theFooter", { missingServices: false, prometheusIsOff: false, nodataMessage: "", - + volState: false, idleTimer: false, idleTimerTime: 5, - volState: true, - isMuted: false, }; }, getters: {},