From 0f0e3de9353c06dfaabc00682b4c2fd9c5f48924 Mon Sep 17 00:00:00 2001 From: Minteck <46352972+Minteck@users.noreply.github.com> Date: Wed, 14 Jul 2021 01:12:14 +0200 Subject: Kartik Fox Nest! --- views/script/settings_load.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'views/script/settings_load.js') diff --git a/views/script/settings_load.js b/views/script/settings_load.js index 030a7dd..b15b125 100644 --- a/views/script/settings_load.js +++ b/views/script/settings_load.js @@ -9,7 +9,7 @@ if (require('@electron/remote').getCurrentWindow().music) { document.getElementById("setting-music").innerText = "0"; } -if (require('fs').readFileSync(homedir + "/.kartik/config/voice.txt").toString() === "2") { +if (currentNest.config.voice === true) { document.getElementById("setting-voice").innerText = "1"; } else { document.getElementById("setting-voice").innerText = "0"; -- cgit From d5a620cf09b835db2bccd99556525c90b458719f Mon Sep 17 00:00:00 2001 From: Minteck Date: Thu, 5 Aug 2021 17:21:23 +0200 Subject: i18n for 21.08 --- views/script/settings_load.js | 50 +++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'views/script/settings_load.js') diff --git a/views/script/settings_load.js b/views/script/settings_load.js index b15b125..e2bad80 100644 --- a/views/script/settings_load.js +++ b/views/script/settings_load.js @@ -1,25 +1,25 @@ -info("OptnWindow", "Restoring settings..."); - -if (require('@electron/remote').getCurrentWindow().music) { - if (location.search === "?credits") { - require('electron').ipcRenderer.send('newmusic', kresources.music['title'].file); - } - document.getElementById("setting-music").innerText = "1"; -} else { - document.getElementById("setting-music").innerText = "0"; -} - -if (currentNest.config.voice === true) { - document.getElementById("setting-voice").innerText = "1"; -} else { - document.getElementById("setting-voice").innerText = "0"; -} - -slang = require('@electron/remote').getCurrentWindow().lp; -langs = require('../lang/languages.json'); - -if (Object.keys(langs).includes(slang)) { - document.getElementById("setting-lang").innerText = langs[slang]; -} else { - document.getElementById("setting-lang").innerText = slang; -} +info("OptnWindow", "Restoring settings..."); + +if (require('@electron/remote').getCurrentWindow().music) { + if (location.search === "?credits") { + require('electron').ipcRenderer.send('newmusic', kresources.music['title'].file); + } + document.getElementById("setting-music").innerText = "1"; +} else { + document.getElementById("setting-music").innerText = "0"; +} + +if (currentNest.config.voice === true) { + document.getElementById("setting-voice").innerText = "1"; +} else { + document.getElementById("setting-voice").innerText = "0"; +} + +slang = require('@electron/remote').getCurrentWindow().lp; +langs = require('../lang/languages.json'); + +if (Object.keys(langs).includes(slang)) { + document.getElementById("setting-lang").innerText = langs[slang]; +} else { + document.getElementById("setting-lang").innerText = slang; +} -- cgit