经理中心
This commit is contained in:
parent
b603946051
commit
80f529c6f2
@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
|
||||
<title>Manager Center</title>
|
||||
<link rel="stylesheet" href="./style.css?v=20260622-0100" />
|
||||
<link rel="stylesheet" href="./style.css?v=20260624-0100" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="manager-center" aria-label="Manager Center" data-i18n-aria="page_label" data-loading="true">
|
||||
@ -280,6 +280,6 @@
|
||||
</div>
|
||||
<div class="toast" id="toast" role="status" hidden></div>
|
||||
</div>
|
||||
<script src="./script.js?v=20260622-0100" defer></script>
|
||||
<script src="./script.js?v=20260624-0100" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
"target_user": "المستخدم المستهدف",
|
||||
"current_country": "Current country",
|
||||
"change_country": "Change Country",
|
||||
"change_country_disabled": "Change Country disabled",
|
||||
"select_country": "Select country",
|
||||
"changing_country": "Changing...",
|
||||
"country_changed": "Country changed",
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
"target_user": "Target User",
|
||||
"current_country": "Current country",
|
||||
"change_country": "Change Country",
|
||||
"change_country_disabled": "Change Country disabled",
|
||||
"select_country": "Select country",
|
||||
"changing_country": "Changing...",
|
||||
"country_changed": "Country changed",
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
"target_user": "Pengguna Target",
|
||||
"current_country": "Current country",
|
||||
"change_country": "Change Country",
|
||||
"change_country_disabled": "Change Country disabled",
|
||||
"select_country": "Select country",
|
||||
"changing_country": "Changing...",
|
||||
"country_changed": "Country changed",
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
"target_user": "Hedef Kullanıcı",
|
||||
"current_country": "Current country",
|
||||
"change_country": "Change Country",
|
||||
"change_country_disabled": "Change Country disabled",
|
||||
"select_country": "Select country",
|
||||
"changing_country": "Changing...",
|
||||
"country_changed": "Country changed",
|
||||
|
||||
@ -27,6 +27,7 @@
|
||||
target_user: "Target User",
|
||||
current_country: "Current country",
|
||||
change_country: "Change Country",
|
||||
change_country_disabled: "Change Country disabled",
|
||||
select_country: "Select country",
|
||||
changing_country: "Changing...",
|
||||
country_changed: "Country changed",
|
||||
@ -109,6 +110,7 @@
|
||||
target_user: "المستخدم المستهدف",
|
||||
current_country: "Current country",
|
||||
change_country: "Change Country",
|
||||
change_country_disabled: "Change Country disabled",
|
||||
select_country: "Select country",
|
||||
changing_country: "Changing...",
|
||||
country_changed: "Country changed",
|
||||
@ -191,6 +193,7 @@
|
||||
target_user: "Hedef Kullanıcı",
|
||||
current_country: "Current country",
|
||||
change_country: "Change Country",
|
||||
change_country_disabled: "Change Country disabled",
|
||||
select_country: "Select country",
|
||||
changing_country: "Changing...",
|
||||
country_changed: "Country changed",
|
||||
@ -273,6 +276,7 @@
|
||||
target_user: "Pengguna Target",
|
||||
current_country: "Current country",
|
||||
change_country: "Change Country",
|
||||
change_country_disabled: "Change Country disabled",
|
||||
select_country: "Select country",
|
||||
changing_country: "Changing...",
|
||||
country_changed: "Country changed",
|
||||
@ -410,7 +414,7 @@
|
||||
if (window.location.protocol === "file:") return fallbackMessages[normalizedLang];
|
||||
|
||||
try {
|
||||
const response = await fetch(`./locales/${normalizedLang}.json?v=20260622-0100`, { cache: "no-store" });
|
||||
const response = await fetch(`./locales/${normalizedLang}.json?v=20260624-0100`, { cache: "no-store" });
|
||||
if (response.ok) return await response.json();
|
||||
} catch (error) {
|
||||
return fallbackMessages[normalizedLang];
|
||||
@ -754,6 +758,10 @@
|
||||
}
|
||||
|
||||
async function openCountryModal() {
|
||||
if (!featureEnabled("changeCountry")) {
|
||||
showToast(message("change_country_disabled"));
|
||||
return;
|
||||
}
|
||||
if (!state.target) {
|
||||
showToast(message("enter_user"));
|
||||
return;
|
||||
@ -868,7 +876,8 @@
|
||||
addBdLeader: true,
|
||||
giftProps: true,
|
||||
banUser: true,
|
||||
unbanUser: true
|
||||
unbanUser: true,
|
||||
changeCountry: true
|
||||
};
|
||||
}
|
||||
|
||||
@ -877,7 +886,8 @@
|
||||
addBdLeader: features?.addBdLeader !== false,
|
||||
giftProps: features?.giftProps !== false,
|
||||
banUser: features?.banUser !== false,
|
||||
unbanUser: features?.unbanUser !== false
|
||||
unbanUser: features?.unbanUser !== false,
|
||||
changeCountry: features?.changeCountry !== false
|
||||
};
|
||||
}
|
||||
|
||||
@ -1152,9 +1162,11 @@
|
||||
if (title) title.textContent = disabledByFeature ? message("gift_props_disabled") : message("gift_props");
|
||||
}
|
||||
if (countryEntryButton) {
|
||||
countryEntryButton.disabled = !state.target || state.countriesLoading || state.changingCountry;
|
||||
const disabledByFeature = !featureEnabled("changeCountry");
|
||||
countryEntryButton.disabled = disabledByFeature || !state.target || state.countriesLoading || state.changingCountry;
|
||||
countryEntryButton.classList.toggle("is-feature-disabled", disabledByFeature);
|
||||
const title = countryEntryButton.querySelector(".action-item-title");
|
||||
if (title) title.textContent = message("change_country");
|
||||
if (title) title.textContent = disabledByFeature ? message("change_country_disabled") : message("change_country");
|
||||
}
|
||||
if (banEntryButton) {
|
||||
const disabledByFeature = !featureEnabled("banUser");
|
||||
@ -1174,7 +1186,7 @@
|
||||
if (sendButton) sendButton.disabled = !featureEnabled("giftProps") || !state.target || !state.selectedPropsId;
|
||||
if (changeCountryButton) {
|
||||
const currentID = String(state.target?.countryId || matchingCountryId(state.target) || "");
|
||||
changeCountryButton.disabled = !state.target || state.countriesLoading || state.changingCountry || !state.selectedCountryId || state.selectedCountryId === currentID;
|
||||
changeCountryButton.disabled = !featureEnabled("changeCountry") || !state.target || state.countriesLoading || state.changingCountry || !state.selectedCountryId || state.selectedCountryId === currentID;
|
||||
changeCountryButton.textContent = state.changingCountry ? message("changing_country") : message("change_country");
|
||||
}
|
||||
if (banButton) banButton.disabled = !featureEnabled("banUser") || !canBanTarget(state.target);
|
||||
@ -1381,6 +1393,10 @@
|
||||
|
||||
async function changeUserCountry() {
|
||||
if (!state.target) return;
|
||||
if (!featureEnabled("changeCountry")) {
|
||||
setStatus($("#countryStatus"), message("change_country_disabled"), "error");
|
||||
return;
|
||||
}
|
||||
if (!state.selectedCountryId) {
|
||||
setStatus($("#countryStatus"), message("country_required"), "error");
|
||||
return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user