From 5c97cc515fc77c9faf58354e585eaf596d91a5d2 Mon Sep 17 00:00:00 2001 From: pavel Date: Fri, 27 Feb 2026 15:51:03 +0100 Subject: [PATCH 1/2] fix: uploads --- desktop/index.html | 6 +++++- static/shared/app-core.js | 38 ++++++++++++++++++++------------------ 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/desktop/index.html b/desktop/index.html index ed754ec..fac5aa8 100644 --- a/desktop/index.html +++ b/desktop/index.html @@ -144,6 +144,10 @@
+ + @@ -268,4 +272,4 @@ - \ No newline at end of file + diff --git a/static/shared/app-core.js b/static/shared/app-core.js index 0aa2e4f..f7013a9 100644 --- a/static/shared/app-core.js +++ b/static/shared/app-core.js @@ -1914,25 +1914,27 @@ async function init() { } catch (err) { alert(err.message); } }; - el.mediaUploadBtn.onclick = () => { - if (!state.selectedTextChannelId && !state.selectedDmUserId) { - alert("Select a chat first."); - return; - } - el.mediaFileInput.click(); - }; + if (el.mediaUploadBtn && el.mediaFileInput) { + el.mediaUploadBtn.onclick = () => { + if (!state.selectedTextChannelId && !state.selectedDmUserId) { + alert("Select a chat first."); + return; + } + el.mediaFileInput.click(); + }; - el.mediaFileInput.onchange = async () => { - const file = el.mediaFileInput.files?.[0]; - if (!file) return; - try { - await uploadMediaFile(file); - } catch (err) { - alert(err.message); - } finally { - el.mediaFileInput.value = ""; - } - }; + el.mediaFileInput.onchange = async () => { + const file = el.mediaFileInput.files?.[0]; + if (!file) return; + try { + await uploadMediaFile(file); + } catch (err) { + alert(err.message); + } finally { + el.mediaFileInput.value = ""; + } + }; + } // 4. Voice/Soundboard Controls el.voiceVideoBtn.onclick = toggleVideo; From 6882b49336324285d2e9af0483c4feaf36eb0ba5 Mon Sep 17 00:00:00 2001 From: pavel Date: Fri, 27 Feb 2026 15:57:39 +0100 Subject: [PATCH 2/2] refactor --- desktop/index.html | 6 +- desktop/styles.css | 1629 ------------------------------- package.json | 11 +- scripts/generate-html.js | 53 + shared-html/index.template.html | 272 ++++++ static/index.html | 1 + 6 files changed, 335 insertions(+), 1637 deletions(-) delete mode 100644 desktop/styles.css create mode 100644 scripts/generate-html.js create mode 100644 shared-html/index.template.html diff --git a/desktop/index.html b/desktop/index.html index fac5aa8..cb1de11 100644 --- a/desktop/index.html +++ b/desktop/index.html @@ -1,3 +1,4 @@ + @@ -8,7 +9,7 @@ - + @@ -116,8 +117,7 @@