diff --git a/components.d.ts b/components.d.ts index 8394b59..c637b35 100644 --- a/components.d.ts +++ b/components.d.ts @@ -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'] diff --git a/src/config-loader.js b/src/config-loader.js index 29690a6..78683f3 100644 --- a/src/config-loader.js +++ b/src/config-loader.js @@ -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',