From d997c3941feebe8688bb60159f53b7feb24c85ae Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 29 Dec 2022 15:55:57 +0100 Subject: display loading --- client-web/public/app.html | 15 +++++++++------ client-web/source/index.ts | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'client-web') diff --git a/client-web/public/app.html b/client-web/public/app.html index 665a7d2..8479a22 100644 --- a/client-web/public/app.html +++ b/client-web/public/app.html @@ -8,13 +8,16 @@ keks-meet + +

keks-meet is loading, please wait…

- keks-meet needs evil javascript to be enabled. Don't be afraid - though, all the code is free (AGPL-3.0-only)! Look at it on - codeberg -

-

- If you have JS enabled, check the browser console to see if + If this takes too long check the browser console to see if something else failed

diff --git a/client-web/source/index.ts b/client-web/source/index.ts index a853c58..e42cb74 100644 --- a/client-web/source/index.ts +++ b/client-web/source/index.ts @@ -51,7 +51,7 @@ window.onbeforeunload = ev => { let r: Room; export async function main() { log("*", "starting up") - document.body.querySelectorAll("p").forEach(e => e.remove()) + document.body.innerHTML = "" // remove existing elements const room_name = load_params().rname if (!globalThis.RTCPeerConnection) return log({ scope: "webrtc", error: true }, "WebRTC not supported.") -- cgit v1.2.3-70-g09d2 From 9dba0bc526a12f26b9dc32d0ae7506ea2468ac7f Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 29 Dec 2022 16:36:40 +0100 Subject: clean keybind code --- client-web/source/keybinds.ts | 2 -- 1 file changed, 2 deletions(-) (limited to 'client-web') diff --git a/client-web/source/keybinds.ts b/client-web/source/keybinds.ts index d096501..07e21bb 100644 --- a/client-web/source/keybinds.ts +++ b/client-web/source/keybinds.ts @@ -10,7 +10,6 @@ import { Room } from "./room.ts" import { update_serviceworker } from "./sw/init.ts"; export function setup_keybinds(room: Room) { - // let command_mode = false document.body.addEventListener("keydown", ev => { // TODO is there a proper solution? if (ev.target instanceof HTMLInputElement && !(ev.target.type == "button")) return @@ -27,6 +26,5 @@ export function setup_keybinds(room: Room) { if (ev.code == "KeyC" && ev.ctrlKey) room.local_user.resources.forEach(t => t.destroy()) if (ev.code == "KeyU") if (window.confirm("really update?")) update_serviceworker() } - // command_mode = false }) } -- cgit v1.2.3-70-g09d2 From 84587df365c61297e08d00f28317b452681a4b84 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 4 Apr 2023 11:13:38 +0200 Subject: [client-web]show overlayui by default --- client-web/source/index.ts | 4 ++-- client-web/source/menu.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'client-web') diff --git a/client-web/source/index.ts b/client-web/source/index.ts index e42cb74..852e48f 100644 --- a/client-web/source/index.ts +++ b/client-web/source/index.ts @@ -67,8 +67,8 @@ export async function main() { setup_keybinds(r) r.on_ready = () => { - new BottomMenu(r).shown = true - new MenuBr().shown = true + new BottomMenu(r) + new MenuBr() } document.body.append(ROOM_CONTAINER, OVERLAYS, LOGGER_CONTAINER) diff --git a/client-web/source/menu.ts b/client-web/source/menu.ts index 035f3aa..0df50d8 100644 --- a/client-web/source/menu.ts +++ b/client-web/source/menu.ts @@ -67,6 +67,6 @@ export class BottomMenu extends OverlayUi { ebutton("File", { onclick: () => room.local_user.await_add_resource(create_file_res()) }), ) - super(enav({ class: "bottom-menu" }, chat_toggle, prefs_button, local_controls)) + super(enav({ class: "bottom-menu" }, chat_toggle, prefs_button, local_controls), true) } } -- cgit v1.2.3-70-g09d2 From bfeb96146309e1f92e2d3f040a0ee874131ed90c Mon Sep 17 00:00:00 2001 From: metamuffin Date: Wed, 5 Apr 2023 09:08:46 +0200 Subject: fix loading --- client-web/public/app.html | 13 ++++++++----- client-web/source/index.ts | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'client-web') diff --git a/client-web/public/app.html b/client-web/public/app.html index 4c7d10d..66062d9 100644 --- a/client-web/public/app.html +++ b/client-web/public/app.html @@ -3,7 +3,10 @@ - + keks-meet @@ -16,10 +19,10 @@ codeberg

-

keks-meet is loading, please wait…

-

- If this takes too long check the browser console to see if - something else failed +

keks-meet is loading, please wait…

+

+ If this takes too long check your browser's console to see if + something else failed.

diff --git a/client-web/source/index.ts b/client-web/source/index.ts index 3610ead..74f8963 100644 --- a/client-web/source/index.ts +++ b/client-web/source/index.ts @@ -59,7 +59,7 @@ export async function main() { const config: ClientConfig = await config_res.json() log("*", "config loaded. starting") - document.body.querySelectorAll("p").forEach(e => e.remove()) + document.body.querySelectorAll(".loading").forEach(e => e.remove()) const room_secret = load_params().rsecret if (!globalThis.RTCPeerConnection) return log({ scope: "webrtc", error: true }, "WebRTC not supported.") -- cgit v1.2.3-70-g09d2 From abff04fe71d29be41875db1173a554fb11c67173 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Wed, 5 Apr 2023 09:13:44 +0200 Subject: replace depreceated deno bundle with esbuild --- client-web/makefile | 10 ++++++---- makefile | 4 ++++ 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'client-web') diff --git a/client-web/makefile b/client-web/makefile index 2623c6e..2ff29d5 100644 --- a/client-web/makefile +++ b/client-web/makefile @@ -1,12 +1,14 @@ +ESFLAGS = --bundle --target=esnext --format=esm + .PHONY: all watch all: public/assets/bundle.js public/assets/sw.js public/assets/font/include.css watch: - deno bundle --no-check --watch source/index.ts public/assets/bundle.js & - deno bundle --no-check --watch source/sw/worker.ts public/assets/sw.js + esbuild $(ESFLAGS) source/index.ts --outfile=public/assets/bundle.js --watch=forever & + esbuild $(ESFLAGS) source/sw/worker.ts --outfile=public/assets/sw.js --watch=forever public/assets/bundle.js: $(shell find source -type f -name '*.ts') - deno bundle --no-check --unstable source/index.ts > $@ + esbuild $(ESFLAGS) source/index.ts --outfile=$@ public/assets/sw.js: $(shell find source/sw -type f -name '*.ts') - deno bundle --no-check --unstable source/sw/worker.ts > $@ + esbuild $(ESFLAGS) source/sw/worker.ts --outfile=$@ public/assets/font/include.css: mkdir -p public/assets/font curl 'https://s.metamuffin.org/static/font-ubuntu.tar' | tar -xC public/assets/font diff --git a/makefile b/makefile index 0ecad9c..d0a1719 100644 --- a/makefile +++ b/makefile @@ -15,6 +15,10 @@ watch: watch-public: make -C client-web watch & make -C server watch-public +kill-watch: + pkill esbuild || true + pkill cargo || true + pkill make || true install-server: client-build cargo +nightly install --force --path server --features standalone install-native: -- cgit v1.2.3-70-g09d2