shadok-ai 0.2.65 → 0.2.66
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/index.html +14 -25
package/package.json
CHANGED
package/public/index.html
CHANGED
|
@@ -1092,10 +1092,10 @@
|
|
|
1092
1092
|
#chanBar .gauge .label { display: none; } /* valeurs seules, plus compact */
|
|
1093
1093
|
#chanBar { gap: 6px; padding: 6px 10px; }
|
|
1094
1094
|
header { flex-wrap: wrap; row-gap: 6px; gap: 8px; padding: 8px 12px; }
|
|
1095
|
-
/* One header row: brand + dials +
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
its base `display: contents
|
|
1095
|
+
/* One header row: brand + dials + ⋯. reflowHeaderTools (JS) moves ALL tool
|
|
1096
|
+
icons into the ⋯ menu on a phone, so nothing wraps to a second line. The
|
|
1097
|
+
spacer that right-aligns them on desktop is dropped so what remains packs
|
|
1098
|
+
left. .hdr-tools keeps its base `display: contents`. */
|
|
1099
1099
|
header .spacer { display: none; }
|
|
1100
1100
|
header button.icon { padding: 5px 7px; }
|
|
1101
1101
|
/* The star pill is the widest tool and would push an icon off the row; on a
|
|
@@ -4849,34 +4849,23 @@
|
|
|
4849
4849
|
window.open("https://github.com/shadok-ai/shadok-ai", "_blank", "noopener");
|
|
4850
4850
|
});
|
|
4851
4851
|
|
|
4852
|
-
// ── Header
|
|
4853
|
-
//
|
|
4854
|
-
//
|
|
4855
|
-
// the real button
|
|
4856
|
-
//
|
|
4852
|
+
// ── Header tools placement ───────────────────────────────────────────
|
|
4853
|
+
// Desktop keeps every tool icon in the header. A phone keeps the header to a
|
|
4854
|
+
// SINGLE row (brand + dials + ⋯) by moving EVERY tool icon into the ⋯ menu —
|
|
4855
|
+
// the real button elements, so their click handlers travel with them.
|
|
4856
|
+
// Recomputed on load, on resize, and when the instance name changes.
|
|
4857
4857
|
const OVERFLOW_TOOLS = ["secretsBtn", "profilesBtn", "telegramBtn", "muteNotif"];
|
|
4858
4858
|
function reflowHeaderTools() {
|
|
4859
4859
|
const hdrTools = document.querySelector(".hdr-tools");
|
|
4860
4860
|
const moreWrap = document.querySelector(".more-wrap");
|
|
4861
|
-
const moreBtn = $("moreBtn");
|
|
4862
4861
|
const overflow = $("overflowTools");
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
// 1. Reset: every tool back in the header, in the declared order.
|
|
4862
|
+
if (!hdrTools || !moreWrap || !overflow) return;
|
|
4863
|
+
const mobile = matchMedia("(max-width: 640px)").matches;
|
|
4866
4864
|
for (const id of OVERFLOW_TOOLS) {
|
|
4867
4865
|
const el = $(id);
|
|
4868
|
-
if (el)
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
if (!matchMedia("(max-width: 640px)").matches) return;
|
|
4872
|
-
// 3. Move icons from the end into the menu until ⋯ is back on the first row.
|
|
4873
|
-
// Two rows → ⋯ sits a line-height below the brand; the 8px threshold
|
|
4874
|
-
// ignores sub-pixel jitter.
|
|
4875
|
-
const rowTop = () => brand.getBoundingClientRect().top;
|
|
4876
|
-
for (let i = OVERFLOW_TOOLS.length - 1; i >= 0; i--) {
|
|
4877
|
-
if (moreBtn.getBoundingClientRect().top - rowTop() < 8) break; // it fits now
|
|
4878
|
-
const el = $(OVERFLOW_TOOLS[i]);
|
|
4879
|
-
if (el) overflow.insertBefore(el, overflow.firstChild); // keep original order
|
|
4866
|
+
if (!el) continue;
|
|
4867
|
+
if (mobile) overflow.appendChild(el); // all into the ⋯ menu
|
|
4868
|
+
else hdrTools.insertBefore(el, moreWrap); // back in the header, in order
|
|
4880
4869
|
}
|
|
4881
4870
|
}
|
|
4882
4871
|
let reflowPending = false;
|