2018-08-11 01:47:10 -04:00
|
|
|
<template>
|
2020-04-18 00:57:55 -04:00
|
|
|
<nav class="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">
|
2019-07-06 09:21:29 -04:00
|
|
|
<navbar-item-link to="/playlists">
|
2018-08-11 01:47:10 -04:00
|
|
|
<span class="icon"><i class="mdi mdi-library-music"></i></span>
|
2019-07-06 09:21:29 -04:00
|
|
|
</navbar-item-link>
|
2019-07-06 10:03:09 -04:00
|
|
|
<navbar-item-link to="/music">
|
2018-08-11 01:47:10 -04:00
|
|
|
<span class="icon"><i class="mdi mdi-music"></i></span>
|
2019-07-06 09:21:29 -04:00
|
|
|
</navbar-item-link>
|
2020-02-21 15:21:08 -05:00
|
|
|
<navbar-item-link to="/podcasts">
|
2018-08-11 01:47:10 -04:00
|
|
|
<span class="icon"><i class="mdi mdi-microphone"></i></span>
|
2019-07-06 09:21:29 -04:00
|
|
|
</navbar-item-link>
|
|
|
|
<navbar-item-link to="/audiobooks" v-if="audiobooks.tracks > 0">
|
2018-08-11 01:47:10 -04:00
|
|
|
<span class="icon"><i class="mdi mdi-book-open-variant"></i></span>
|
2019-07-06 09:21:29 -04:00
|
|
|
</navbar-item-link>
|
|
|
|
<navbar-item-link to="/files">
|
2018-12-23 04:34:46 -05:00
|
|
|
<span class="icon"><i class="mdi mdi-folder-open"></i></span>
|
2019-07-06 09:21:29 -04:00
|
|
|
</navbar-item-link>
|
|
|
|
<navbar-item-link to="/search">
|
2018-08-11 01:47:10 -04:00
|
|
|
<span class="icon"><i class="mdi mdi-magnify"></i></span>
|
2019-07-06 09:21:29 -04:00
|
|
|
</navbar-item-link>
|
2018-08-11 01:47:10 -04:00
|
|
|
|
2020-04-18 00:57:55 -04:00
|
|
|
<div class="navbar-burger" @click="show_burger_menu = !show_burger_menu" :class="{ 'is-active': show_burger_menu }">
|
2018-08-11 01:47:10 -04:00
|
|
|
<span></span>
|
|
|
|
<span></span>
|
|
|
|
<span></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-07-06 10:03:09 -04:00
|
|
|
|
2018-08-11 01:47:10 -04:00
|
|
|
<div class="navbar-menu" :class="{ 'is-active': show_burger_menu }">
|
|
|
|
<div class="navbar-start">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="navbar-end">
|
2019-07-06 10:03:09 -04:00
|
|
|
|
2020-04-18 00:57:55 -04:00
|
|
|
<!-- Settings drop down -->
|
|
|
|
<div class="navbar-item has-dropdown is-hoverable"
|
|
|
|
:class="{ 'is-active': show_settings_menu }"
|
|
|
|
@click="on_click_outside_settings">
|
|
|
|
<a class="navbar-link is-arrowless">
|
|
|
|
<span class="icon is-hidden-touch"><i class="mdi mdi-24px mdi-menu"></i></span>
|
|
|
|
<span class="is-hidden-desktop has-text-weight-bold">forked-daapd</span>
|
|
|
|
</a>
|
2018-08-11 01:47:10 -04:00
|
|
|
|
|
|
|
<div class="navbar-dropdown is-right">
|
2019-02-14 06:19:29 -05:00
|
|
|
|
2020-04-18 00:57:55 -04:00
|
|
|
<navbar-item-link to="/playlists"><span class="icon"><i class="mdi mdi-library-music"></i></span> <b>Playlists</b></navbar-item-link>
|
|
|
|
<navbar-item-link to="/music" exact><span class="icon"><i class="mdi mdi-music"></i></span> <b>Music</b></navbar-item-link>
|
|
|
|
<navbar-item-link to="/music/artists"><span style="padding-left: 1.5rem;">Artists</span></navbar-item-link>
|
|
|
|
<navbar-item-link to="/music/albums"><span style="padding-left: 1.5rem;">Albums</span></navbar-item-link>
|
|
|
|
<navbar-item-link to="/music/genres"><span style="padding-left: 1.5rem;">Genres</span></navbar-item-link>
|
|
|
|
<navbar-item-link to="/music/spotify" v-if="spotify_enabled"><span style="padding-left: 1.5rem;">Spotify</span></navbar-item-link>
|
|
|
|
<navbar-item-link to="/podcasts"><span class="icon"><i class="mdi mdi-microphone"></i></span> <b>Podcasts</b></navbar-item-link>
|
|
|
|
<navbar-item-link to="/audiobooks"><span class="icon"><i class="mdi mdi-book-open-variant"></i></span> <b>Audiobooks</b></navbar-item-link>
|
|
|
|
<navbar-item-link to="/files"><span class="icon"><i class="mdi mdi-folder-open"></i></span> <b>Files</b></navbar-item-link>
|
|
|
|
<navbar-item-link to="/search"><span class="icon"><i class="mdi mdi-magnify"></i></span> <b>Search</b></navbar-item-link>
|
|
|
|
<hr style="margin: 12px 0;">
|
2019-07-06 10:03:09 -04:00
|
|
|
|
2018-08-11 01:47:10 -04:00
|
|
|
<a class="navbar-item" href="/admin.html">Admin</a>
|
2020-04-18 00:57:55 -04:00
|
|
|
<hr style="margin: 12px 0;">
|
2019-07-07 02:22:56 -04:00
|
|
|
<navbar-item-link to="/settings/webinterface">Settings</navbar-item-link>
|
|
|
|
<navbar-item-link to="/about">About</navbar-item-link>
|
2018-08-11 01:47:10 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-04-18 00:57:55 -04:00
|
|
|
|
|
|
|
<div class="is-overlay" v-show="show_settings_menu"
|
|
|
|
style="z-index:10; width: 100vw; height:100vh;"
|
|
|
|
@click="show_settings_menu = false"></div>
|
2018-08-11 01:47:10 -04:00
|
|
|
</nav>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2019-07-06 09:21:29 -04:00
|
|
|
import NavbarItemLink from './NavbarItemLink'
|
2018-08-11 01:47:10 -04:00
|
|
|
import * as types from '@/store/mutation_types'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'NavbarTop',
|
2020-04-18 00:57:55 -04:00
|
|
|
components: { NavbarItemLink },
|
2018-08-11 01:47:10 -04:00
|
|
|
|
|
|
|
data () {
|
|
|
|
return {
|
2019-09-21 02:01:21 -04:00
|
|
|
show_settings_menu: false
|
2018-08-11 01:47:10 -04:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
computed: {
|
|
|
|
player () {
|
|
|
|
return this.$store.state.player
|
|
|
|
},
|
|
|
|
|
|
|
|
config () {
|
|
|
|
return this.$store.state.config
|
|
|
|
},
|
|
|
|
|
|
|
|
library () {
|
|
|
|
return this.$store.state.library
|
|
|
|
},
|
|
|
|
|
|
|
|
audiobooks () {
|
|
|
|
return this.$store.state.audiobooks_count
|
|
|
|
},
|
|
|
|
|
|
|
|
podcasts () {
|
|
|
|
return this.$store.state.podcasts_count
|
|
|
|
},
|
|
|
|
|
2020-04-18 00:57:55 -04:00
|
|
|
spotify_enabled () {
|
|
|
|
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: {
|
|
|
|
get () {
|
|
|
|
return this.$store.state.show_burger_menu
|
|
|
|
},
|
|
|
|
set (value) {
|
|
|
|
this.$store.commit(types.SHOW_BURGER_MENU, value)
|
2019-02-16 00:48:45 -05:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2020-04-18 00:57:55 -04:00
|
|
|
show_player_menu () {
|
|
|
|
return this.$store.state.show_player_menu
|
2019-02-14 06:19:29 -05:00
|
|
|
},
|
|
|
|
|
2020-04-18 00:57:55 -04:00
|
|
|
zindex () {
|
|
|
|
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
|
|
|
},
|
|
|
|
|
2020-04-18 00:57:55 -04:00
|
|
|
methods: {
|
|
|
|
on_click_outside_settings () {
|
|
|
|
this.show_settings_menu = !this.show_settings_menu
|
2019-02-16 00:48:45 -05:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2020-04-18 00:57:55 -04:00
|
|
|
watch: {
|
|
|
|
$route (to, from) {
|
|
|
|
this.show_settings_menu = false
|
|
|
|
}
|
2018-08-11 01:47:10 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
</style>
|