mirror of
https://github.com/koel/koel
synced 2024-11-10 06:34:14 +00:00
fix: only show Upgrade badge to admins
This commit is contained in:
parent
9f30ca65c1
commit
52711620bb
1 changed files with 8 additions and 5 deletions
|
@ -16,9 +16,11 @@
|
||||||
License key <span class="key text-green">{{ license.shortKey }}</span>
|
License key <span class="key text-green">{{ license.shortKey }}</span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p v-else class="upgrade">
|
<template v-else>
|
||||||
<BtnUpgradeToPlus/>
|
<p class="upgrade" v-if="isAdmin">
|
||||||
</p>
|
<BtnUpgradeToPlus/>
|
||||||
|
</p>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p v-if="shouldNotifyNewVersion" data-testid="new-version-about">
|
<p v-if="shouldNotifyNewVersion" data-testid="new-version-about">
|
||||||
|
@ -65,7 +67,7 @@
|
||||||
import { orderBy } from 'lodash'
|
import { orderBy } from 'lodash'
|
||||||
import { onMounted, ref } from 'vue'
|
import { onMounted, ref } from 'vue'
|
||||||
import { isDemo } from '@/utils'
|
import { isDemo } from '@/utils'
|
||||||
import { useKoelPlus, useNewVersionNotification } from '@/composables'
|
import { useAuthorization, useKoelPlus, useNewVersionNotification } from '@/composables'
|
||||||
import { http } from '@/services'
|
import { http } from '@/services'
|
||||||
|
|
||||||
import SponsorList from '@/components/meta/SponsorList.vue'
|
import SponsorList from '@/components/meta/SponsorList.vue'
|
||||||
|
@ -86,7 +88,8 @@ const {
|
||||||
latestVersionReleaseUrl
|
latestVersionReleaseUrl
|
||||||
} = useNewVersionNotification()
|
} = useNewVersionNotification()
|
||||||
|
|
||||||
const { isPlus, license, storeUrl } = useKoelPlus()
|
const { isPlus, license } = useKoelPlus()
|
||||||
|
const { isAdmin } = useAuthorization()
|
||||||
|
|
||||||
const emit = defineEmits<{ (e: 'close'): void }>()
|
const emit = defineEmits<{ (e: 'close'): void }>()
|
||||||
const close = () => emit('close')
|
const close = () => emit('close')
|
||||||
|
|
Loading…
Reference in a new issue