Added featurebase (#344)
This commit is contained in:
@@ -16,7 +16,19 @@
|
||||
>
|
||||
Templates
|
||||
</NuxtLink>
|
||||
<NuxtLink v-if="$route.name !== 'ai-form-builder'" :to="{name:'ai-form-builder'}"
|
||||
<template v-if="featureBaseEnabled">
|
||||
<button v-if="user" @click.prevent="openChangelog"
|
||||
class="text-sm text-gray-600 dark:text-white hidden sm:inline hover:text-gray-800 cursor-pointer mt-1 mr-8"
|
||||
>
|
||||
What's new? <span id="fb-update-badge"></span>
|
||||
</button>
|
||||
<a :href="opnformConfig.links.changelog_url" target="_blank" v-else
|
||||
class="text-sm text-gray-600 dark:text-white hidden lg:inline hover:text-gray-800 cursor-pointer mt-1 mr-8"
|
||||
>
|
||||
What's new?
|
||||
</a>
|
||||
</template>
|
||||
<NuxtLink v-if="$route.name !== 'ai-form-builder' && user === null" :to="{name:'ai-form-builder'}"
|
||||
class="text-sm text-gray-600 dark:text-white hidden lg:inline hover:text-gray-800 cursor-pointer mt-1 mr-8"
|
||||
>
|
||||
AI Form Builder
|
||||
@@ -103,8 +115,10 @@
|
||||
<NuxtLink :to="{ name: 'settings-admin' }" v-if="user.moderator"
|
||||
class="block block px-4 py-2 text-md text-gray-700 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-100 dark:hover:text-white dark:hover:bg-gray-600 flex items-center"
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4 mr-2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z" />
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
|
||||
stroke="currentColor" class="w-4 h-4 mr-2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
d="M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z"/>
|
||||
</svg>
|
||||
Admin
|
||||
</NuxtLink>
|
||||
@@ -190,6 +204,9 @@ export default {
|
||||
paidPlansEnabled() {
|
||||
return this.config.public.paidPlansEnabled
|
||||
},
|
||||
featureBaseEnabled() {
|
||||
return this.config.public.featureBaseOrganization !== null
|
||||
},
|
||||
showAuth() {
|
||||
return this.$route.name && this.$route.name !== 'forms-slug'
|
||||
},
|
||||
@@ -217,6 +234,10 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
openChangelog() {
|
||||
if (process.server) return
|
||||
window.Featurebase('manually_open_changelog_popup')
|
||||
},
|
||||
async logout() {
|
||||
// Log out the user.
|
||||
this.authStore.logout()
|
||||
|
||||
Reference in New Issue
Block a user