2018-08-11 01:47:10 -04:00
|
|
|
<template>
|
2022-05-29 12:49:00 -04:00
|
|
|
<nav
|
|
|
|
class="fd-top-navbar navbar is-light is-fixed-top"
|
|
|
|
:style="zindex"
|
|
|
|
role="navigation"
|
|
|
|
aria-label="main navigation"
|
|
|
|
>
|
2018-08-11 01:47:10 -04:00
|
|
|
<div class="navbar-brand">
|
2022-02-19 00:39:14 -05:00
|
|
|
<navbar-item-link v-if="is_visible_playlists" to="/playlists">
|
2022-06-15 13:24:51 -04:00
|
|
|
<span class="icon"><mdicon name="music-box-multiple" size="16" /></span>
|
2019-07-06 09:21:29 -04:00
|
|
|
</navbar-item-link>
|
2022-02-19 00:39:14 -05:00
|
|
|
<navbar-item-link v-if="is_visible_music" to="/music">
|
2022-06-15 13:24:51 -04:00
|
|
|
<span class="icon"><mdicon name="music" size="16" /></span>
|
2019-07-06 09:21:29 -04:00
|
|
|
</navbar-item-link>
|
2022-02-19 00:39:14 -05:00
|
|
|
<navbar-item-link v-if="is_visible_podcasts" to="/podcasts">
|
2022-06-15 13:24:51 -04:00
|
|
|
<span class="icon"><mdicon name="microphone" size="16" /></span>
|
2019-07-06 09:21:29 -04:00
|
|
|
</navbar-item-link>
|
2022-02-19 00:39:14 -05:00
|
|
|
<navbar-item-link v-if="is_visible_audiobooks" to="/audiobooks">
|
2022-06-15 13:24:51 -04:00
|
|
|
<span class="icon"><mdicon name="book-open-variant" size="16" /></span>
|
2019-07-06 09:21:29 -04:00
|
|
|
</navbar-item-link>
|
2022-02-19 00:39:14 -05:00
|
|
|
<navbar-item-link v-if="is_visible_radio" to="/radio">
|
2022-06-15 13:24:51 -04:00
|
|
|
<span class="icon"><mdicon name="radio" size="16" /></span>
|
2020-08-23 02:52:46 -04:00
|
|
|
</navbar-item-link>
|
2022-02-19 00:39:14 -05:00
|
|
|
<navbar-item-link v-if="is_visible_files" to="/files">
|
2022-06-15 13:24:51 -04:00
|
|
|
<span class="icon"><mdicon name="folder-open" size="16" /></span>
|
2019-07-06 09:21:29 -04:00
|
|
|
</navbar-item-link>
|
2022-02-19 00:39:14 -05:00
|
|
|
<navbar-item-link v-if="is_visible_search" to="/search">
|
2022-06-15 13:24:51 -04:00
|
|
|
<span class="icon"><mdicon name="magnify" size="16" /></span>
|
2019-07-06 09:21:29 -04:00
|
|
|
</navbar-item-link>
|
2022-05-29 12:49:00 -04:00
|
|
|
<div
|
|
|
|
class="navbar-burger"
|
|
|
|
:class="{ 'is-active': show_burger_menu }"
|
|
|
|
@click="show_burger_menu = !show_burger_menu"
|
|
|
|
>
|
2022-02-19 00:39:14 -05:00
|
|
|
<span />
|
|
|
|
<span />
|
|
|
|
<span />
|
2018-08-11 01:47:10 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="navbar-menu" :class="{ 'is-active': show_burger_menu }">
|
2022-02-19 00:39:14 -05:00
|
|
|
<div class="navbar-start" />
|
2018-08-11 01:47:10 -04:00
|
|
|
<div class="navbar-end">
|
2020-10-18 02:25:47 -04:00
|
|
|
<!-- Burger menu entries -->
|
2022-05-29 12:49:00 -04:00
|
|
|
<div
|
|
|
|
class="navbar-item has-dropdown is-hoverable"
|
|
|
|
:class="{ 'is-active': show_settings_menu }"
|
|
|
|
@click="on_click_outside_settings"
|
|
|
|
>
|
2020-04-18 00:57:55 -04:00
|
|
|
<a class="navbar-link is-arrowless">
|
2022-06-15 13:24:51 -04:00
|
|
|
<span class="icon is-hidden-touch"
|
|
|
|
><mdicon name="menu" size="24"
|
|
|
|
/></span>
|
2022-05-29 12:49:00 -04:00
|
|
|
<span
|
|
|
|
class="is-hidden-desktop has-text-weight-bold"
|
|
|
|
v-text="$t('navigation.title')"
|
|
|
|
/>
|
2020-04-18 00:57:55 -04:00
|
|
|
</a>
|
2018-08-11 01:47:10 -04:00
|
|
|
<div class="navbar-dropdown is-right">
|
2022-02-19 00:39:14 -05:00
|
|
|
<navbar-item-link to="/playlists">
|
2022-06-15 13:24:51 -04:00
|
|
|
<span class="icon"
|
|
|
|
><mdicon name="music-box-multiple" size="16"
|
|
|
|
/></span>
|
2022-05-20 07:44:22 -04:00
|
|
|
<b v-text="$t('navigation.playlists')" />
|
2022-02-19 00:39:14 -05:00
|
|
|
</navbar-item-link>
|
|
|
|
<navbar-item-link to="/music" exact>
|
2022-06-15 13:24:51 -04:00
|
|
|
<span class="icon"><mdicon name="music" size="16" /></span>
|
2022-05-20 07:44:22 -04:00
|
|
|
<b v-text="$t('navigation.music')" />
|
2022-02-19 00:39:14 -05:00
|
|
|
</navbar-item-link>
|
|
|
|
<navbar-item-link to="/music/artists">
|
2022-05-29 12:49:00 -04:00
|
|
|
<span
|
|
|
|
class="fd-navbar-item-level2"
|
|
|
|
v-text="$t('navigation.artists')"
|
|
|
|
/>
|
2022-02-19 00:39:14 -05:00
|
|
|
</navbar-item-link>
|
|
|
|
<navbar-item-link to="/music/albums">
|
2022-05-29 12:49:00 -04:00
|
|
|
<span
|
|
|
|
class="fd-navbar-item-level2"
|
|
|
|
v-text="$t('navigation.albums')"
|
|
|
|
/>
|
2022-02-19 00:39:14 -05:00
|
|
|
</navbar-item-link>
|
|
|
|
<navbar-item-link to="/music/genres">
|
2022-05-29 12:49:00 -04:00
|
|
|
<span
|
|
|
|
class="fd-navbar-item-level2"
|
|
|
|
v-text="$t('navigation.genres')"
|
|
|
|
/>
|
2022-02-19 00:39:14 -05:00
|
|
|
</navbar-item-link>
|
|
|
|
<navbar-item-link v-if="spotify_enabled" to="/music/spotify">
|
2022-05-29 12:49:00 -04:00
|
|
|
<span
|
|
|
|
class="fd-navbar-item-level2"
|
|
|
|
v-text="$t('navigation.spotify')"
|
|
|
|
/>
|
2022-02-19 00:39:14 -05:00
|
|
|
</navbar-item-link>
|
|
|
|
<navbar-item-link to="/podcasts">
|
2022-06-15 13:24:51 -04:00
|
|
|
<span class="icon"><mdicon name="microphone" size="16" /></span>
|
2022-05-20 07:44:22 -04:00
|
|
|
<b v-text="$t('navigation.podcasts')" />
|
2022-02-19 00:39:14 -05:00
|
|
|
</navbar-item-link>
|
|
|
|
<navbar-item-link to="/audiobooks">
|
2022-06-15 13:24:51 -04:00
|
|
|
<span class="icon"
|
|
|
|
><mdicon name="book-open-variant" size="16"
|
|
|
|
/></span>
|
2022-05-20 07:44:22 -04:00
|
|
|
<b v-text="$t('navigation.audiobooks')" />
|
2022-02-19 00:39:14 -05:00
|
|
|
</navbar-item-link>
|
|
|
|
<navbar-item-link to="/radio">
|
2022-06-15 13:24:51 -04:00
|
|
|
<span class="icon"><mdicon name="radio" size="16" /></span>
|
2022-05-20 07:44:22 -04:00
|
|
|
<b v-text="$t('navigation.radio')" />
|
2022-02-19 00:39:14 -05:00
|
|
|
</navbar-item-link>
|
|
|
|
<navbar-item-link to="/files">
|
2022-06-15 13:24:51 -04:00
|
|
|
<span class="icon"><mdicon name="folder-open" size="16" /></span>
|
2022-05-20 07:44:22 -04:00
|
|
|
<b v-text="$t('navigation.files')" />
|
2022-02-19 00:39:14 -05:00
|
|
|
</navbar-item-link>
|
|
|
|
<navbar-item-link to="/search">
|
2022-06-15 13:24:51 -04:00
|
|
|
<span class="icon"><mdicon name="magnify" size="16" /></span>
|
2022-05-20 07:44:22 -04:00
|
|
|
<b v-text="$t('navigation.search')" />
|
2022-02-19 00:39:14 -05:00
|
|
|
</navbar-item-link>
|
|
|
|
<hr class="fd-navbar-divider" />
|
2022-06-16 00:39:14 -04:00
|
|
|
<navbar-item-link to="/settings/webinterface">{{
|
|
|
|
$t('navigation.settings')
|
|
|
|
}}</navbar-item-link>
|
2022-05-29 12:49:00 -04:00
|
|
|
<a
|
|
|
|
class="navbar-item"
|
|
|
|
@click.stop.prevent="open_update_dialog()"
|
|
|
|
v-text="$t('navigation.update-library')"
|
|
|
|
/>
|
2022-06-16 00:39:14 -04:00
|
|
|
<navbar-item-link to="/about">{{
|
|
|
|
$t('navigation.about')
|
|
|
|
}}</navbar-item-link>
|
2022-05-29 12:49:00 -04:00
|
|
|
<div
|
|
|
|
class="navbar-item is-hidden-desktop"
|
|
|
|
style="margin-bottom: 2.5rem"
|
|
|
|
/>
|
2018-08-11 01:47:10 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-05-29 12:49:00 -04:00
|
|
|
<div
|
|
|
|
v-show="show_settings_menu"
|
|
|
|
class="is-overlay"
|
|
|
|
style="z-index: 10; width: 100vw; height: 100vh"
|
|
|
|
@click="show_settings_menu = false"
|
|
|
|
/>
|
2018-08-11 01:47:10 -04:00
|
|
|
</nav>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2022-02-19 00:18:01 -05:00
|
|
|
import NavbarItemLink from './NavbarItemLink.vue'
|
2018-08-11 01:47:10 -04:00
|
|
|
import * as types from '@/store/mutation_types'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'NavbarTop',
|
2022-01-09 12:29:24 -05:00
|
|
|
components: { NavbarItemLink },
|
2018-08-11 01:47:10 -04:00
|
|
|
|
2022-02-19 00:39:14 -05:00
|
|
|
data() {
|
2018-08-11 01:47:10 -04:00
|
|
|
return {
|
2022-01-09 12:29:24 -05:00
|
|
|
show_settings_menu: false
|
2018-08-11 01:47:10 -04:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
computed: {
|
2022-02-19 00:39:14 -05:00
|
|
|
is_visible_playlists() {
|
|
|
|
return this.$store.getters.settings_option(
|
|
|
|
'webinterface',
|
|
|
|
'show_menu_item_playlists'
|
|
|
|
).value
|
2020-08-23 02:52:46 -04:00
|
|
|
},
|
2022-02-19 00:39:14 -05:00
|
|
|
is_visible_music() {
|
|
|
|
return this.$store.getters.settings_option(
|
|
|
|
'webinterface',
|
|
|
|
'show_menu_item_music'
|
|
|
|
).value
|
2020-08-23 02:52:46 -04:00
|
|
|
},
|
2022-02-19 00:39:14 -05:00
|
|
|
is_visible_podcasts() {
|
|
|
|
return this.$store.getters.settings_option(
|
|
|
|
'webinterface',
|
|
|
|
'show_menu_item_podcasts'
|
|
|
|
).value
|
2020-08-23 02:52:46 -04:00
|
|
|
},
|
2022-02-19 00:39:14 -05:00
|
|
|
is_visible_audiobooks() {
|
|
|
|
return this.$store.getters.settings_option(
|
|
|
|
'webinterface',
|
|
|
|
'show_menu_item_audiobooks'
|
|
|
|
).value
|
2020-08-23 02:52:46 -04:00
|
|
|
},
|
2022-02-19 00:39:14 -05:00
|
|
|
is_visible_radio() {
|
|
|
|
return this.$store.getters.settings_option(
|
|
|
|
'webinterface',
|
|
|
|
'show_menu_item_radio'
|
|
|
|
).value
|
2020-08-23 02:52:46 -04:00
|
|
|
},
|
2022-02-19 00:39:14 -05:00
|
|
|
is_visible_files() {
|
|
|
|
return this.$store.getters.settings_option(
|
|
|
|
'webinterface',
|
|
|
|
'show_menu_item_files'
|
|
|
|
).value
|
2020-08-23 02:52:46 -04:00
|
|
|
},
|
2022-02-19 00:39:14 -05:00
|
|
|
is_visible_search() {
|
|
|
|
return this.$store.getters.settings_option(
|
|
|
|
'webinterface',
|
|
|
|
'show_menu_item_search'
|
|
|
|
).value
|
2020-08-23 02:52:46 -04:00
|
|
|
},
|
|
|
|
|
2022-02-19 00:39:14 -05:00
|
|
|
player() {
|
2018-08-11 01:47:10 -04:00
|
|
|
return this.$store.state.player
|
|
|
|
},
|
|
|
|
|
2022-02-19 00:39:14 -05:00
|
|
|
config() {
|
2018-08-11 01:47:10 -04:00
|
|
|
return this.$store.state.config
|
|
|
|
},
|
|
|
|
|
2022-02-19 00:39:14 -05:00
|
|
|
library() {
|
2018-08-11 01:47:10 -04:00
|
|
|
return this.$store.state.library
|
|
|
|
},
|
|
|
|
|
2022-02-19 00:39:14 -05:00
|
|
|
audiobooks() {
|
2018-08-11 01:47:10 -04:00
|
|
|
return this.$store.state.audiobooks_count
|
|
|
|
},
|
|
|
|
|
2022-02-19 00:39:14 -05:00
|
|
|
podcasts() {
|
2018-08-11 01:47:10 -04:00
|
|
|
return this.$store.state.podcasts_count
|
|
|
|
},
|
|
|
|
|
2022-02-19 00:39:14 -05:00
|
|
|
spotify_enabled() {
|
2020-04-18 00:57:55 -04:00
|
|
|
return this.$store.state.spotify.webapi_token_valid
|
2018-08-11 01:47:10 -04:00
|
|
|
},
|
|
|
|
|
2020-04-18 00:57:55 -04:00
|
|
|
show_burger_menu: {
|
2022-02-19 00:39:14 -05:00
|
|
|
get() {
|
2020-04-18 00:57:55 -04:00
|
|
|
return this.$store.state.show_burger_menu
|
|
|
|
},
|
2022-02-19 00:39:14 -05:00
|
|
|
set(value) {
|
2020-04-18 00:57:55 -04:00
|
|
|
this.$store.commit(types.SHOW_BURGER_MENU, value)
|
2019-02-16 00:48:45 -05:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2022-02-19 00:39:14 -05:00
|
|
|
show_player_menu() {
|
2020-04-18 00:57:55 -04:00
|
|
|
return this.$store.state.show_player_menu
|
2019-02-14 06:19:29 -05:00
|
|
|
},
|
|
|
|
|
2022-01-09 12:29:24 -05:00
|
|
|
show_update_dialog: {
|
2022-02-19 00:39:14 -05:00
|
|
|
get() {
|
2022-01-09 12:29:24 -05:00
|
|
|
return this.$store.state.show_update_dialog
|
|
|
|
},
|
2022-02-19 00:39:14 -05:00
|
|
|
set(value) {
|
2022-01-09 12:29:24 -05:00
|
|
|
this.$store.commit(types.SHOW_UPDATE_DIALOG, value)
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2022-02-19 00:39:14 -05:00
|
|
|
zindex() {
|
2020-04-18 00:57:55 -04:00
|
|
|
if (this.show_player_menu) {
|
|
|
|
return 'z-index: 20'
|
2019-02-14 06:19:29 -05:00
|
|
|
}
|
2020-04-18 00:57:55 -04:00
|
|
|
return ''
|
2018-08-11 01:47:10 -04:00
|
|
|
}
|
2019-02-14 06:19:29 -05:00
|
|
|
},
|
|
|
|
|
2022-02-19 00:39:14 -05:00
|
|
|
watch: {
|
|
|
|
$route(to, from) {
|
|
|
|
this.show_settings_menu = false
|
2019-02-16 00:48:45 -05:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2022-02-19 00:39:14 -05:00
|
|
|
methods: {
|
|
|
|
on_click_outside_settings() {
|
|
|
|
this.show_settings_menu = !this.show_settings_menu
|
2022-02-19 01:05:59 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
open_update_dialog() {
|
|
|
|
this.show_update_dialog = true
|
|
|
|
this.show_settings_menu = false
|
|
|
|
this.show_burger_menu = false
|
2020-04-18 00:57:55 -04:00
|
|
|
}
|
2018-08-11 01:47:10 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2022-02-19 00:39:14 -05:00
|
|
|
<style></style>
|