Redirect if audio only

This commit is contained in:
dragongoose 2023-08-21 15:37:24 -04:00
parent 119d1a1eb6
commit 64fdfc664a
No known key found for this signature in database
GPG key ID: 01397EEC371CDAA5

View file

@ -12,7 +12,7 @@ import AudioPlayer from '@/components/AudioPlayer.vue'
import type { StreamerData } from '@/types'
import { truncate, abbreviate, getEndpoint } from '@/mixins'
import { chatVisible } from '@/settingsManager'
import { chatVisible, getSetting } from '@/settingsManager'
export default {
inject: ['rootBackendUrl'],
@ -43,6 +43,12 @@ export default {
}
},
async mounted() {
// check if audio only
const audioOnly = getSetting("audioOnly")
if (audioOnly) {
this.$router.push({ query: { "audio-only": "true" } })
}
const username = this.$route.params.username
await getEndpoint('api/users/' + username)