54 lines
1.4 KiB
Vue
Raw Normal View History

<template>
<section v-if="spotify_enabled" class="section">
<div class="container">
<div class="columns is-centered">
<div class="column is-four-fifths">
<div class="tabs is-centered is-small is-toggle is-toggle-rounded">
<ul>
<li
:class="{
'is-active': $route.name === 'search-library'
}"
>
<a @click="$emit('search-library')">
<mdicon class="icon is-small" name="bookshelf" size="16" />
<span v-text="$t('page.search.tabs.library')" />
</a>
</li>
<li
:class="{
'is-active': $route.name === 'search-spotify'
}"
>
<a @click="$emit('search-spotify')">
<mdicon class="icon is-small" name="spotify" size="16" />
<span v-text="$t('page.search.tabs.spotify')" />
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</section>
</template>
<script>
2024-08-22 21:31:59 +02:00
import { useServicesStore } from '@/stores/services'
export default {
name: 'TabsSearch',
emits: ['search-library', 'search-spotify'],
2024-08-22 21:31:59 +02:00
setup() {
return { servicesStore: useServicesStore() }
2024-08-22 21:31:59 +02:00
},
computed: {
spotify_enabled() {
2024-08-22 21:31:59 +02:00
return this.servicesStore.spotify.webapi_token_valid
}
}
}
</script>