2018-08-11 07:47:10 +02:00
|
|
|
<template>
|
2022-05-29 18:49:00 +02:00
|
|
|
<nav
|
2024-09-09 21:00:35 +02:00
|
|
|
class="navbar is-fixed-bottom"
|
|
|
|
:class="{ 'is-dark': !is_now_playing_page }"
|
2022-05-29 18:49:00 +02:00
|
|
|
>
|
2023-10-21 22:41:45 +02:00
|
|
|
<div class="navbar-brand is-flex-grow-1">
|
2024-09-09 21:00:35 +02:00
|
|
|
<control-link class="navbar-item" :to="{ name: 'queue' }">
|
|
|
|
<mdicon class="icon" name="playlist-play" />
|
|
|
|
</control-link>
|
|
|
|
<template v-if="is_now_playing_page">
|
|
|
|
<control-player-previous class="navbar-item ml-auto" />
|
|
|
|
<control-player-back class="navbar-item" :offset="10000" />
|
|
|
|
<control-player-play class="navbar-item" show_disabled_message />
|
|
|
|
<control-player-forward class="navbar-item" :offset="30000" />
|
|
|
|
<control-player-next class="navbar-item mr-auto" />
|
|
|
|
</template>
|
|
|
|
<template v-else>
|
|
|
|
<control-link
|
|
|
|
:to="{ name: 'now-playing' }"
|
|
|
|
exact
|
|
|
|
class="navbar-item is-expanded is-clipped is-size-7"
|
|
|
|
>
|
|
|
|
<div class="fd-is-text-clipped">
|
|
|
|
<strong v-text="current.title" />
|
|
|
|
<br />
|
|
|
|
<span v-text="current.artist" />
|
|
|
|
<span
|
|
|
|
v-if="current.album"
|
|
|
|
v-text="$t('navigation.now-playing', { album: current.album })"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</control-link>
|
|
|
|
<control-player-play class="navbar-item" show_disabled_message />
|
|
|
|
</template>
|
2023-07-09 00:25:06 +02:00
|
|
|
<a
|
2024-09-09 21:00:35 +02:00
|
|
|
class="navbar-item"
|
|
|
|
@click="uiStore.show_player_menu = !uiStore.show_player_menu"
|
2023-07-09 00:25:06 +02:00
|
|
|
>
|
|
|
|
<mdicon
|
|
|
|
class="icon"
|
2024-09-09 21:00:35 +02:00
|
|
|
:name="uiStore.show_player_menu ? 'chevron-down' : 'chevron-up'"
|
2023-07-09 00:25:06 +02:00
|
|
|
/>
|
|
|
|
</a>
|
2024-09-09 21:00:35 +02:00
|
|
|
<div
|
|
|
|
class="dropdown is-up is-right"
|
|
|
|
:class="{ 'is-active': uiStore.show_player_menu }"
|
|
|
|
>
|
2024-09-10 21:46:50 +02:00
|
|
|
<div class="dropdown-menu">
|
2024-09-09 21:00:35 +02:00
|
|
|
<div class="dropdown-content">
|
|
|
|
<div class="dropdown-item">
|
|
|
|
<control-main-volume />
|
2024-03-02 09:51:35 +01:00
|
|
|
</div>
|
2024-09-09 21:00:35 +02:00
|
|
|
<hr class="dropdown-divider" />
|
|
|
|
<div class="dropdown-item">
|
|
|
|
<control-output-volume
|
|
|
|
v-for="output in outputsStore.outputs"
|
|
|
|
:key="output.id"
|
|
|
|
:output="output"
|
|
|
|
/>
|
2020-04-18 06:57:55 +02:00
|
|
|
</div>
|
2024-09-09 21:00:35 +02:00
|
|
|
<hr class="dropdown-divider" />
|
|
|
|
<div class="dropdown-item">
|
|
|
|
<control-stream-volume />
|
2024-03-02 09:51:35 +01:00
|
|
|
</div>
|
2024-09-09 21:00:35 +02:00
|
|
|
<hr class="dropdown-divider" />
|
|
|
|
<div class="dropdown-item is-flex is-justify-content-center">
|
|
|
|
<div class="buttons has-addons">
|
|
|
|
<control-player-repeat class="button" />
|
|
|
|
<control-player-shuffle class="button" />
|
|
|
|
<control-player-consume class="button" />
|
|
|
|
<control-player-lyrics class="button" />
|
2020-04-18 06:57:55 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-04-17 06:23:28 +02:00
|
|
|
</div>
|
2020-04-18 06:57:55 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-08-11 07:47:10 +02:00
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2024-09-09 21:00:35 +02:00
|
|
|
import ControlLink from '@/components/ControlLink.vue'
|
|
|
|
import ControlMainVolume from '@/components/ControlMainVolume.vue'
|
|
|
|
import ControlOutputVolume from '@/components/ControlOutputVolume.vue'
|
|
|
|
import ControlPlayerBack from '@/components/ControlPlayerBack.vue'
|
|
|
|
import ControlPlayerConsume from '@/components/ControlPlayerConsume.vue'
|
|
|
|
import ControlPlayerForward from '@/components/ControlPlayerForward.vue'
|
|
|
|
import ControlPlayerLyrics from '@/components/ControlPlayerLyrics.vue'
|
|
|
|
import ControlPlayerNext from '@/components/ControlPlayerNext.vue'
|
|
|
|
import ControlPlayerPlay from '@/components/ControlPlayerPlay.vue'
|
|
|
|
import ControlPlayerPrevious from '@/components/ControlPlayerPrevious.vue'
|
|
|
|
import ControlPlayerRepeat from '@/components/ControlPlayerRepeat.vue'
|
|
|
|
import ControlPlayerShuffle from '@/components/ControlPlayerShuffle.vue'
|
|
|
|
import ControlStreamVolume from '@/components/ControlStreamVolume.vue'
|
2024-08-22 21:31:59 +02:00
|
|
|
import { useNotificationsStore } from '@/stores/notifications'
|
|
|
|
import { useOutputsStore } from '@/stores/outputs'
|
|
|
|
import { useQueueStore } from '@/stores/queue'
|
|
|
|
import { useUIStore } from '@/stores/ui'
|
2018-08-11 07:47:10 +02:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'NavbarBottom',
|
2020-04-17 06:23:28 +02:00
|
|
|
components: {
|
2024-09-09 21:00:35 +02:00
|
|
|
ControlLink,
|
|
|
|
ControlOutputVolume,
|
|
|
|
ControlMainVolume,
|
|
|
|
ControlPlayerBack,
|
|
|
|
ControlPlayerConsume,
|
|
|
|
ControlPlayerForward,
|
|
|
|
ControlPlayerLyrics,
|
|
|
|
ControlPlayerNext,
|
|
|
|
ControlPlayerPlay,
|
|
|
|
ControlPlayerPrevious,
|
|
|
|
ControlPlayerRepeat,
|
|
|
|
ControlPlayerShuffle,
|
|
|
|
ControlStreamVolume
|
2020-04-17 06:23:28 +02:00
|
|
|
},
|
2018-08-11 07:47:10 +02:00
|
|
|
|
2024-08-22 21:31:59 +02:00
|
|
|
setup() {
|
|
|
|
return {
|
|
|
|
notificationsStore: useNotificationsStore(),
|
|
|
|
outputsStore: useOutputsStore(),
|
|
|
|
queueStore: useQueueStore(),
|
|
|
|
uiStore: useUIStore()
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2018-08-11 07:47:10 +02:00
|
|
|
computed: {
|
2022-02-19 06:39:14 +01:00
|
|
|
is_now_playing_page() {
|
2023-07-10 12:19:34 +02:00
|
|
|
return this.$route.name === 'now-playing'
|
2020-04-18 06:57:55 +02:00
|
|
|
},
|
2024-08-22 21:31:59 +02:00
|
|
|
current() {
|
|
|
|
return this.queueStore.current
|
2020-04-18 06:57:55 +02:00
|
|
|
}
|
2018-08-11 07:47:10 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|