From 2d30ac28639491aef11423e3a1377118b2adebfc Mon Sep 17 00:00:00 2001 From: opti1337 Date: Sat, 27 Dec 2025 02:49:39 +0600 Subject: [PATCH] minor update --- client/app/components/ClientRow.vue | 2 +- client/app/composables/use-app.ts | 12 +++++++++++- client/app/composables/use-fullscreen-video.ts | 14 ++++++++++++++ client/app/layouts/default.vue | 3 +-- client/src-tauri/tauri.conf.json | 2 +- 5 files changed, 28 insertions(+), 5 deletions(-) diff --git a/client/app/components/ClientRow.vue b/client/app/components/ClientRow.vue index 29df9b0..620393f 100644 --- a/client/app/components/ClientRow.vue +++ b/client/app/components/ClientRow.vue @@ -27,7 +27,7 @@ - + diff --git a/client/app/composables/use-app.ts b/client/app/composables/use-app.ts index b59c15d..3e0a901 100644 --- a/client/app/composables/use-app.ts +++ b/client/app/composables/use-app.ts @@ -12,7 +12,17 @@ export const useApp = createGlobalState(() => { const ready = ref(false) const isTauri = computed(() => '__TAURI_INTERNALS__' in window) const commitSha = __COMMIT_SHA__ - const version = computedAsync(() => isTauri.value ? getVersion() : 'web', '-') + const version = computedAsync(() => { + if (import.meta.dev) { + return 'dev' + } + else if (isTauri.value) { + return getVersion() + } + else { + return 'web' + } + }, '-') const inputMuted = computed(() => { return !!mediasoup.micProducer.value?.paused diff --git a/client/app/composables/use-fullscreen-video.ts b/client/app/composables/use-fullscreen-video.ts index 61182ad..d65780b 100644 --- a/client/app/composables/use-fullscreen-video.ts +++ b/client/app/composables/use-fullscreen-video.ts @@ -29,11 +29,25 @@ export const useFullscreenVideo = createGlobalState(() => { videoEl.value = el } + stream.getTracks().forEach(t => + t.addEventListener('ended', hide), + ) + videoEl.value.addEventListener('ended', hide) + await videoEl.value.requestFullscreen() } function hide() { + if (!videoEl.value) + return + + (videoEl.value.srcObject as MediaStream).getTracks().forEach(t => + t.removeEventListener('ended', hide), + ) + videoEl.value.removeEventListener('ended', hide) + videoEl.value?.remove() + videoEl.value = undefined } useEventListener(document, 'fullscreenchange', () => { diff --git a/client/app/layouts/default.vue b/client/app/layouts/default.vue index f22ae1a..bdf9e33 100644 --- a/client/app/layouts/default.vue +++ b/client/app/layouts/default.vue @@ -4,7 +4,7 @@ class="flex items-center justify-between gap-2 rounded-xl p-3 bg-surface-950" >
- +
@@ -72,7 +72,6 @@ import { } from 'lucide-vue-next' const { - isTauri, version, clients, inputMuted, diff --git a/client/src-tauri/tauri.conf.json b/client/src-tauri/tauri.conf.json index 97ad656..a3a6d3d 100644 --- a/client/src-tauri/tauri.conf.json +++ b/client/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "../node_modules/@tauri-apps/cli/config.schema.json", "productName": "chad", - "version": "0.2.17", + "version": "0.2.18", "identifier": "xyz.koptilnya.chad", "build": { "frontendDist": "../.output/public",