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