mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-25 07:16:27 +00:00
fix: hide signup btn from shared view in cloud paid plan and onprem
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import { PlanTitles } from 'nocodb-sdk'
|
||||||
|
|
||||||
const { isLoading, appInfo } = useGlobal()
|
const { isLoading, appInfo } = useGlobal()
|
||||||
|
|
||||||
const { isDark } = useTheme()
|
const { isDark } = useTheme()
|
||||||
@@ -9,6 +11,8 @@ const { sharedView, allowCSVDownload } = useSharedView()
|
|||||||
|
|
||||||
const { isFullScreen } = storeToRefs(useSidebarStore())
|
const { isFullScreen } = storeToRefs(useSidebarStore())
|
||||||
|
|
||||||
|
const { activePlanTitle } = useEeConfig()
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
const route = router.currentRoute
|
const route = router.currentRoute
|
||||||
@@ -17,6 +21,12 @@ const disableTopbar = computed(() => route.value.query?.disableTopbar === 'true'
|
|||||||
|
|
||||||
const ncNotFound = computed(() => route.value.query?.ncNotFound === 'true')
|
const ncNotFound = computed(() => route.value.query?.ncNotFound === 'true')
|
||||||
|
|
||||||
|
const showSignUpButton = computed(() => {
|
||||||
|
if (!isEeUI || !activePlanTitle.value || activePlanTitle.value === PlanTitles.FREE) return true
|
||||||
|
|
||||||
|
return false
|
||||||
|
})
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// check if we are inside an iframe
|
// check if we are inside an iframe
|
||||||
// if we are, communicate to the parent page whenever we navigate to a new url,
|
// if we are, communicate to the parent page whenever we navigate to a new url,
|
||||||
@@ -109,7 +119,7 @@ export default {
|
|||||||
<LazySmartsheetToolbarExportWithProvider v-if="allowCSVDownload" />
|
<LazySmartsheetToolbarExportWithProvider v-if="allowCSVDownload" />
|
||||||
|
|
||||||
<a
|
<a
|
||||||
v-if="!appInfo.isOnPrem"
|
v-if="showSignUpButton"
|
||||||
href="https://app.nocodb.com/#/signin"
|
href="https://app.nocodb.com/#/signin"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
class="!no-underline xs:hidden"
|
class="!no-underline xs:hidden"
|
||||||
|
|||||||
Reference in New Issue
Block a user