mirror of
https://github.com/nocodb/nocodb.git
synced 2026-02-01 23:48:33 +00:00
Merge pull request #12923 from nocodb/nc-fix/hide-signup-btn
Nc 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>
|
||||
import { PlanTitles } from 'nocodb-sdk'
|
||||
|
||||
const { isLoading, appInfo } = useGlobal()
|
||||
|
||||
const { isDark } = useTheme()
|
||||
@@ -9,6 +11,8 @@ const { sharedView, allowCSVDownload } = useSharedView()
|
||||
|
||||
const { isFullScreen } = storeToRefs(useSidebarStore())
|
||||
|
||||
const { activePlanTitle } = useEeConfig()
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
const route = router.currentRoute
|
||||
@@ -17,6 +21,14 @@ const disableTopbar = computed(() => route.value.query?.disableTopbar === 'true'
|
||||
|
||||
const ncNotFound = computed(() => route.value.query?.ncNotFound === 'true')
|
||||
|
||||
const showSignUpButton = computed(() => {
|
||||
if (appInfo.value.isOnPrem) return false
|
||||
|
||||
if (!isEeUI) return true
|
||||
|
||||
return !activePlanTitle.value || activePlanTitle.value === PlanTitles.FREE
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// check if we are inside an iframe
|
||||
// if we are, communicate to the parent page whenever we navigate to a new url,
|
||||
@@ -109,7 +121,7 @@ export default {
|
||||
<LazySmartsheetToolbarExportWithProvider v-if="allowCSVDownload" />
|
||||
|
||||
<a
|
||||
v-if="!appInfo.isOnPrem"
|
||||
v-if="showSignUpButton"
|
||||
href="https://app.nocodb.com/#/signin"
|
||||
target="_blank"
|
||||
class="!no-underline xs:hidden"
|
||||
|
||||
Reference in New Issue
Block a user