158 lines
7.7 KiB
HTML
158 lines
7.7 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Dispatcher Mobil - {{ session.tenant_code }} - {{ APP_TITLE }}{% endblock %}
|
|
|
|
{% block body_class %}mobile-page{% endblock %}
|
|
|
|
{% 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="{{ APP_TITLE }}">
|
|
<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') }}">
|
|
{% endblock %}
|
|
|
|
{% block logo %}{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="mobile-app">
|
|
<header class="mobile-header">
|
|
<div class="mobile-header-row">
|
|
<select id="mobileGroupSelect" class="mobile-group-select" aria-label="Gruppe auswählen"></select>
|
|
<span id="mobileWsStatus" class="mobile-ws-status is-disconnected"
|
|
role="status" aria-live="polite" title="WebSocket: getrennt">WS: getrennt</span>
|
|
<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>
|
|
|
|
<nav class="mobile-tabs" role="tablist">
|
|
<button type="button" class="mobile-tab active" data-tab="map" role="tab" aria-selected="true">Karte</button>
|
|
<button type="button" class="mobile-tab" data-tab="chat" role="tab" aria-selected="false">Chat</button>
|
|
</nav>
|
|
|
|
<main class="mobile-main">
|
|
<section id="tab-map" class="mobile-tab-panel active" role="tabpanel">
|
|
<div id="mobileMap" class="mobile-map"></div>
|
|
<button type="button" id="mobileNavigateBtn" class="mobile-nav-btn"
|
|
title="Navigation zur Gruppe starten" aria-label="Navigation zur Gruppe starten" hidden>
|
|
<svg viewBox="0 0 24 24" width="22" height="22" aria-hidden="true" focusable="false">
|
|
<path fill="currentColor" d="M21.71 2.29a1 1 0 0 0-1.05-.24l-18 7a1 1 0 0 0 .06 1.87l7.16 2.2 2.2 7.16a1 1 0 0 0 1.87.06l7-18a1 1 0 0 0-.24-1.05Z"/>
|
|
</svg>
|
|
</button>
|
|
<button type="button" id="mobileTodoBtn" class="mobile-fab" title="ToDo-Liste" aria-label="ToDo-Liste">
|
|
<svg viewBox="0 0 24 24" width="22" height="22" aria-hidden="true" focusable="false">
|
|
<rect x="3.5" y="3.5" width="17" height="17" rx="3"
|
|
fill="none" stroke="currentColor" stroke-width="2"/>
|
|
<path d="M7.5 12.5l3 3 6-6" fill="none" stroke="currentColor"
|
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
</svg>
|
|
</button>
|
|
<button type="button" id="mobileSettingsBtn" class="mobile-fab mobile-fab-secondary" title="Einstellungen" aria-label="Einstellungen">⚙</button>
|
|
<button type="button" id="mobileWorkBtn" class="mobile-work-btn" title="Straße bearbeiten" aria-label="Straße bearbeiten">Bearbeiten</button>
|
|
</section>
|
|
|
|
<section id="tab-chat" class="mobile-tab-panel" role="tabpanel">
|
|
<div id="mobileChatMessages" class="mobile-chat-messages"></div>
|
|
<form id="mobileChatForm" class="mobile-chat-form">
|
|
<input type="text" id="mobileChatInput" class="mobile-chat-input" placeholder="Nachricht senden ..." autocomplete="off">
|
|
<button type="submit" class="mobile-chat-send">Senden</button>
|
|
</form>
|
|
</section>
|
|
</main>
|
|
</div>
|
|
|
|
<dialog id="mobileStreetSelectDialog">
|
|
<article>
|
|
<header>
|
|
<h3>Zugeteilte Straßen</h3>
|
|
</header>
|
|
<div class="dialog-body">
|
|
<p class="mobile-dialog-hint">Wähle eine Straße aus, um sie auf der Karte zu bearbeiten.</p>
|
|
<ul id="mobileStreetList" class="mobile-street-list"></ul>
|
|
</div>
|
|
<footer>
|
|
<button type="button" class="secondary" onclick="closeMobileStreetSelect()">Schließen</button>
|
|
</footer>
|
|
</article>
|
|
</dialog>
|
|
|
|
<dialog id="mobileStreetStateDialog">
|
|
<article>
|
|
<header>
|
|
<h3 id="mobileStreetStateTitle">Straße bearbeiten</h3>
|
|
</header>
|
|
<div class="dialog-body">
|
|
<label>Status
|
|
<select id="mobileStreetStateSelect">
|
|
<option value="unbearbeitet">unbearbeitet</option>
|
|
<option value="zugewiesen">zugewiesen</option>
|
|
<option value="erledigt">erledigt</option>
|
|
</select>
|
|
</label>
|
|
<label id="mobileStreetGroupLabel">Gruppe
|
|
<select id="mobileStreetGroupSelect"></select>
|
|
</label>
|
|
</div>
|
|
<footer>
|
|
<button type="button" class="secondary" onclick="closeMobileStreetState()">Abbrechen</button>
|
|
<button type="button" onclick="saveMobileStreetState()">Speichern</button>
|
|
</footer>
|
|
</article>
|
|
</dialog>
|
|
|
|
<dialog id="mobileSettingsDialog">
|
|
<article>
|
|
<header>
|
|
<h3>Einstellungen</h3>
|
|
</header>
|
|
<div class="dialog-body">
|
|
<label>Opazität <output id="mobileOpacityValue">0.70</output>
|
|
<input id="mobileOpacitySlider" type="range" min="0" max="1" step="0.05" value="0.7">
|
|
</label>
|
|
<label>Linienbreite (m) <output id="mobileWeightValue">20 m</output>
|
|
<input id="mobileWeightSlider" type="range" min="1" max="100" step="1" value="20">
|
|
</label>
|
|
<label>Hintergrundkarte
|
|
<select id="mobileBaseLayerSelect">
|
|
<option value="osm">OpenStreetMap</option>
|
|
<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 "_mobile_notification_dialog.html" %}
|
|
{% include "_mobile_group_info_dialog.html" %}
|
|
{% include "_pwa_install_dialog.html" %}
|
|
{% endblock %}
|
|
|
|
{% block scripts %}
|
|
<script>
|
|
window.CMBNET_TENANT = {{ session.tenant_code|tojson }};
|
|
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>
|
|
<script src="{{ url_for('static', filename=str2pl_asset()) }}?v={{ str2pl_asset_version() }}"></script>
|
|
<script src="{{ url_for('static', filename='js/views/mobile.js') }}"></script>
|
|
{% endblock %}
|