@a83/orbiter-admin 0.3.25 → 0.3.26
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 +19 -16
- package/public/xfce.js +35 -45
package/package.json
CHANGED
package/public/style.css
CHANGED
|
@@ -2018,23 +2018,26 @@ a.xfce-sb-logo:hover { opacity: .8; }
|
|
|
2018
2018
|
}
|
|
2019
2019
|
.xfce-dock-item { position: relative; }
|
|
2020
2020
|
|
|
2021
|
-
/*
|
|
2022
|
-
.xfce-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
color: var(--
|
|
2021
|
+
/* Hover + badge above collection dock items */
|
|
2022
|
+
.xfce-col-create {
|
|
2023
|
+
position: fixed;
|
|
2024
|
+
z-index: 99990;
|
|
2025
|
+
width: 22px; height: 22px;
|
|
2026
|
+
border-radius: 50%;
|
|
2027
|
+
background: var(--accent);
|
|
2028
|
+
color: color-mix(in srgb, var(--bg1) 15%, #000);
|
|
2029
|
+
font-size: 17px; line-height: 22px; font-weight: 300;
|
|
2030
|
+
text-align: center; text-decoration: none;
|
|
2031
|
+
transform: translateX(-50%) translateY(6px);
|
|
2032
|
+
opacity: 0; pointer-events: none;
|
|
2033
|
+
transition: opacity .13s, transform .13s cubic-bezier(.34,1.5,.64,1);
|
|
2034
|
+
box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 55%, transparent);
|
|
2035
|
+
user-select: none;
|
|
2029
2036
|
}
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
padding: 6px 12px 4px;
|
|
2035
|
-
font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase;
|
|
2036
|
-
color: var(--muted); cursor: default; pointer-events: none;
|
|
2037
|
-
border-bottom: 1px solid var(--line); margin-bottom: 2px;
|
|
2037
|
+
.xfce-col-create.visible {
|
|
2038
|
+
opacity: 1;
|
|
2039
|
+
transform: translateX(-50%) translateY(0);
|
|
2040
|
+
pointer-events: auto;
|
|
2038
2041
|
}
|
|
2039
2042
|
|
|
2040
2043
|
/* ── Command Palette ─────────────────────────────────────── */
|
package/public/xfce.js
CHANGED
|
@@ -136,8 +136,6 @@
|
|
|
136
136
|
|
|
137
137
|
// ── Tools popup ───────────────────────────────────────────────────────
|
|
138
138
|
var toolsPopup;
|
|
139
|
-
var createPopup;
|
|
140
|
-
var _createCols = [];
|
|
141
139
|
|
|
142
140
|
function buildToolsPopup() {
|
|
143
141
|
toolsPopup = el('div', 'xfce-tools-popup');
|
|
@@ -167,40 +165,36 @@
|
|
|
167
165
|
toolsPopup.classList.toggle('open');
|
|
168
166
|
}
|
|
169
167
|
|
|
170
|
-
// ──
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
var href = col.singleton
|
|
183
|
-
? '/editor.html?collection=' + encodeURIComponent(col.id) + '&singleton=1'
|
|
184
|
-
: '/editor.html?collection=' + encodeURIComponent(col.id);
|
|
185
|
-
var a = el('a', 'xfce-tools-item' + (isCurrent ? ' active' : ''));
|
|
186
|
-
a.href = href;
|
|
187
|
-
a.innerHTML = '<span class="xfce-tools-icon" style="font-family:var(--mono);font-size:11px">' + abbr + '</span><span>' + col.label + '</span>';
|
|
188
|
-
createPopup.appendChild(a);
|
|
168
|
+
// ── Hover + badge above collection items ─────────────────────────────
|
|
169
|
+
var colCreateEl, colCreateTimer;
|
|
170
|
+
|
|
171
|
+
function buildColCreate() {
|
|
172
|
+
colCreateEl = el('a', 'xfce-col-create');
|
|
173
|
+
colCreateEl.id = 'xfce-col-create';
|
|
174
|
+
colCreateEl.textContent = '+';
|
|
175
|
+
colCreateEl.addEventListener('mouseenter', function () {
|
|
176
|
+
clearTimeout(colCreateTimer);
|
|
177
|
+
});
|
|
178
|
+
colCreateEl.addEventListener('mouseleave', function () {
|
|
179
|
+
colCreateTimer = setTimeout(hideColCreate, 120);
|
|
189
180
|
});
|
|
181
|
+
document.body.appendChild(colCreateEl);
|
|
182
|
+
}
|
|
190
183
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
184
|
+
function showColCreate(href, itemEl) {
|
|
185
|
+
if (!colCreateEl) buildColCreate();
|
|
186
|
+
clearTimeout(colCreateTimer);
|
|
187
|
+
var dock = document.getElementById('xfce-dock');
|
|
188
|
+
var dockTop = dock ? dock.getBoundingClientRect().top : 0;
|
|
189
|
+
var itemRect = itemEl.getBoundingClientRect();
|
|
190
|
+
colCreateEl.href = href;
|
|
191
|
+
colCreateEl.style.left = Math.round(itemRect.left + itemRect.width / 2) + 'px';
|
|
192
|
+
colCreateEl.style.top = Math.round(dockTop - 34) + 'px';
|
|
193
|
+
colCreateEl.classList.add('visible');
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
function
|
|
197
|
-
if (
|
|
198
|
-
var btn = document.getElementById('xfce-create-btn');
|
|
199
|
-
if (btn) {
|
|
200
|
-
var rect = btn.getBoundingClientRect();
|
|
201
|
-
createPopup.style.left = Math.round(rect.left + rect.width / 2) + 'px';
|
|
202
|
-
}
|
|
203
|
-
createPopup.classList.toggle('open');
|
|
196
|
+
function hideColCreate() {
|
|
197
|
+
if (colCreateEl) colCreateEl.classList.remove('visible');
|
|
204
198
|
}
|
|
205
199
|
|
|
206
200
|
// ── Command Palette ───────────────────────────────────────────────────
|
|
@@ -794,24 +788,20 @@
|
|
|
794
788
|
item.appendChild(badge);
|
|
795
789
|
}
|
|
796
790
|
|
|
791
|
+
// Hover shows + badge above this item
|
|
792
|
+
var createHref = col.singleton
|
|
793
|
+
? '/editor.html?collection=' + encodeURIComponent(col.id) + '&singleton=1'
|
|
794
|
+
: '/editor.html?collection=' + encodeURIComponent(col.id);
|
|
795
|
+
item.addEventListener('mouseenter', function () { showColCreate(createHref, item); });
|
|
796
|
+
item.addEventListener('mouseleave', function () {
|
|
797
|
+
colCreateTimer = setTimeout(hideColCreate, 120);
|
|
798
|
+
});
|
|
799
|
+
|
|
797
800
|
colGroup.appendChild(item);
|
|
798
801
|
|
|
799
802
|
// Add to palette
|
|
800
803
|
_palItems.push({ icon: abbr, label: col.label, href: href, group: 'Collections' });
|
|
801
804
|
});
|
|
802
|
-
|
|
803
|
-
// Store for create popup
|
|
804
|
-
_createCols = topLevel;
|
|
805
|
-
|
|
806
|
-
// Always-visible + button opens the create popup
|
|
807
|
-
var createBtn = makeDockItem('+', 'New', null, false, true);
|
|
808
|
-
createBtn.id = 'xfce-create-btn';
|
|
809
|
-
createBtn.classList.add('xfce-dock-create');
|
|
810
|
-
createBtn.addEventListener('click', function (e) {
|
|
811
|
-
e.stopPropagation();
|
|
812
|
-
toggleCreatePopup();
|
|
813
|
-
});
|
|
814
|
-
colGroup.appendChild(createBtn);
|
|
815
805
|
}
|
|
816
806
|
|
|
817
807
|
// HUD pod section
|