MCPcopy Create free account
hub / github.com/OpenAnonymity/oa-chat / processTicketsImportFile

Method processTicketsImportFile

chat/components/ChatInput.js:2042–2070  ·  view source on GitHub ↗

* Processes the selected tickets import file. * @param {File} file - The tickets JSON file

(file)

Source from the content-addressed store, hash-verified

2040 }
2041
2042 /**
2043 * Settings that only matter while a switch is on (Memory's under the
2044 * Memory heading, Council model under Council review) fold away while it
2045 * is off (the transitions.dev accordion). Opening the gear sets them
2046 * without motion; a click on the switch animates. Tooltips above the
2047 * rows need the fold's clip lifted once it has settled open.
2048 */
2049 setSettingsChildrenOpen(id, open, { instant = false } = {}) {
2050 const children = document.getElementById(id);
2051 if (!children) return;
2052 const inner = children.querySelector('.t-acc-panel-inner');
2053 const panel = children.querySelector('.t-acc-panel');
2054 if (inner) inner.inert = !open;
2055 if (children.dataset.open === String(open) && !instant) return;
2056 this.settingsFoldTimers ||= new Map();
2057 clearTimeout(this.settingsFoldTimers.get(id));
2058 delete children.dataset.settled;
2059 if (instant) {
2060 children.dataset.instant = '';
2061 children.dataset.open = String(open);
2062 void children.offsetHeight;
2063 delete children.dataset.instant;
2064 if (open) children.dataset.settled = '';
2065 return;
2066 }
2067 // The panel hangs from its bottom edge above the composer. Folding
2068 // settings away holds the top edge, so the switch just clicked stays
2069 // under the pointer (the panel glides back down once it is left).
2070 // Unfolding grows the panel upward from its resting place, so it
2071 // never covers the composer; if a fold just left a gap that fits the
2072 // new rows, they fill that gap first and nothing above them moves.
2073 if (!open) this.pinSettingsMenuTop();

Callers 1

setupEventListenersMethod · 0.95

Calls 4

showLoadingToastMethod · 0.80
showToastMethod · 0.80
loadNextTicketMethod · 0.80
importTicketsMethod · 0.45

Tested by

no test coverage detected