mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-04 22:46:48 +00:00
refactor: rename project and base
- 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>
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import tinycolor from 'tinycolor2'
|
||||
import type { ProjectType } from 'nocodb-sdk'
|
||||
import type { BaseType } from 'nocodb-sdk'
|
||||
import { useVModel } from '#imports'
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue: boolean
|
||||
project: ProjectType
|
||||
base: BaseType
|
||||
onOk: (jobData: { name: string; id: string }) => Promise<void>
|
||||
}>()
|
||||
|
||||
@@ -35,17 +35,17 @@ const isLoading = ref(false)
|
||||
const _duplicate = async () => {
|
||||
try {
|
||||
isLoading.value = true
|
||||
// pick a random color from array and assign to project
|
||||
const color = projectThemeColors[Math.floor(Math.random() * 1000) % projectThemeColors.length]
|
||||
// pick a random color from array and assign to base
|
||||
const color = baseThemeColors[Math.floor(Math.random() * 1000) % baseThemeColors.length]
|
||||
const tcolor = tinycolor(color)
|
||||
|
||||
const complement = tcolor.complement()
|
||||
|
||||
const jobData = await api.project.duplicate(props.project.id as string, {
|
||||
const jobData = await api.base.duplicate(props.base.id as string, {
|
||||
options: optionsToExclude.value,
|
||||
project: {
|
||||
fk_workspace_id: props.project.fk_workspace_id,
|
||||
type: props.project.type,
|
||||
base: {
|
||||
fk_workspace_id: props.base.fk_workspace_id,
|
||||
type: props.base.type,
|
||||
color,
|
||||
meta: JSON.stringify({
|
||||
theme: {
|
||||
@@ -75,7 +75,7 @@ const isEaster = ref(false)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<GeneralModal v-if="project" v-model:visible="dialogShow" class="!w-[30rem]" wrap-class-name="nc-modal-project-duplicate">
|
||||
<GeneralModal v-if="base" v-model:visible="dialogShow" class="!w-[30rem]" wrap-class-name="nc-modal-base-duplicate">
|
||||
<div>
|
||||
<div class="prose-xl font-bold self-center" @dblclick="isEaster = !isEaster">
|
||||
{{ $t('general.duplicate') }} {{ $t('objects.project') }}
|
||||
|
||||
Reference in New Issue
Block a user