2018-08-11 07:47:10 +02:00
|
|
|
<template>
|
2023-06-23 22:23:32 +02:00
|
|
|
<section v-if="spotify_enabled" class="section">
|
2018-08-11 07:47:10 +02:00
|
|
|
<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>
|
2022-05-29 18:49:00 +02:00
|
|
|
<li
|
|
|
|
:class="{
|
2024-04-03 17:46:33 +02:00
|
|
|
'is-active': $route.name === 'search-library'
|
2022-05-29 18:49:00 +02:00
|
|
|
}"
|
|
|
|
>
|
2024-04-09 15:39:06 +02:00
|
|
|
<a @click="$emit('search-library')">
|
2023-06-30 21:41:40 +02:00
|
|
|
<mdicon class="icon is-small" name="bookshelf" size="16" />
|
2022-06-04 13:57:08 +02:00
|
|
|
<span v-text="$t('page.search.tabs.library')" />
|
2018-08-11 07:47:10 +02:00
|
|
|
</a>
|
2020-11-21 10:57:39 +01:00
|
|
|
</li>
|
2022-05-29 18:49:00 +02:00
|
|
|
<li
|
|
|
|
:class="{
|
2024-04-03 17:46:33 +02:00
|
|
|
'is-active': $route.name === 'search-spotify'
|
2022-05-29 18:49:00 +02:00
|
|
|
}"
|
|
|
|
>
|
2024-04-09 15:39:06 +02:00
|
|
|
<a @click="$emit('search-spotify')">
|
2023-06-30 21:41:40 +02:00
|
|
|
<mdicon class="icon is-small" name="spotify" size="16" />
|
2022-06-04 13:57:08 +02:00
|
|
|
<span v-text="$t('page.search.tabs.spotify')" />
|
2018-08-11 07:47:10 +02:00
|
|
|
</a>
|
2020-11-21 10:57:39 +01:00
|
|
|
</li>
|
2018-08-11 07:47:10 +02:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2024-08-22 21:31:59 +02:00
|
|
|
import { useServicesStore } from '@/stores/services'
|
|
|
|
|
2018-08-11 07:47:10 +02:00
|
|
|
export default {
|
|
|
|
name: 'TabsSearch',
|
2024-04-09 15:39:06 +02:00
|
|
|
emits: ['search-library', 'search-spotify'],
|
2020-11-21 10:57:39 +01:00
|
|
|
|
2024-08-22 21:31:59 +02:00
|
|
|
setup() {
|
2025-02-13 21:02:13 +01:00
|
|
|
return { servicesStore: useServicesStore() }
|
2024-08-22 21:31:59 +02:00
|
|
|
},
|
|
|
|
|
2018-08-11 07:47:10 +02:00
|
|
|
computed: {
|
2024-03-24 10:02:18 +01:00
|
|
|
spotify_enabled() {
|
2024-08-22 21:31:59 +02:00
|
|
|
return this.servicesStore.spotify.webapi_token_valid
|
2018-08-11 07:47:10 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|