summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-04-10 14:15:39 +0200
committermetamuffin <metamuffin@disroot.org>2023-04-10 14:15:39 +0200
commit239b0c95c2dfa0bebafb228cf1d2f201ecadf2f8 (patch)
tree5dd6bbcad4b105a411d5c80660e785be168b3dbf
parent4b026c618ed6b40a22c0bf601b45e1da96d5bc5e (diff)
parentabff04fe71d29be41875db1173a554fb11c67173 (diff)
downloadkeks-meet-239b0c95c2dfa0bebafb228cf1d2f201ecadf2f8.tar
keks-meet-239b0c95c2dfa0bebafb228cf1d2f201ecadf2f8.tar.bz2
keks-meet-239b0c95c2dfa0bebafb228cf1d2f201ecadf2f8.tar.zst
Merge branch 'master' of codeberg.org:metamuffin/keks-meet
-rw-r--r--client-web/makefile10
-rw-r--r--client-web/public/app.html24
-rw-r--r--client-web/source/index.ts6
-rw-r--r--client-web/source/keybinds.ts2
-rw-r--r--client-web/source/menu.ts2
-rw-r--r--makefile4
-rw-r--r--readme.md15
7 files changed, 37 insertions, 26 deletions
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/client-web/public/app.html b/client-web/public/app.html
index d121be2..66062d9 100644
--- a/client-web/public/app.html
+++ b/client-web/public/app.html
@@ -3,20 +3,26 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="description" content="A simple secure web conferencing application using webrtc">
+ <meta
+ name="description"
+ content="A simple secure web conferencing application using webrtc"
+ />
<script async type="module" src="/assets/bundle.js"></script>
<link rel="stylesheet" href="/assets/style/master.css" />
<title>keks-meet</title>
</head>
<body>
- <p>
- 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
- <a href="https://codeberg.org/metamuffin/keks-meet">codeberg</a>
- </p>
- <p>
- If you have JS enabled, check the browser console to see if
- something else failed
+ <noscript>
+ <p>
+ 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
+ <a href="https://codeberg.org/metamuffin/keks-meet">codeberg</a>
+ </p>
+ </noscript>
+ <h1 class="loading">keks-meet is loading, please wait…</h1>
+ <p class="loading">
+ If this takes too long check your browser's console to see if
+ something else failed.
</p>
</body>
</html>
diff --git a/client-web/source/index.ts b/client-web/source/index.ts
index 8da99ea..84a86e9 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.")
@@ -84,8 +84,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.prepend(ROOM_CONTAINER, OVERLAYS)
diff --git a/client-web/source/keybinds.ts b/client-web/source/keybinds.ts
index 28bd263..fb17259 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/client.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
})
}
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)
}
}
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:
diff --git a/readme.md b/readme.md
index 92b4a3f..60f004f 100644
--- a/readme.md
+++ b/readme.md
@@ -24,26 +24,27 @@ only. See [COPYING](./COPYING).
## Usage
For trying it out, a hosted version is available on
-[my server](https://meet.metamuffin.org/). For self-hosting, this should help:
+[meet.metamuffin.org](https://meet.metamuffin.org/). For self-hosting, this
+should help:
```sh
-pacman -S --needed deno rustup make coreutils; rustup install nightly
+pacman -S --needed esbuild rustup make coreutils; rustup install nightly
git clone https://codeberg.org/metamuffin/keks-meet.git
cd keks-meet
cp config/client.example.toml config/client.toml # use the example config. the defaults work.
-make run # or `make build`
+make install # binaries will be copied to ~/.cargo/bin
```
When changing code, use `make watch` to re-build things automatically as needed.
-(run `cargo install systemfd cargo-watch` if needed)
+(might require `cargo install systemfd cargo-watch`)
The client configuration file (`config/client.toml`) configures the client and
requires server recompilation on change for now.
The server's bind address can be controlled using the `BIND` environment
-variable. In production you can also activate the `standalone` feature to embed
-all assets into the binary; This speeds it up and allows the server to run from
-just the binary.
+variable. In production you can also activate the `standalone` feature (enabled
+when using `make install`) to embed all assets into the binary; This speeds it
+up and allows the server to run from just the binary.
If you use this project or have any suggestions, please
[contact me](https://metamuffin.org/contact)