mirror of
https://github.com/owntone/owntone-server.git
synced 2025-03-04 15:50:10 -05:00
39 lines
656 B
Vue
39 lines
656 B
Vue
<template>
|
|
<a :href="href" @click.stop.prevent="open">
|
|
<slot />
|
|
</a>
|
|
</template>
|
|
|
|
<script>
|
|
import { useUIStore } from '@/stores/ui'
|
|
|
|
export default {
|
|
name: 'ControlLink',
|
|
props: {
|
|
to: { required: true, type: Object }
|
|
},
|
|
|
|
setup() {
|
|
return { uiStore: useUIStore() }
|
|
},
|
|
|
|
computed: {
|
|
href() {
|
|
return this.$router.resolve(this.to).href
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
open() {
|
|
if (this.uiStore.show_burger_menu) {
|
|
this.uiStore.show_burger_menu = false
|
|
}
|
|
if (this.uiStore.show_player_menu) {
|
|
this.uiStore.show_player_menu = false
|
|
}
|
|
this.$router.push(this.to)
|
|
}
|
|
}
|
|
}
|
|
</script>
|