@a83/orbiter-admin 0.3.24 → 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 -7
- package/public/xfce.js +41 -8
package/package.json
CHANGED
package/public/style.css
CHANGED
|
@@ -2018,14 +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
|
-
|
|
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;
|
|
2025
2036
|
}
|
|
2026
|
-
.xfce-
|
|
2027
|
-
|
|
2028
|
-
|
|
2037
|
+
.xfce-col-create.visible {
|
|
2038
|
+
opacity: 1;
|
|
2039
|
+
transform: translateX(-50%) translateY(0);
|
|
2040
|
+
pointer-events: auto;
|
|
2029
2041
|
}
|
|
2030
2042
|
|
|
2031
2043
|
/* ── Command Palette ─────────────────────────────────────── */
|
package/public/xfce.js
CHANGED
|
@@ -165,6 +165,38 @@
|
|
|
165
165
|
toolsPopup.classList.toggle('open');
|
|
166
166
|
}
|
|
167
167
|
|
|
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);
|
|
180
|
+
});
|
|
181
|
+
document.body.appendChild(colCreateEl);
|
|
182
|
+
}
|
|
183
|
+
|
|
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
|
+
}
|
|
195
|
+
|
|
196
|
+
function hideColCreate() {
|
|
197
|
+
if (colCreateEl) colCreateEl.classList.remove('visible');
|
|
198
|
+
}
|
|
199
|
+
|
|
168
200
|
// ── Command Palette ───────────────────────────────────────────────────
|
|
169
201
|
var palette, paletteInp, paletteResults, palActive = -1;
|
|
170
202
|
|
|
@@ -756,19 +788,20 @@
|
|
|
756
788
|
item.appendChild(badge);
|
|
757
789
|
}
|
|
758
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
|
+
|
|
759
800
|
colGroup.appendChild(item);
|
|
760
801
|
|
|
761
802
|
// Add to palette
|
|
762
803
|
_palItems.push({ icon: abbr, label: col.label, href: href, group: 'Collections' });
|
|
763
804
|
});
|
|
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
805
|
}
|
|
773
806
|
|
|
774
807
|
// HUD pod section
|