removed dependency by moving click handlers

part of #2462
This commit is contained in:
Miodec 2022-02-11 16:23:03 +01:00
parent 58ac17fa1e
commit 2878fb03e0
2 changed files with 11 additions and 12 deletions

View file

@ -552,3 +552,14 @@ $(".pageLogin .register .button").click((e) => {
if ($(".pageLogin .register .button").hasClass("disabled")) return;
signUp();
});
$(".pageSettings #addGoogleAuth").on("click", async (e) => {
await addGoogleAuth();
setTimeout(() => {
window.location.reload();
}, 1000);
});
$(".pageSettings #removeGoogleAuth").on("click", (e) => {
removeGoogleAuth();
});

View file

@ -12,7 +12,6 @@ import * as PresetController from "../controllers/preset-controller";
import * as ThemePicker from "../settings/theme-picker";
import * as ImportExportSettingsPopup from "../popups/import-export-settings-popup";
import * as CustomThemePopup from "../popups/custom-theme-popup";
import * as AccountController from "../controllers/account-controller";
import Page from "./page";
export let groups = {};
@ -862,17 +861,6 @@ $(".pageSettings .sectionGroupTitle").click((e) => {
toggleSettingsGroup($(e.currentTarget).attr("group"));
});
$(".pageSettings #addGoogleAuth").on("click", async (e) => {
await AccountController.addGoogleAuth();
setTimeout(() => {
window.location.reload();
}, 1000);
});
$(".pageSettings #removeGoogleAuth").on("click", (e) => {
AccountController.removeGoogleAuth();
});
$(".pageSettings .section.customBackgroundSize .inputAndButton .save").on(
"click",
(e) => {