Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

feat: add new base create btn in modal

Ramesh Manebcca2c0a81cd
diff --git a/packages/nc-gui/components/workspace/BaseListModal/BasesHeader.vue b/packages/nc-gui/components/workspace/BaseListModal/BasesHeader.vue
index 8f2abdcec0..640f8d6797 100644
--- a/packages/nc-gui/components/workspace/BaseListModal/BasesHeader.vue
+++ b/packages/nc-gui/components/workspace/BaseListModal/BasesHeader.vue
@@ -6,6 +6,7 @@ const props = defineProps<{
activeFilter: FilterType
isCompactView?: boolean
searchQuery?: string
+ selectedWorkspaceId?: string
}>()
const emit = defineEmits<{
@@ -15,6 +16,8 @@ const emit = defineEmits<{
const vSearchQuery = useVModel(props, 'searchQuery', emit)
+const { selectedWorkspaceId } = toRefs(props)
+
const { t } = useI18n()
const { isMobileMode } = useGlobal()
@@ -84,6 +87,12 @@ const onFilterChange = (value: string) => {
</NcList>
</template>
</NcListDropdown>
+ <WorkspaceCreateProjectBtn :workspace-id="selectedWorkspaceId ?? undefined" type="primary">
+ <div class="flex items-center gap-1.5">
+ <GeneralIcon icon="plus" />
+ {{ $t('title.newProj') }}
+ </div>
+ </WorkspaceCreateProjectBtn>
</template>
<!-- Compact: Search + Filter -->