refactor: 💡 fix typo and imporve code quality

This commit is contained in:
Jin
2025-03-29 01:00:08 +01:00
parent bd092e0119
commit 2eeb376d24
8 changed files with 40 additions and 49 deletions

View File

@@ -50,13 +50,6 @@ export default class AbstractCodeTypeWidget extends TypeWidget {
matchTags: { bothTags: true },
highlightSelectionMatches: { showToken: false, annotateScrollbar: false },
lineNumbers: true,
keyMap: "default",
lint: false,
gutters: [],
tabindex: 0,
dragDrop: true,
placeholder: "",
readOnly: false,
// we line wrap partly also because without it horizontal scrollbar displays only when you scroll
// all the way to the bottom of the note. With line wrap, there's no horizontal scrollbar so no problem
lineWrapping: options.is("codeLineWrapEnabled"),

View File

@@ -6,7 +6,7 @@ import { t } from "../../../services/i18n.js";
import utils from "../../../services/utils.js";
import dialogService from "../../../services/dialog.js";
const TPL_WEB = `
const TPL = `
<div class="options-section">
<h4>${t("multi_factor_authentication.title")}</h4>
<p class="form-text">${t("multi_factor_authentication.description")}</p>
@@ -147,7 +147,7 @@ export default class MultiFactorAuthenticationOptions extends OptionsWidget {
private $missingVars!: JQuery<HTMLElement>;
doRender() {
const template = utils.isElectron() ? TPL_ELECTRON : TPL_WEB;
const template = utils.isElectron() ? TPL_ELECTRON : TPL;
this.$widget = $(template);
if (!utils.isElectron()) {