feat: prefer SuperAdmin get_user/get_version for admin config

Resolve tenant domain (localhost fallback) and query adm.montzar.ir
first for version and user config; refresh components.d.ts types.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-10 17:42:40 +03:30
co-authored by Cursor
parent de97d7caa6
commit 035ba50bc0
2 changed files with 14 additions and 0 deletions
+2
View File
@@ -92,6 +92,8 @@ declare module '@vue/runtime-core' {
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
SmsCreditWidget: typeof import('./src/components/SmsCreditWidget.vue')['default']
SmsNegativeBalanceHost: typeof import('./src/components/SmsNegativeBalanceHost.vue')['default']
SmsNegativeBalanceModal: typeof import('./src/components/SmsNegativeBalanceModal.vue')['default']
TahesabRetryModal: typeof import('./src/components/TahesabRetryModal.vue')['default']
ThemeMenuSection: typeof import('./src/core/components/ThemeMenuSection.vue')['default']
ThemeToggle: typeof import('./src/core/components/ThemeToggle.vue')['default']
+12
View File
@@ -29,10 +29,20 @@
return window.location.protocol === 'https:' ? 'https:' : 'http:';
}
function resolveTenantDomain() {
const host = String(window.location.hostname || '').trim();
if (!host || host === 'localhost' || host === '127.0.0.1') {
return 'k.montzar.ir';
}
return host;
}
function getVersionUrls() {
const protocol = getProtocol();
const domain = encodeURIComponent(resolveTenantDomain());
return [
'https://adm.montzar.ir/get_version?domain=' + domain,
'https://nerkh.gold/get_version',
'https://tablo.talasevin.ir/get_version',
'https://abshode-service.montgit.ir/server/get_version',
@@ -43,8 +53,10 @@
function getConfigUrls() {
const protocol = getProtocol();
const domain = encodeURIComponent(resolveTenantDomain());
return [
'https://adm.montzar.ir/get_user?domain=' + domain,
protocol + '//nerkh.gold/get_user',
protocol + '//tablo.talasevin.ir/get_user',
protocol + '//abshode-service.montgit.ir/server/get_user',