Mobile Views jetzt als PWA
This commit is contained in:
1 parent
d8692ab20e
commit
b41c3bc3a6
11 files changed
+785
-37
No files matched your search
@@ -0,0 +1,21 @@
|
||||
<dialog id="mobileInstallDialog">
|
||||
<article>
|
||||
<header>
|
||||
<h3>App installieren</h3>
|
||||
</header>
|
||||
<div class="dialog-body">
|
||||
<p>Installiere CMBNet als App auf dem Home-Bildschirm:</p>
|
||||
<p class="mobile-dialog-hint" id="mobileInstallGenericHint">
|
||||
Öffne das Browsermenü und wähle „App installieren“ bzw.
|
||||
„Zum Home-Bildschirm hinzufügen“.
|
||||
</p>
|
||||
<p class="mobile-dialog-hint" id="mobileInstallIosHint" hidden>
|
||||
iPhone/iPad (Safari): Teilen-Symbol antippen und
|
||||
„Zum Home-Bildschirm“ wählen.
|
||||
</p>
|
||||
</div>
|
||||
<footer>
|
||||
<button type="button" onclick="closeMobileInstall()">Schließen</button>
|
||||
</footer>
|
||||
</article>
|
||||
</dialog>
|
||||
@@ -6,6 +6,13 @@
|
||||
|
||||
{% block head %}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link rel="manifest" href="{{ url_for('views.manifest', tenant=session.tenant_code) }}">
|
||||
<meta name="theme-color" content="#2563eb">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||
<meta name="apple-mobile-web-app-title" content="CMBNet">
|
||||
<link rel="apple-touch-icon" href="{{ url_for('static', filename='img/apple-touch-icon.png') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/pico.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/leaflet.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/mobile.css') }}">
|
||||
@@ -18,6 +25,7 @@
|
||||
<header class="mobile-header">
|
||||
<div class="mobile-header-row">
|
||||
<select id="mobileGroupSelect" class="mobile-group-select" aria-label="Gruppe auswählen"></select>
|
||||
<button type="button" id="mobileInstallBtn" class="mobile-icon-btn" aria-label="App installieren" title="App installieren" hidden>📲</button>
|
||||
<button type="button" id="mobileLogout" class="mobile-icon-btn" aria-label="Abmelden" title="Abmelden">⏻</button>
|
||||
</div>
|
||||
</header>
|
||||
@@ -102,12 +110,17 @@
|
||||
<option value="aerial">Luftbild</option>
|
||||
</select>
|
||||
</label>
|
||||
<div class="mobile-settings-row">
|
||||
<span>Benachrichtigungen</span>
|
||||
<button type="button" id="mobileNotifyBtn" class="secondary mobile-settings-button">Aktivieren</button>
|
||||
</div>
|
||||
</div>
|
||||
<footer>
|
||||
<button type="button" onclick="closeMobileSettings()">Schließen</button>
|
||||
</footer>
|
||||
</article>
|
||||
</dialog>
|
||||
{% include "_pwa_install_dialog.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
@@ -116,6 +129,9 @@
|
||||
window.CMBNET_ACCOUNT_ID = {{ session.account_id|tojson }};
|
||||
window.CMBNET_ROLE = {{ session.role|tojson }};
|
||||
window.CMBNET_LOGOUT_URL = {{ url_for('auth.logout', tenant=session.tenant_code)|tojson }};
|
||||
window.CMBNET_SW_URL = {{ url_for('service_worker')|tojson }};
|
||||
window.CMBNET_MANIFEST_URL = {{ url_for('views.manifest', tenant=session.tenant_code)|tojson }};
|
||||
window.CMBNET_ICON_URL = {{ url_for('static', filename='img/icon-192.png')|tojson }};
|
||||
window.CMBNET_VIEW_MODE = 'mobile_dispatcher';
|
||||
</script>
|
||||
<script src="{{ url_for('static', filename='js/leaflet.js') }}"></script>
|
||||
|
||||
@@ -6,6 +6,13 @@
|
||||
|
||||
{% block head %}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link rel="manifest" href="{{ url_for('views.manifest', tenant=session.tenant_code) }}">
|
||||
<meta name="theme-color" content="#2563eb">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||
<meta name="apple-mobile-web-app-title" content="CMBNet">
|
||||
<link rel="apple-touch-icon" href="{{ url_for('static', filename='img/apple-touch-icon.png') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/pico.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/leaflet.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/mobile.css') }}">
|
||||
@@ -18,6 +25,7 @@
|
||||
<header class="mobile-header">
|
||||
<div class="mobile-header-row">
|
||||
<div class="mobile-group-name" id="groupNameDisplay">Gruppe</div>
|
||||
<button type="button" id="mobileInstallBtn" class="mobile-icon-btn" aria-label="App installieren" title="App installieren" hidden>📲</button>
|
||||
<button type="button" id="mobileLogout" class="mobile-icon-btn" aria-label="Abmelden" title="Abmelden">⏻</button>
|
||||
</div>
|
||||
</header>
|
||||
@@ -102,12 +110,17 @@
|
||||
<option value="aerial">Luftbild</option>
|
||||
</select>
|
||||
</label>
|
||||
<div class="mobile-settings-row">
|
||||
<span>Benachrichtigungen</span>
|
||||
<button type="button" id="mobileNotifyBtn" class="secondary mobile-settings-button">Aktivieren</button>
|
||||
</div>
|
||||
</div>
|
||||
<footer>
|
||||
<button type="button" onclick="closeMobileSettings()">Schließen</button>
|
||||
</footer>
|
||||
</article>
|
||||
</dialog>
|
||||
{% include "_pwa_install_dialog.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
@@ -116,6 +129,9 @@
|
||||
window.CMBNET_ACCOUNT_ID = {{ session.account_id|tojson }};
|
||||
window.CMBNET_ROLE = {{ session.role|tojson }};
|
||||
window.CMBNET_LOGOUT_URL = {{ url_for('auth.logout', tenant=session.tenant_code)|tojson }};
|
||||
window.CMBNET_SW_URL = {{ url_for('service_worker')|tojson }};
|
||||
window.CMBNET_MANIFEST_URL = {{ url_for('views.manifest', tenant=session.tenant_code)|tojson }};
|
||||
window.CMBNET_ICON_URL = {{ url_for('static', filename='img/icon-192.png')|tojson }};
|
||||
window.CMBNET_VIEW_MODE = 'mobile_group';
|
||||
</script>
|
||||
<script src="{{ url_for('static', filename='js/leaflet.js') }}"></script>
|
||||
|
||||
Reference in new issue
Block a user