продолжаю чат

This commit is contained in:
2026-04-16 14:02:59 +06:00
parent 0915d3c64d
commit c966aa9c4b
13 changed files with 184 additions and 19 deletions

View File

@@ -1,5 +1,5 @@
import { getVersion } from '@tauri-apps/api/app'
import { openUrl as tauriOpenUrl } from '@tauri-apps/plugin-opener'
import { computedAsync, createGlobalState } from '@vueuse/core'
import { useClients } from '~/composables/use-clients'
@@ -134,6 +134,15 @@ export const useApp = createGlobalState(() => {
}
}
async function openUrl(href: string) {
if (isTauri.value) {
await tauriOpenUrl(href)
}
else {
window.open(href, '_blank', 'noopener noreferrer')
}
}
return {
ready,
clients,
@@ -153,5 +162,6 @@ export const useApp = createGlobalState(() => {
videoEnabled,
sharingEnabled,
somebodyStreamingVideo,
openUrl,
}
})

View File

@@ -45,6 +45,11 @@ export const useChat = createGlobalState(() => {
if (!signaling.connected.value)
return
message.text = message.text.trim()
if (!message.text.length)
return
signaling.socket.value!.emit('chat:message', message)
}