- Move board cards from dashboard to top of boards list page - Fix Werkzeug duplicate polling (WERKZEUG_RUN_MAIN guard) - Smart offline polling: fast loop for online boards, slow recheck for offline - Add manual ping endpoint POST /api/boards/<id>/ping - Add spin animation CSS for ping button Layouts module (new): - app/models/layout.py: Layout model (canvas_json, thumbnail_b64) - app/routes/layouts.py: 5 routes (list, create, builder, save, delete) - app/templates/layouts/: list and builder templates - app/static/js/layout_builder.js: full Konva.js builder engine - app/static/vendor/konva/: vendored Konva.js 9 - Structure mode: wall, room, door, window, fence, text shapes - Devices mode: drag relay/input/Sonoff channels onto canvas - Live view mode: click relays/Sonoff to toggle, socket.io state updates - Device selection: click to select, remove individual device, Delete key - Fix door/Arc size persistence across save/reload (outerRadius, scaleX/Y) - Fix Sonoff devices missing from palette (add makeSonoffChip function)
94 lines
4.1 KiB
HTML
94 lines
4.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" data-bs-theme="dark">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>{% block title %}Location Management{% endblock %}</title>
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='vendor/bootstrap/css/bootstrap.min.css') }}" />
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='vendor/bootstrap-icons/font/bootstrap-icons.min.css') }}" />
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}" />
|
|
</head>
|
|
<body>
|
|
|
|
<!-- ── Sidebar navigation ───────────────────────────────────────────────── -->
|
|
<div class="d-flex" id="wrapper">
|
|
<nav id="sidebar" class="d-flex flex-column flex-shrink-0 p-3 bg-dark">
|
|
<a href="{{ url_for('dashboard.index') }}" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto text-white text-decoration-none">
|
|
<i class="bi bi-cpu-fill me-2 fs-4 text-primary"></i>
|
|
<span class="fs-5 fw-semibold">Loc. Mgmt</span>
|
|
</a>
|
|
<hr class="text-secondary" />
|
|
<ul class="nav nav-pills flex-column mb-auto">
|
|
<li class="nav-item">
|
|
<a href="{{ url_for('dashboard.index') }}"
|
|
class="nav-link text-white {% if request.endpoint == 'dashboard.index' %}active{% endif %}">
|
|
<i class="bi bi-grid-1x2-fill me-2"></i>Dashboard
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="{{ url_for('boards.list_boards') }}"
|
|
class="nav-link text-white {% if 'boards.' in request.endpoint or 'sonoff.' in request.endpoint %}active{% endif %}">
|
|
<i class="bi bi-motherboard me-2"></i>Boards
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="{{ url_for('workflows.list_workflows') }}"
|
|
class="nav-link text-white {% if 'workflows.' in request.endpoint %}active{% endif %}">
|
|
<i class="bi bi-diagram-3 me-2"></i>Workflows
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="{{ url_for('layouts.list_layouts') }}"
|
|
class="nav-link text-white {% if 'layouts.' in request.endpoint %}active{% endif %}">
|
|
<i class="bi bi-map me-2"></i>Layouts
|
|
</a>
|
|
</li>
|
|
{% if current_user.is_admin() %}
|
|
<li>
|
|
<a href="{{ url_for('admin.list_users') }}"
|
|
class="nav-link text-white {% if 'admin.' in request.endpoint %}active{% endif %}">
|
|
<i class="bi bi-people me-2"></i>Users
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
<hr class="text-secondary" />
|
|
<div class="dropdown">
|
|
<a href="#" class="d-flex align-items-center text-white text-decoration-none dropdown-toggle"
|
|
data-bs-toggle="dropdown">
|
|
<i class="bi bi-person-circle me-2 fs-5"></i>
|
|
<strong>{{ current_user.username }}</strong>
|
|
{% if current_user.is_admin() %}
|
|
<span class="badge bg-primary ms-2">admin</span>
|
|
{% endif %}
|
|
</a>
|
|
<ul class="dropdown-menu dropdown-menu-dark text-small shadow">
|
|
<li><a class="dropdown-item" href="{{ url_for('auth.logout') }}">
|
|
<i class="bi bi-box-arrow-right me-1"></i> Sign out
|
|
</a></li>
|
|
</ul>
|
|
</div>
|
|
</nav>
|
|
|
|
<!-- ── Main content ─────────────────────────────────────────────────────── -->
|
|
<div id="page-content" class="flex-grow-1 p-4">
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% for category, message in messages %}
|
|
<div class="alert alert-{{ category }} alert-dismissible fade show" role="alert">
|
|
{{ message }}
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
|
</div>
|
|
{% endfor %}
|
|
{% endwith %}
|
|
|
|
{% block content %}{% endblock %}
|
|
</div>
|
|
</div>
|
|
|
|
<script src="{{ url_for('static', filename='vendor/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
|
|
<script src="{{ url_for('static', filename='vendor/socket.io/socket.io.min.js') }}"></script>
|
|
<script src="{{ url_for('static', filename='js/app.js') }}"></script>
|
|
{% block scripts %}{% endblock %}
|
|
</body>
|
|
</html>
|