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:
Vendored
+2
@@ -92,6 +92,8 @@ declare module '@vue/runtime-core' {
|
|||||||
RouterLink: typeof import('vue-router')['RouterLink']
|
RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
RouterView: typeof import('vue-router')['RouterView']
|
RouterView: typeof import('vue-router')['RouterView']
|
||||||
SmsCreditWidget: typeof import('./src/components/SmsCreditWidget.vue')['default']
|
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']
|
TahesabRetryModal: typeof import('./src/components/TahesabRetryModal.vue')['default']
|
||||||
ThemeMenuSection: typeof import('./src/core/components/ThemeMenuSection.vue')['default']
|
ThemeMenuSection: typeof import('./src/core/components/ThemeMenuSection.vue')['default']
|
||||||
ThemeToggle: typeof import('./src/core/components/ThemeToggle.vue')['default']
|
ThemeToggle: typeof import('./src/core/components/ThemeToggle.vue')['default']
|
||||||
|
|||||||
@@ -29,10 +29,20 @@
|
|||||||
return window.location.protocol === 'https:' ? 'https:' : 'http:';
|
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() {
|
function getVersionUrls() {
|
||||||
const protocol = getProtocol();
|
const protocol = getProtocol();
|
||||||
|
const domain = encodeURIComponent(resolveTenantDomain());
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
'https://adm.montzar.ir/get_version?domain=' + domain,
|
||||||
'https://nerkh.gold/get_version',
|
'https://nerkh.gold/get_version',
|
||||||
'https://tablo.talasevin.ir/get_version',
|
'https://tablo.talasevin.ir/get_version',
|
||||||
'https://abshode-service.montgit.ir/server/get_version',
|
'https://abshode-service.montgit.ir/server/get_version',
|
||||||
@@ -43,8 +53,10 @@
|
|||||||
|
|
||||||
function getConfigUrls() {
|
function getConfigUrls() {
|
||||||
const protocol = getProtocol();
|
const protocol = getProtocol();
|
||||||
|
const domain = encodeURIComponent(resolveTenantDomain());
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
'https://adm.montzar.ir/get_user?domain=' + domain,
|
||||||
protocol + '//nerkh.gold/get_user',
|
protocol + '//nerkh.gold/get_user',
|
||||||
protocol + '//tablo.talasevin.ir/get_user',
|
protocol + '//tablo.talasevin.ir/get_user',
|
||||||
protocol + '//abshode-service.montgit.ir/server/get_user',
|
protocol + '//abshode-service.montgit.ir/server/get_user',
|
||||||
|
|||||||
Reference in New Issue
Block a user