feat: add DOMAIN_LABELS for chinese domain label (#322)

This commit is contained in:
Dream Hunter
2024-06-28 22:25:06 +08:00
committed by GitHub
parent de7c3d5176
commit 881e66e484
17 changed files with 1900 additions and 1659 deletions

View File

@@ -53,15 +53,16 @@ const apiFetch = async (path, options = {}) => {
const getOpenSettings = async (message) => {
try {
const res = await api.fetch("/open_api/settings");
const domainLabels = res["domainLabels"] || [];
Object.assign(openSettings.value, {
title: res["title"] || "",
prefix: res["prefix"] || "",
minAddressLen: res["minAddressLen"] || 1,
maxAddressLen: res["maxAddressLen"] || 30,
needAuth: res["needAuth"] || false,
domains: res["domains"].map((domain) => {
domains: res["domains"].map((domain, index) => {
return {
label: domain,
label: domainLabels.length > index ? domainLabels[index] : domain,
value: domain
}
}),