fixed animations, fixed auto-user-color for kick users

This commit is contained in:
liyunze 2026-08-13 16:07:41 +10:00
parent 9917b295ff
commit 9a9c04905b
5 changed files with 24 additions and 6 deletions

View file

@ -3,7 +3,7 @@
const configs = (function () {
const streamerBotSettings = {
host: "127.0.0.1",
port: 8080,
port: 6968,
endpoint: "/",
};

View file

@ -529,9 +529,13 @@ class TaskList {
if (needs) {
if (!clone) {
clone = this.#els.content.cloneNode(true);
// Build the loop copy from data. Deep-cloning the live content also
// copies temporary width/opacity styles from enter animations,
// leaving the copy collapsed and causing a visible jump at the seam.
clone = this.#els.content.cloneNode(false);
clone.id = "";
clone.classList.add("scroll-clone");
this.#patchContainer(clone, this.#data, false);
this.#els.track.appendChild(clone);
} else {
this.#patchContainer(clone, this.#data, false);

View file

@ -39,10 +39,11 @@ function taskColorFromSettings(sectionId) {
async function onChatMessage(data) {
const userColor = data.data.user.color;
const userType = data.data.user.type;
if (userColor != undefined && userColor != "undefined") {
const userId = data.data.user.id;
const key = `twitch-${userId}`;
const key = `${userType}-${userId}`;
localStorage.setItem(`${key}-color`, userColor);
userColors[`${key}-color`] = userColor;
@ -176,7 +177,12 @@ function onCustom(payload) {
taskList.focusTask(id, body.index);
break;
case "edit":
taskList.editTask(id, body.index, body.task, taskColorFromSettings(id));
taskList.editTask(
id,
body.index,
body.task,
taskColorFromSettings(id),
);
break;
case "remove":
taskList.removeTask(id, body.index);

View file

@ -505,9 +505,13 @@ class TaskList {
if (needs) {
if (!clone) {
clone = this.#els.content.cloneNode(true);
// Build the loop copy from data. Deep-cloning the live content also
// copies temporary height/opacity styles from enter animations,
// leaving the copy collapsed and causing a visible jump at the seam.
clone = this.#els.content.cloneNode(false);
clone.id = "";
clone.classList.add("scroll-clone");
this.#patchContainer(clone, this.#data, false);
this.#els.track.appendChild(clone);
} else {
this.#patchContainer(clone, this.#data, false);

View file

@ -528,9 +528,13 @@ class TaskList {
if (needs) {
if (!clone) {
clone = this.#els.content.cloneNode(true);
// Build the loop copy from data. Deep-cloning the live content also
// copies temporary height/opacity styles from enter animations,
// leaving the copy collapsed and causing a visible jump at the seam.
clone = this.#els.content.cloneNode(false);
clone.id = "";
clone.classList.add("scroll-clone");
this.#patchContainer(clone, this.#data, false);
this.#els.track.appendChild(clone);
} else {
this.#patchContainer(clone, this.#data, false);