mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 03:29:16 +01:00
feat: ✨ Add multi-account support, more options for posts, UI improvements
This commit is contained in:
parent
48954baf06
commit
ef9a6f1da4
36 changed files with 649 additions and 344 deletions
|
|
@ -39,20 +39,18 @@ const id = useId();
|
|||
|
||||
// HACK: Fix the menu children not reacting to touch events as click for some reason
|
||||
const registerClickHandlers = () => {
|
||||
const targetElement = document.querySelector(`.${id}`);
|
||||
if (targetElement) {
|
||||
for (const el of targetElement.children) {
|
||||
el.addEventListener("touchstart", (e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
// Click all element children
|
||||
for (const elChild of Array.from(el.children)) {
|
||||
if (elChild instanceof HTMLElement) {
|
||||
elChild.click();
|
||||
}
|
||||
const targetElements = document.querySelectorAll(`.${id} [data-part=item]`);
|
||||
for (const el of targetElements) {
|
||||
el.addEventListener("touchstart", (e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
// Click all element children
|
||||
for (const elChild of Array.from(el.children)) {
|
||||
if (elChild instanceof HTMLElement) {
|
||||
elChild.click();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue