- Web UI: login, dashboard, links CRUD, collections, API keys, admin pages - Query engine: AND/OR/XOR with field filters, tag search, preview endpoint - Session management: token expiry detection, 401 interceptor, expiry banner - Links search: tags included, multi-word AND, query mode with set operations - Collections: static/dynamic, query builder with preview, public tree view - Save as Collection: convert search results (static) or query (dynamic) - Dashboard stats: resilient loading with allSettled pattern - Login page: redesigned with public collections tree view - Bug fix: query executor None fields crash (notes/description/url/title) - E2E tests: 20 Playwright tests covering all critical user flows - All 104 tests passing (84 unit/integration + 20 E2E)
59 lines
2.1 KiB
HTML
59 lines
2.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{% block title %}LinkSync{% endblock %}</title>
|
|
<link rel="stylesheet" href="/static/css/main.css?v={{ build_id }}">
|
|
{% block extra_css %}{% endblock %}
|
|
</head>
|
|
<body>
|
|
<nav class="navbar">
|
|
<div class="nav-brand">
|
|
<a href="/dashboard">LinkSync</a>
|
|
</div>
|
|
<div class="nav-links" id="nav-links">
|
|
<a href="/dashboard">Dashboard</a>
|
|
<a href="/links">Links</a>
|
|
<a href="/collections">Collections</a>
|
|
<a href="/api-keys">API Keys</a>
|
|
<a href="/admin" id="admin-nav" style="display: none;">Admin</a>
|
|
<a href="/docs" target="_blank">API</a>
|
|
</div>
|
|
<div class="nav-user">
|
|
<span id="nav-username"></span>
|
|
<button class="btn btn-sm btn-outline" id="logout-btn">Logout</button>
|
|
</div>
|
|
</nav>
|
|
<main class="container">
|
|
{% block content %}{% endblock %}
|
|
</main>
|
|
<footer class="footer">
|
|
<p>LinkSyncServer © 2026</p>
|
|
</footer>
|
|
<script src="/static/js/main.js?v={{ build_id }}"></script>
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
const token = localStorage.getItem('token');
|
|
const user = JSON.parse(localStorage.getItem('user') || 'null');
|
|
if (!token) {
|
|
window.location.href = '/login';
|
|
return;
|
|
}
|
|
if (user) {
|
|
document.getElementById('nav-username').textContent = user.username;
|
|
if (user.role === 'admin') {
|
|
document.getElementById('admin-nav').style.display = '';
|
|
}
|
|
}
|
|
document.getElementById('logout-btn').addEventListener('click', function() {
|
|
localStorage.removeItem('token');
|
|
localStorage.removeItem('user');
|
|
window.location.href = '/login';
|
|
});
|
|
});
|
|
</script>
|
|
{% block extra_js %}{% endblock %}
|
|
</body>
|
|
</html>
|