From 1a53af0434d2f1baa12a7e6e3559494c8637840a Mon Sep 17 00:00:00 2001 From: "Shishkevich D." <135337715+shishkevichd@users.noreply.github.com> Date: Fri, 18 Apr 2025 17:55:09 +0700 Subject: [PATCH] chore: deleting unnecessary functions --- web/html/settings.html | 10 +--------- web/html/xray.html | 43 +----------------------------------------- 2 files changed, 2 insertions(+), 51 deletions(-) diff --git a/web/html/settings.html b/web/html/settings.html index ab72bca7..82e636d9 100644 --- a/web/html/settings.html +++ b/web/html/settings.html @@ -319,19 +319,11 @@ this.loading(false); await this.updateAllSetting(); }, - generateRandomString(length) { - var chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"; - let randomString = ""; - for (let i = 0; i < length; i++) { - randomString += chars[Math.floor(Math.random() * chars.length)]; - } - return randomString; - }, async getNewSecret() { if (!this.changeSecret) { this.changeSecret = true; this.user.loginSecret = ''; - const newSecret = this.generateRandomString(64); + const newSecret = RandomUtil.randomSeq(64); await PromiseUtil.sleep(1000); this.user.loginSecret = newSecret; this.changeSecret = false; diff --git a/web/html/xray.html b/web/html/xray.html index 68c71523..0dfbdf50 100644 --- a/web/html/xray.html +++ b/web/html/xray.html @@ -131,7 +131,7 @@ {{template "modals/fakednsModal"}} {{template "modals/warpModal"}}