fix(front): hide buttons if user is not logged in
This commit is contained in:
parent
236d9edc75
commit
07e1679e1b
|
@ -21,6 +21,7 @@ import RadioCard from '~/components/radios/Card.vue'
|
|||
import Button from '~/components/ui/Button.vue'
|
||||
import Alert from '~/components/ui/Alert.vue'
|
||||
import Input from '~/components/ui/Input.vue'
|
||||
import Link from '~/components/ui/Link.vue'
|
||||
import Spacer from '~/components/ui/Spacer.vue'
|
||||
|
||||
import useSharedLabels from '~/composables/locale/useSharedLabels'
|
||||
|
@ -143,15 +144,19 @@ const paginateOptions = computed(() => sortedUniq([12, 25, 50, paginateBy.value]
|
|||
:type="'less-listened_library'"
|
||||
/>
|
||||
</Section>
|
||||
<Section
|
||||
alignLeft
|
||||
no-items
|
||||
solid
|
||||
primary
|
||||
icon="bi-plus"
|
||||
:h2="t('components.library.Radios.header.user')"
|
||||
:action="{ text:t('components.library.Radios.button.create'), to:'/library/radios/build' }"
|
||||
/>
|
||||
<h2>
|
||||
{{ t('components.library.Radios.header.user') }}
|
||||
<Link
|
||||
v-if="store.state.auth.authenticated"
|
||||
class="floated right"
|
||||
solid
|
||||
primary
|
||||
icon="bi-plus"
|
||||
:to="{name: 'library.radios.build'}"
|
||||
>
|
||||
{{ t('components.library.Radios.button.create') }}
|
||||
</Link>
|
||||
</h2>
|
||||
<Layout flex form
|
||||
:class="['ui', {'loading': isLoading}, 'form']"
|
||||
@submit.prevent="search"
|
||||
|
|
|
@ -114,6 +114,7 @@ const paginateOptions = computed(() => sortedUniq([12, 30, 50, paginateBy.value]
|
|||
<template>
|
||||
<Layout stack main>
|
||||
<Header
|
||||
v-if="store.state.auth.authenticated"
|
||||
:h1="t('views.playlists.List.header.browse')"
|
||||
:action="{
|
||||
onClick: () => { store.commit('playlists/showModal', true) },
|
||||
|
@ -123,6 +124,10 @@ const paginateOptions = computed(() => sortedUniq([12, 30, 50, paginateBy.value]
|
|||
primary
|
||||
:aria-pressed="store.state.playlists.showModal"
|
||||
/>
|
||||
<Header
|
||||
v-else
|
||||
:h1="t('views.playlists.List.header.browse')"
|
||||
/>
|
||||
<Layout form flex
|
||||
:class="['ui', {'loading': isLoading}, 'form']"
|
||||
@submit.prevent="search"
|
||||
|
|
Loading…
Reference in New Issue