Make createPage() and createFolder() context-aware
- createPage() now detects active workspace context (library, local-workspace page, sidebar) - In a local/Gitea workspace: creates workspace item via /api/local-workspace/items with prompt - No workspace: creates general Notion page via /board/api/pages (no prompt) - Added hidden #fd-local-ws-id in local_workspace.html to expose workspace_id - _confirmCreateFolder() passes workspace_id for Gitea workspaces - Added _getContext() helper that checks multiple context sources in priority order - Added _toast() helper for cross-component notifications
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<span id="fd-local-ws-id" hidden>{{ workspace_id }}</span>
|
||||
<div x-data="_wsInitData"
|
||||
@dragover.prevent="onDragOver($event)"
|
||||
@dragleave="onDragLeave($event)"
|
||||
|
||||
Reference in New Issue
Block a user