fix: Gitea sidebar tree + header actions inline with title
Gitea workspace sidebar: - loadSidebarTree() now uses innerHTML replacement instead of DOM manipulation (avoids Alpine reactivity overwrites) - Ensures workspace section is visible when tree loads - Shows error message when Gitea API fails (no token/gateway) - Better error handling with console.error catch Header actions inline: - page_editor: moved Edited/Share/Copy/Favorite/More buttons into the unified header (right_actions), accessible via window.E (editorState global reference set in init) - Removed duplicate page-topbar div from content area - Share dialog, More menu, and Activity popover stay in content area (triggered by header buttons via window.E references) - Gitea workspace: header now uses page-action-btn for consistency
This commit is contained in:
@@ -2,35 +2,11 @@
|
||||
page_title %}{{ page.title }}{% endblock %} {% block topbar %}
|
||||
{% set page_icon = "📄" %}
|
||||
{% set page_title = page.title %}
|
||||
{% set right_actions = '<span class="topbar-edited" style="cursor:pointer;" @click="window.E && (window.E.activityOpen = !window.E.activityOpen)">Edited <span x-text="window.E && window.E.timeAgo || \'\'"></span> ▾</span><button class="topbar-btn share-btn" @click="window.E && (window.E.shareOpen = !window.E.shareOpen)">🔒 Share ▾</button><button class="topbar-btn" @click="window.E && window.E.copyPageLink()" title="Copy link">🔗</button><button class="topbar-btn star-btn" @click="window.E && window.E.toggleFavorite()">⭐</button><button class="topbar-btn" @click="window.E && (window.E.moreOpen = !window.E.moreOpen)" style="position:relative">⋯</button>' %}
|
||||
{% include '_header.html' %}
|
||||
{% endblock %} {% block content %}
|
||||
<div class="page-editor-wrapper" x-data="editorState()">
|
||||
<!-- ═══════════ Action Bar (Share, Copy, Favorite, More) ═══════════ -->
|
||||
<div class="page-topbar">
|
||||
<div class="page-topbar-right" style="position: relative">
|
||||
<span class="topbar-edited" style="cursor:pointer;" @click="activityOpen = !activityOpen">Edited <span x-text="timeAgo"></span> ▾</span>
|
||||
<button
|
||||
class="page-action-btn share-btn"
|
||||
@click="shareOpen = !shareOpen"
|
||||
>
|
||||
🔒 Share <span class="chevron-down">▾</span>
|
||||
</button>
|
||||
<button
|
||||
class="page-action-btn"
|
||||
@click="copyPageLink"
|
||||
title="Copy link"
|
||||
>
|
||||
🔗
|
||||
</button>
|
||||
<button class="page-action-btn star-btn" @click="toggleFavorite">
|
||||
<span
|
||||
x-text="favorited ? '⭐' : '☆'"
|
||||
:class="{ starred: favorited }"
|
||||
></span>
|
||||
</button>
|
||||
<button class="page-action-btn" @click="moreOpen = !moreOpen">
|
||||
⋮
|
||||
</button>
|
||||
<!-- Share/More dialogs (in content area, triggered by header buttons) -->
|
||||
|
||||
<!-- ═══════════ Share / Publish Dialog ═══════════ -->
|
||||
<div
|
||||
@@ -410,8 +386,6 @@ page_title %}{{ page.title }}{% endblock %} {% block topbar %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ═══════════ Page Content ═══════════ -->
|
||||
<div class="page-cover-area">
|
||||
|
||||
Reference in New Issue
Block a user