продолжаю чат
This commit is contained in:
@@ -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,
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user