@a83/orbiter-admin 0.3.32 → 0.3.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/public/style.css +21 -4
- package/public/xfce.js +55 -9
package/package.json
CHANGED
package/public/style.css
CHANGED
|
@@ -1994,6 +1994,9 @@ html[data-style="xfce"] .xfce-in-focus .xfce-focus-trigger::after {
|
|
|
1994
1994
|
text-align: center;
|
|
1995
1995
|
flex-shrink: 0;
|
|
1996
1996
|
}
|
|
1997
|
+
.xfce-tools-sep { height: 1px; background: var(--line); margin: 4px 6px; }
|
|
1998
|
+
.xfce-tools-palette { width: 100%; background: none; border: none; cursor: pointer; text-align: left; font-family: inherit; }
|
|
1999
|
+
.xfce-tools-kbd { margin-left: auto; font-family: var(--mono); font-size: 8px; color: var(--muted); background: color-mix(in srgb, var(--mid) 14%, transparent); padding: 2px 5px; border-radius: 3px; border: none; font-style: normal; }
|
|
1997
2000
|
|
|
1998
2001
|
/* Status bar links & logout */
|
|
1999
2002
|
a.xfce-sb-logo { text-decoration: none; color: var(--accent); }
|
|
@@ -2006,6 +2009,8 @@ a.xfce-sb-logo:hover { opacity: .8; }
|
|
|
2006
2009
|
font-family: var(--mono); transition: color .15s;
|
|
2007
2010
|
}
|
|
2008
2011
|
.xfce-sb-logout:hover { color: var(--red); }
|
|
2012
|
+
.xfce-sb-palette-btn { background: none; border: none; cursor: pointer; padding: 0 3px; font-size: 14px; color: var(--mid); line-height: 1; font-family: var(--mono); transition: color .15s; }
|
|
2013
|
+
.xfce-sb-palette-btn:hover { color: var(--accent); }
|
|
2009
2014
|
|
|
2010
2015
|
/* Draft badge on dock items */
|
|
2011
2016
|
.xfce-dock-badge {
|
|
@@ -2018,10 +2023,22 @@ a.xfce-sb-logo:hover { opacity: .8; }
|
|
|
2018
2023
|
}
|
|
2019
2024
|
.xfce-dock-item { position: relative; }
|
|
2020
2025
|
|
|
2021
|
-
/*
|
|
2022
|
-
.xfce-
|
|
2023
|
-
|
|
2024
|
-
|
|
2026
|
+
/* Hover + badge above collection dock items */
|
|
2027
|
+
.xfce-col-create {
|
|
2028
|
+
position: fixed; z-index: 99990;
|
|
2029
|
+
width: 22px; height: 22px; border-radius: 50%;
|
|
2030
|
+
background: var(--accent);
|
|
2031
|
+
color: color-mix(in srgb, var(--bg1) 15%, #000);
|
|
2032
|
+
font-size: 17px; line-height: 22px; font-weight: 300;
|
|
2033
|
+
text-align: center; text-decoration: none;
|
|
2034
|
+
transform: translateX(-50%) translateY(6px);
|
|
2035
|
+
opacity: 0; pointer-events: none;
|
|
2036
|
+
transition: opacity .13s, transform .13s cubic-bezier(.34,1.5,.64,1);
|
|
2037
|
+
box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 55%, transparent);
|
|
2038
|
+
user-select: none;
|
|
2039
|
+
}
|
|
2040
|
+
.xfce-col-create.visible {
|
|
2041
|
+
opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto;
|
|
2025
2042
|
}
|
|
2026
2043
|
|
|
2027
2044
|
/* ── Command Palette ─────────────────────────────────────── */
|
package/public/xfce.js
CHANGED
|
@@ -62,6 +62,8 @@
|
|
|
62
62
|
'</div>',
|
|
63
63
|
'<div class="xfce-sb-center" id="xfce-sb-title"></div>',
|
|
64
64
|
'<div class="xfce-sb-right">',
|
|
65
|
+
'<button id="xfce-sb-palette-btn" class="xfce-sb-palette-btn" title="Command palette (⌘K)">⌘</button>',
|
|
66
|
+
'<span class="xfce-sb-div">·</span>',
|
|
65
67
|
'<a id="xfce-sb-user" href="/account.html" class="xfce-sb-user-link"></a>',
|
|
66
68
|
'<span class="xfce-sb-div">·</span>',
|
|
67
69
|
'<button id="xfce-sb-logout" class="xfce-sb-logout" title="Log out">⏻</button>',
|
|
@@ -90,6 +92,12 @@
|
|
|
90
92
|
fetch('/api/auth/logout', { method: 'POST', credentials: 'include' })
|
|
91
93
|
.finally(function () { location.href = '/login.html'; });
|
|
92
94
|
});
|
|
95
|
+
|
|
96
|
+
// Palette trigger in status bar
|
|
97
|
+
document.getElementById('xfce-sb-palette-btn').addEventListener('click', function (e) {
|
|
98
|
+
e.stopPropagation();
|
|
99
|
+
openPalette();
|
|
100
|
+
});
|
|
93
101
|
}
|
|
94
102
|
|
|
95
103
|
// ── HUD Meta Panel ────────────────────────────────────────────────────
|
|
@@ -146,6 +154,17 @@
|
|
|
146
154
|
a.innerHTML = '<span class="xfce-tools-icon">' + t.icon + '</span><span>' + t.label + '</span>';
|
|
147
155
|
toolsPopup.appendChild(a);
|
|
148
156
|
});
|
|
157
|
+
var sep = document.createElement('div');
|
|
158
|
+
sep.className = 'xfce-tools-sep';
|
|
159
|
+
toolsPopup.appendChild(sep);
|
|
160
|
+
var palBtn = el('button', 'xfce-tools-item xfce-tools-palette');
|
|
161
|
+
palBtn.innerHTML = '<span class="xfce-tools-icon">⌘</span><span>Palette</span><kbd class="xfce-tools-kbd">⌘K</kbd>';
|
|
162
|
+
palBtn.addEventListener('click', function (e) {
|
|
163
|
+
e.stopPropagation();
|
|
164
|
+
toolsPopup.classList.remove('open');
|
|
165
|
+
openPalette();
|
|
166
|
+
});
|
|
167
|
+
toolsPopup.appendChild(palBtn);
|
|
149
168
|
document.body.appendChild(toolsPopup);
|
|
150
169
|
document.addEventListener('click', function () {
|
|
151
170
|
toolsPopup.classList.remove('open');
|
|
@@ -165,6 +184,34 @@
|
|
|
165
184
|
toolsPopup.classList.toggle('open');
|
|
166
185
|
}
|
|
167
186
|
|
|
187
|
+
// ── Hover + badge above collection items ─────────────────────────────
|
|
188
|
+
var colCreateEl, colCreateTimer;
|
|
189
|
+
|
|
190
|
+
function buildColCreate() {
|
|
191
|
+
colCreateEl = el('a', 'xfce-col-create');
|
|
192
|
+
colCreateEl.id = 'xfce-col-create';
|
|
193
|
+
colCreateEl.textContent = '+';
|
|
194
|
+
colCreateEl.addEventListener('mouseenter', function () { clearTimeout(colCreateTimer); });
|
|
195
|
+
colCreateEl.addEventListener('mouseleave', function () { colCreateTimer = setTimeout(hideColCreate, 120); });
|
|
196
|
+
document.body.appendChild(colCreateEl);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
function showColCreate(href, itemEl) {
|
|
200
|
+
if (!colCreateEl) buildColCreate();
|
|
201
|
+
clearTimeout(colCreateTimer);
|
|
202
|
+
var dock = document.getElementById('xfce-dock');
|
|
203
|
+
var dockTop = dock ? dock.getBoundingClientRect().top : 0;
|
|
204
|
+
var itemRect = itemEl.getBoundingClientRect();
|
|
205
|
+
colCreateEl.href = href;
|
|
206
|
+
colCreateEl.style.left = Math.round(itemRect.left + itemRect.width / 2) + 'px';
|
|
207
|
+
colCreateEl.style.top = Math.round(dockTop - 34) + 'px';
|
|
208
|
+
colCreateEl.classList.add('visible');
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
function hideColCreate() {
|
|
212
|
+
if (colCreateEl) colCreateEl.classList.remove('visible');
|
|
213
|
+
}
|
|
214
|
+
|
|
168
215
|
// ── Command Palette ───────────────────────────────────────────────────
|
|
169
216
|
var palette, paletteInp, paletteResults, palActive = -1;
|
|
170
217
|
|
|
@@ -745,7 +792,7 @@
|
|
|
745
792
|
: page === 'entries' && activeCol === col.id;
|
|
746
793
|
var abbr = col.label.substring(0, 2);
|
|
747
794
|
var item = makeDockItem(abbr, col.label, href, isActive, false);
|
|
748
|
-
item.querySelector('.xfce-dock-icon').style.cssText = 'font-size:
|
|
795
|
+
item.querySelector('.xfce-dock-icon').style.cssText = 'font-size:14px;font-weight:700;font-family:var(--mono);letter-spacing:-.03em;line-height:1;opacity:1;';
|
|
749
796
|
item.dataset.dockIdx = idx + 1;
|
|
750
797
|
|
|
751
798
|
// Draft badge
|
|
@@ -756,19 +803,18 @@
|
|
|
756
803
|
item.appendChild(badge);
|
|
757
804
|
}
|
|
758
805
|
|
|
806
|
+
// Hover shows + badge above this item
|
|
807
|
+
var createHref = col.singleton
|
|
808
|
+
? '/editor.html?collection=' + encodeURIComponent(col.id) + '&singleton=1'
|
|
809
|
+
: '/editor.html?collection=' + encodeURIComponent(col.id);
|
|
810
|
+
item.addEventListener('mouseenter', function () { showColCreate(createHref, item); });
|
|
811
|
+
item.addEventListener('mouseleave', function () { colCreateTimer = setTimeout(hideColCreate, 120); });
|
|
812
|
+
|
|
759
813
|
colGroup.appendChild(item);
|
|
760
814
|
|
|
761
815
|
// Add to palette
|
|
762
816
|
_palItems.push({ icon: abbr, label: col.label, href: href, group: 'Collections' });
|
|
763
817
|
});
|
|
764
|
-
|
|
765
|
-
// Quick-create: + button when viewing a collection's entries
|
|
766
|
-
if (page === 'entries' && activeCol) {
|
|
767
|
-
var createHref = '/editor.html?collection=' + encodeURIComponent(activeCol);
|
|
768
|
-
var createBtn = makeDockItem('+', 'New entry', createHref, false, false);
|
|
769
|
-
createBtn.classList.add('xfce-dock-create');
|
|
770
|
-
colGroup.appendChild(createBtn);
|
|
771
|
-
}
|
|
772
818
|
}
|
|
773
819
|
|
|
774
820
|
// HUD pod section
|