From 6176338e1fa0fd1d9a7da3fc2a82fea5814c47e5 Mon Sep 17 00:00:00 2001 From: Dimava Date: Fri, 29 May 2020 11:01:49 +0300 Subject: [PATCH] move _'s from setting.id to title --- src/js/profile/application_settings.js | 10 +++------- src/js/profile/setting_types.js | 4 +++- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/js/profile/application_settings.js b/src/js/profile/application_settings.js index 93557f4c..9b0fa3c3 100644 --- a/src/js/profile/application_settings.js +++ b/src/js/profile/application_settings.js @@ -207,13 +207,9 @@ export const allDebugSettings = []; for (const k in globalConfig.debug) { if (!IS_DEBUG) break; allDebugSettings.push( - new BoolSetting( - "debug_" + k.replace(/([a-z])([A-Z])/g, (s, a, b) => `${a}_${b}`), - categoryDebug, - (app, value) => { - if (globalConfig.debug.enableDebugSettings) globalConfig.debug[k] = value; - } - ) + new BoolSetting("debug_" + k, categoryDebug, (app, value) => { + if (globalConfig.debug.enableDebugSettings) globalConfig.debug[k] = value; + }) ); } allApplicationSettings.push(...allDebugSettings); diff --git a/src/js/profile/setting_types.js b/src/js/profile/setting_types.js index 152b8c51..fbf12449 100644 --- a/src/js/profile/setting_types.js +++ b/src/js/profile/setting_types.js @@ -187,7 +187,9 @@ export class BoolSetting extends BaseSetting { } getHtml() { - const label = T.settings.labels[this.id] || { title: this.id }; + const label = T.settings.labels[this.id] || { + title: this.id.replace(/([a-z])([A-Z])/g, (s, a, b) => `${a}_${b}`), + }; return `
${this.enabled ? "" : standaloneOnlySettingHtml}