From 45a6ced462526f2cbf1b395465ce8bcdec87d293 Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Mon, 4 Dec 2023 19:03:41 +0100 Subject: [PATCH] new login face #1286 --- web/html/login.html | 107 +++++++++++++++++++++++++++++++++----------- 1 file changed, 81 insertions(+), 26 deletions(-) diff --git a/web/html/login.html b/web/html/login.html index 61381a61..40ce2a80 100644 --- a/web/html/login.html +++ b/web/html/login.html @@ -3,10 +3,6 @@ {{template "head" .}} - + @@ -121,7 +189,6 @@ lang: "" }, async created() { - this.updateBackground(); this.lang = getLang(); this.secretEnable = await this.getSecretStatus(); }, @@ -143,18 +210,6 @@ return msg.obj; } }, - updateBackground() { - const leftColor = RandomUtil.randomIntRange(0x222222, 0xFFFFFF / 2).toString(16); - const rightColor = RandomUtil.randomIntRange(0xFFFFFF / 2, 0xDDDDDD).toString(16); - const deg = RandomUtil.randomIntRange(0, 360); - const background = `linear-gradient(${deg}deg, #${leftColor} 10%, #${rightColor} 100%)`; - document.querySelector('#app').style.background = this.themeSwitcher.isDarkTheme ? colors.dark.bg : background; - }, - }, - watch: { - 'themeSwitcher.isDarkTheme'(newVal, oldVal) { - this.updateBackground(); - }, }, });