1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-02-11 18:39:21 +00:00

move _'s from setting.id to title

This commit is contained in:
Dimava 2020-05-29 11:01:49 +03:00
parent 07ed85f9a3
commit 6176338e1f
2 changed files with 6 additions and 8 deletions

View File

@ -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);

View File

@ -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 `
<div class="setting cardbox ${this.enabled ? "enabled" : "disabled"}">
${this.enabled ? "" : standaloneOnlySettingHtml}