Deployment vorbereitet mit URI-Prefix

This commit is contained in:
concierge committed 2026-10-29 16:22:46 +01:00
1 parent b41c3bc3a6
commit fa02a7ade0
11 files changed
+183 -22

No files matched your search

+5 -4
View File
@@ -1,9 +1,10 @@
/*
* Mobile Views: Dispatcher-Mobil & Gruppen
*/
const tenant = window.CMBNET_TENANT || window.location.pathname.split('/')[1];
const apiBase = `/${tenant}/api`;
const wsUrl = `${window.location.protocol === 'https:' ? 'wss' : 'ws'}://${window.location.host}/${tenant}/ws`;
const appUrl = window.CMBNET_APP_URL || ((path) => `/${String(path || '').replace(/^\/+/, '')}`);
const tenant = window.CMBNET_TENANT || '';
const apiBase = appUrl(`${tenant}/api`);
const wsUrl = `${window.location.protocol === 'https:' ? 'wss' : 'ws'}://${window.location.host}${appUrl(`${tenant}/ws`)}`;
const storageKey = `cmbnet:${tenant}:mobile`;
const viewMode = window.CMBNET_VIEW_MODE || 'mobile_dispatcher';
const currentAccountId = Number(window.CMBNET_ACCOUNT_ID) || null;
@@ -315,7 +316,7 @@ function bindTabs() {
function bindButtons() {
const logout = document.getElementById('mobileLogout');
if (logout) logout.addEventListener('click', () => {window.location.href = window.CMBNET_LOGOUT_URL || '/';});
if (logout) logout.addEventListener('click', () => {window.location.href = window.CMBNET_LOGOUT_URL || appUrl('');});
const todoBtn = document.getElementById('mobileTodoBtn');
if (todoBtn) todoBtn.addEventListener('click', openStreetSelectDialog);