diff --git a/install.sh b/install.sh index ee0217cc..1ff18dfd 100644 --- a/install.sh +++ b/install.sh @@ -786,18 +786,16 @@ config_after_install() { # 全新安装:用户输入或随机生成凭据 echo -e "${yellow}设置面板凭据(输入 rd 或留空将自动生成):${plain}" - read -rp "请输入用户名:" config_username + read -rp "请输入用户名 [默认 admin]:" config_username config_username="${config_username// /}" if [[ -z "$config_username" || "$config_username" == "rd" ]]; then - config_username=$(gen_random_string 10) - echo -e "${green}已生成随机用户名:${config_username}${plain}" + config_username="admin" fi - read -rp "请输入密码:" config_password + read -rp "请输入密码 [默认 admin]:" config_password config_password="${config_password// /}" if [[ -z "$config_password" || "$config_password" == "rd" ]]; then - config_password=$(gen_random_string 10) - echo -e "${green}已生成随机密码:${config_password}${plain}" + config_password="admin" fi read -rp "请输入 Web 路径(不含前导 /):" config_webBasePath diff --git a/web/assets/js/util/index.js b/web/assets/js/util/index.js index e69f3341..828ae67f 100644 --- a/web/assets/js/util/index.js +++ b/web/assets/js/util/index.js @@ -719,70 +719,15 @@ class URLBuilder { class LanguageManager { static supportedLanguages = [ - { - name: "العربية", - value: "ar-EG", - icon: "🇪🇬", - }, { name: "English", value: "en-US", icon: "🇺🇸", }, - { - name: "فارسی", - value: "fa-IR", - icon: "🇮🇷", - }, { name: "简体中文", value: "zh-CN", icon: "🇨🇳", - }, - { - name: "繁體中文", - value: "zh-TW", - icon: "🇹🇼", - }, - { - name: "日本語", - value: "ja-JP", - icon: "🇯🇵", - }, - { - name: "Русский", - value: "ru-RU", - icon: "🇷🇺", - }, - { - name: "Tiếng Việt", - value: "vi-VN", - icon: "🇻🇳", - }, - { - name: "Español", - value: "es-ES", - icon: "🇪🇸", - }, - { - name: "Indonesian", - value: "id-ID", - icon: "🇮🇩", - }, - { - name: "Український", - value: "uk-UA", - icon: "🇺🇦", - }, - { - name: "Türkçe", - value: "tr-TR", - icon: "🇹🇷", - }, - { - name: "Português", - value: "pt-BR", - icon: "🇧🇷", } ] @@ -793,25 +738,6 @@ class LanguageManager { if (window.navigator) { lang = window.navigator.language || window.navigator.userLanguage; - const simularLangs = [ - ["ar", this.supportedLanguages[0].value], - ["fa", this.supportedLanguages[2].value], - ["ja", this.supportedLanguages[5].value], - ["ru", this.supportedLanguages[6].value], - ["vi", this.supportedLanguages[7].value], - ["es", this.supportedLanguages[8].value], - ["id", this.supportedLanguages[9].value], - ["uk", this.supportedLanguages[10].value], - ["tr", this.supportedLanguages[11].value], - ["pt", this.supportedLanguages[12].value], - ] - - simularLangs.forEach((pair) => { - if (lang === pair[0]) { - lang = pair[1]; - } - }); - if (LanguageManager.isSupportLanguage(lang)) { CookieManager.setCookie("lang", lang, 150); } else { diff --git a/web/html/user.html b/web/html/user.html index 7ea320c4..4fab0d00 100644 --- a/web/html/user.html +++ b/web/html/user.html @@ -75,6 +75,15 @@ + + + + +