feat(icon): Notion-style icon picker + custom workspace emojis; fix side peek file content & ctx menu overflow
This commit is contained in:
@@ -142,7 +142,7 @@
|
||||
{% else %}
|
||||
<span class="tree-toggle-placeholder"></span>
|
||||
{% endif %}
|
||||
<span class="page-icon">{% if page.icon in ("folder","file","star","link","trash","book","home","settings","lock","globe","image","edit","calendar","users","user","search","tag","bar-chart","grid","list","align-left","zap") %}{{ fd_icon(page.icon,14) }}{% elif page.icon and page.icon|length <= 2 %}{{ fd_icon("file",14) }}{% else %}{{ fd_icon("folder",14) }}{% endif %}</span>
|
||||
<span class="page-icon">{{ fd_page_icon(page.icon, 14) }}</span>
|
||||
<span class="page-name">{{ page.name }}</span>
|
||||
<span class="item-actions">
|
||||
<button class="item-action-btn" @click.stop="newSubPage('{{ page.id }}')">+</button>
|
||||
@@ -159,7 +159,7 @@
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% from '_icons.html' import fd_icon %}
|
||||
{% from '_icons.html' import fd_icon, fd_page_icon %}
|
||||
|
||||
<!-- ═══════════ SIDEBAR Notion ═══════════ -->
|
||||
<aside class="sidebar"
|
||||
@@ -662,6 +662,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include '_icon_picker.html' %}
|
||||
|
||||
<!-- ═══════════ WORKSPACE TREE CONTEXT MENU ═══════════ -->
|
||||
<div class="context-menu" id="ws-context-menu"
|
||||
:class="{ visible: wsCtx.visible }"
|
||||
@@ -1099,10 +1101,7 @@
|
||||
} else {
|
||||
favList.innerHTML = items.map(function(item) {
|
||||
var iconName = item.icon || 'file';
|
||||
// Map known icon names, anything else (including emojis) → file
|
||||
var validNames = ['folder','file','star','link','trash','book','home','settings','lock','globe','image','edit','calendar','users','user','search','tag'];
|
||||
if (validNames.indexOf(iconName) === -1) iconName = 'file';
|
||||
var icon = '<span class="page-icon-svg">'+getSvgIcon(iconName,14)+'</span>';
|
||||
var icon = '<span class="page-icon-svg">' + (window.fdIconHtml ? window.fdIconHtml(iconName, 14) : getSvgIcon('file',14)) + '</span>';
|
||||
const name = (item.title || 'Untitled');
|
||||
const safeName = name.replace(/'/g, "\\'").replace(/"/g, '"');
|
||||
const url = item.url || ('/pages/' + item.id);
|
||||
|
||||
Reference in New Issue
Block a user