mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-28 20:07:50 +00:00
- Rename `Project` => `Base` - Rename `Base` => `Source` - Remove `db` from data/meta api endpoints - Add backward compatibility for old apis - Migrations for renaming table and columns Signed-off-by: Pranav C <pranavxc@gmail.com>
44 lines
1.0 KiB
Vue
44 lines
1.0 KiB
Vue
<script setup lang="ts">
|
|
import type { NcButtonSize } from '~/lib'
|
|
|
|
const props = defineProps<{
|
|
activeWorkspaceId?: string | undefined
|
|
modal?: boolean
|
|
type?: string
|
|
isOpen: boolean
|
|
size?: NcButtonSize
|
|
centered?: boolean
|
|
}>()
|
|
|
|
const { isUIAllowed } = useRoles()
|
|
|
|
const { orgRoles, workspaceRoles } = useRoles()
|
|
|
|
const baseStore = useBase()
|
|
const { isSharedBase } = storeToRefs(baseStore)
|
|
|
|
const workspaceStore = useWorkspace()
|
|
const { activeWorkspaceId: _activeWorkspaceId } = storeToRefs(workspaceStore)
|
|
|
|
const baseCreateDlg = ref(false)
|
|
|
|
const size = computed(() => props.size || 'small')
|
|
const centered = computed(() => props.centered ?? true)
|
|
</script>
|
|
|
|
<template>
|
|
<NcButton
|
|
v-if="isUIAllowed('baseCreate', { roles: workspaceRoles ?? orgRoles }) && !isSharedBase"
|
|
v-e="['c:base:create']"
|
|
type="text"
|
|
:size="size"
|
|
:centered="centered"
|
|
@click="baseCreateDlg = true"
|
|
>
|
|
<slot />
|
|
<WorkspaceCreateProjectDlg v-model="baseCreateDlg" />
|
|
</NcButton>
|
|
</template>
|
|
|
|
<style scoped></style>
|