|
16 | 16 | >
|
17 | 17 | Templates
|
18 | 18 | </NuxtLink>
|
19 |
| - <NuxtLink v-if="$route.name !== 'ai-form-builder'" :to="{name:'ai-form-builder'}" |
| 19 | + <template v-if="featureBaseEnabled"> |
| 20 | + <button v-if="user" @click.prevent="openChangelog" |
| 21 | + class="text-sm text-gray-600 dark:text-white hidden sm:inline hover:text-gray-800 cursor-pointer mt-1 mr-8" |
| 22 | + > |
| 23 | + What's new? <span id="fb-update-badge"></span> |
| 24 | + </button> |
| 25 | + <a :href="opnformConfig.links.changelog_url" target="_blank" v-else |
| 26 | + class="text-sm text-gray-600 dark:text-white hidden lg:inline hover:text-gray-800 cursor-pointer mt-1 mr-8" |
| 27 | + > |
| 28 | + What's new? |
| 29 | + </a> |
| 30 | + </template> |
| 31 | + <NuxtLink v-if="$route.name !== 'ai-form-builder' && user === null" :to="{name:'ai-form-builder'}" |
20 | 32 | class="text-sm text-gray-600 dark:text-white hidden lg:inline hover:text-gray-800 cursor-pointer mt-1 mr-8"
|
21 | 33 | >
|
22 | 34 | AI Form Builder
|
|
103 | 115 | <NuxtLink :to="{ name: 'settings-admin' }" v-if="user.moderator"
|
104 | 116 | 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"
|
105 | 117 | >
|
106 |
| - <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"> |
107 |
| - <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" /> |
| 118 | + <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" |
| 119 | + stroke="currentColor" class="w-4 h-4 mr-2"> |
| 120 | + <path stroke-linecap="round" stroke-linejoin="round" |
| 121 | + 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"/> |
108 | 122 | </svg>
|
109 | 123 | Admin
|
110 | 124 | </NuxtLink>
|
@@ -190,6 +204,9 @@ export default {
|
190 | 204 | paidPlansEnabled() {
|
191 | 205 | return this.config.public.paidPlansEnabled
|
192 | 206 | },
|
| 207 | + featureBaseEnabled() { |
| 208 | + return this.config.public.featureBaseOrganization !== null |
| 209 | + }, |
193 | 210 | showAuth() {
|
194 | 211 | return this.$route.name && this.$route.name !== 'forms-slug'
|
195 | 212 | },
|
@@ -217,6 +234,10 @@ export default {
|
217 | 234 | },
|
218 | 235 |
|
219 | 236 | methods: {
|
| 237 | + openChangelog() { |
| 238 | + if (process.server) return |
| 239 | + window.Featurebase('manually_open_changelog_popup') |
| 240 | + }, |
220 | 241 | async logout() {
|
221 | 242 | // Log out the user.
|
222 | 243 | this.authStore.logout()
|
|
0 commit comments