feat: remplacer section Notion apps par liens statiques Library/My Tasks/Trash/Help

- Section 'Notion apps' retirée
- Liens statiques en bas du sidebar (toujours visibles): Library, My Tasks, Trash, Help
- Nouvelle route /help avec page d'aide (raccourcis, guide rapide)
- Trash visible pour tous (plus de condition sur auth_method)
- 143 tests passent
This commit is contained in:
2026-07-20 10:12:55 -04:00
parent 79bc1bf1fd
commit d5ba29714c
2 changed files with 36 additions and 18 deletions
+21
View File
@@ -314,6 +314,27 @@ async def accounts_page(request: Request):
return template.render(**ctx)
@router.get("/help", response_class=HTMLResponse)
async def help_page(request: Request):
"""Simple help / about page."""
from jinja2 import Environment, FileSystemLoader
env = Environment(loader=FileSystemLoader("app/templates"))
sidebar = _sidebar_data(request, [])
template = env.get_template("base.html")
return HTMLResponse(template.render(
**sidebar,
request=request,
content_html="""<div style="max-width:700px;margin:40px auto;padding:0 20px;">
<h2>❓ FlowDeck Help</h2>
<p style="color:var(--text-dim)">FlowDeck is a Notion-style workspace with Gitea/GitHub integration.</p>
<h3>Getting Started</h3>
<ul><li>Create a <b>Workspace</b> from the Workspaces page</li><li>Create <b>Pages</b> using the sidebar or <kbd>Ctrl+N</kbd></li><li>Connect <b>Gitea</b> or <b>GitHub</b> in Settings → Integrations</li></ul>
<h3>Keyboard Shortcuts</h3>
<table style="width:100%"><tr><td><kbd>Ctrl+N</kbd></td><td>New page</td></tr><tr><td><kbd>F2</kbd></td><td>Rename selected</td></tr><tr><td><kbd>Delete</kbd></td><td>Move to trash</td></tr><tr><td><kbd>Ctrl+K</kbd></td><td>Quick find</td></tr></table>
</div>"""
))
@router.get("/accounts/settings", response_class=HTMLResponse)
async def settings_page(request: Request):
"""User settings page — profile, forges, tokens."""
+15 -18
View File
@@ -399,24 +399,21 @@
</div>
{% endif %}
<!-- Notion apps / Utilities -->
<div class="sidebar-section">
<div class="sidebar-section-header" @click="toggleSection('apps')">
<div class="sidebar-section-title">
<span class="chevron" :class="{ open: sectionsOpen.apps }" x-text="sectionsOpen.apps ? '▼' : '▶'"></span>
<span>Notion apps</span>
</div>
</div>
<div class="sidebar-section-items" x-show="sectionsOpen.apps" x-transition>
<ul class="sidebar-items">
<li class="sidebar-item" @click="navigateTo('/library')"><span class="page-icon">📚</span><span class="page-name">Library</span></li>
<li class="sidebar-item"><span class="page-icon">✅</span><span class="page-name">My Tasks</span></li>
{% if auth_method == 'local' or (workspace_pages and workspace_pages|length > 0) %}
<li class="sidebar-item" @click="navigateTo('/trash')"><span class="page-icon">🗑️</span><span class="page-name">Trash</span></li>
{% endif %}
<li class="sidebar-item"><span class="page-icon">❓</span><span class="page-name">Help</span></li>
</ul>
</div>
<!-- Notion apps / Utilities → replaced by static links footer (v4.0.2) -->
<!-- Bottom links (always visible, no section wrapper) -->
<div class="sidebar-static-links" style="padding: 4px 12px;">
<a href="/library" class="sidebar-item" style="text-decoration:none;color:inherit;display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:6px;cursor:pointer;transition:background 150ms;">
<span class="page-icon">📚</span><span class="page-name" style="font-size:14px;">Library</span>
</a>
<a href="/my-tasks" class="sidebar-item" style="text-decoration:none;color:inherit;display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:6px;cursor:pointer;transition:background 150ms;">
<span class="page-icon">✅</span><span class="page-name" style="font-size:14px;">My Tasks</span>
</a>
<a href="/trash" class="sidebar-item" style="text-decoration:none;color:inherit;display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:6px;cursor:pointer;transition:background 150ms;">
<span class="page-icon">🗑️</span><span class="page-name" style="font-size:14px;">Trash</span>
</a>
<a href="/help" class="sidebar-item" style="text-decoration:none;color:inherit;display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:6px;cursor:pointer;transition:background 150ms;">
<span class="page-icon">❓</span><span class="page-name" style="font-size:14px;">Help</span>
</a>
</div>
<!-- Footer -->