feat: workspaces system — create, select, rename, delete workspaces
FlowDeck CI / test (push) Failing after 4s
FlowDeck CI / docker (push) Has been skipped

- DB: pages.workspace_id column linking pages to workspaces table
- /workspaces: list, create, rename, delete workspaces page
- API: GET/POST/PUT/DELETE /api/workspaces + POST select
- Session: flowdeck_workspace cookie for active workspace tracking
- Sidebar: Workspace section shows active workspace name + page tree
- Local workspace APIs filter by active workspace_id
- Home redirects non-Gitea users to /workspaces
This commit is contained in:
2026-07-10 16:41:40 -04:00
parent eb417d4ed5
commit 3e6323a856
4 changed files with 279 additions and 4 deletions
+10 -4
View File
@@ -85,16 +85,22 @@
<div class="sidebar-section-header" @click="toggleSection('workspace')">
<div class="sidebar-section-title">
<span class="chevron" :class="{ open: sectionsOpen.workspace }" x-text="sectionsOpen.workspace ? '▼' : '▶'"></span>
<span>📁 Workspace</span>
<span>📁 {{ workspace_name or 'Workspace' }}</span>
</div>
<div class="sidebar-section-actions">
<button class="section-action-btn" title="New File" @click.stop="newPage('Private')">+</button>
<button class="section-action-btn" title="New Page" @click.stop="newPageInWorkspace()">+</button>
</div>
</div>
<div class="sidebar-section-items" x-show="sectionsOpen.workspace" x-transition>
<ul class="sidebar-items" data-section="workspace">
<li class="sidebar-item" onclick="window.location='/local-workspace'">
<span class="page-icon">📁</span><span class="page-name">My Workspace</span>
{% for page in workspace_pages %}
{{ render_tree_item(page) }}
{% endfor %}
{% if not workspace_pages %}
<li class="sidebar-item empty-hint"><span class="page-icon">📄</span><span class="page-name text-dim">No pages yet</span></li>
{% endif %}
<li class="sidebar-item" style="margin-top:4px;border-top:1px solid var(--border);padding-top:8px;" onclick="window.location='/workspaces'">
<span class="page-icon">⚙</span><span class="page-name text-dim">Manage Workspaces</span>
</li>
</ul>
</div>