fix: Library preserves sidebar tree and categorizes by parent_section
FlowDeck CI / test (push) Failing after 8s
FlowDeck CI / docker (push) Has been skipped

- Sidebar data (board._sidebar_data()) no longer overwritten by library content
- New variables: lib_recent, lib_favorites, lib_shared, lib_private
- Pages categorized by parent_section column: Private/Favorites/Shared
- Recents tab shows all non-trashed pages ordered by updated_at
- library.html updated to use lib_* variables instead of sidebar data
- Favorites/Shared tabs hidden when empty (lib_has_favorites/lib_has_shared)
This commit is contained in:
2026-07-10 09:31:18 -04:00
parent a251ccfe2d
commit fbf0335c3a
2 changed files with 51 additions and 34 deletions
+13 -6
View File
@@ -15,12 +15,16 @@
<button class="view-tab" :class="{ active: tab === 'recents' }" @click="tab = 'recents'">
<span class="tab-icon">🕒</span> Recents
</button>
{% if lib_has_favorites %}
<button class="view-tab" :class="{ active: tab === 'favorites' }" @click="tab = 'favorites'">
<span class="tab-icon">⭐</span> Favorites
</button>
{% endif %}
{% if lib_has_shared %}
<button class="view-tab" :class="{ active: tab === 'shared' }" @click="tab = 'shared'">
<span class="tab-icon">👥</span> Shared
</button>
{% endif %}
<button class="view-tab" :class="{ active: tab === 'private' }" @click="tab = 'private'">
<span class="tab-icon">🔒</span> Private
</button>
@@ -61,8 +65,8 @@
<!-- Recents -->
<div x-show="tab === 'recents'">
{% for page in recent_pages %}{{ page_row(page) }}{% endfor %}
{% if not recent_pages %}
{% for page in lib_recent %}{{ page_row(page) }}{% endfor %}
{% if not lib_recent %}
<div class="lib-empty">
<div style="font-size:48px;margin-bottom:16px;">🕒</div>
<h3>No recent pages</h3>
@@ -72,8 +76,8 @@
<!-- Favorites -->
<div x-show="tab === 'favorites'">
{% for page in favorite_pages %}{{ page_row(page) }}{% endfor %}
{% if not favorite_pages %}
{% for page in lib_favorites %}{{ page_row(page) }}{% endfor %}
{% if not lib_favorites %}
<div class="lib-empty">
<div style="font-size:48px;margin-bottom:16px;">⭐</div>
<h3>No favorites</h3>
@@ -84,17 +88,20 @@
<!-- Shared -->
<div x-show="tab === 'shared'">
{% for page in lib_shared %}{{ page_row(page) }}{% endfor %}
{% if not lib_shared %}
<div class="lib-empty">
<div style="font-size:48px;margin-bottom:16px;">👥</div>
<h3>No shared pages</h3>
<p>Shared pages from your team will appear here.</p>
</div>
{% endif %}
</div>
<!-- Private -->
<div x-show="tab === 'private'">
{% for page in private_pages %}{{ page_row(page) }}{% endfor %}
{% if not private_pages %}
{% for page in lib_private %}{{ page_row(page) }}{% endfor %}
{% if not lib_private %}
<div class="lib-empty">
<div style="font-size:48px;margin-bottom:16px;">🔒</div>
<h3>No private pages</h3>