Browse Source

feat: increase number of sources per base

pull/8441/head
mertmit 2 months ago
parent
commit
673bc35108
  1. 36
      packages/nc-gui/components/dashboard/settings/DataSources.vue
  2. 11
      packages/nc-gui/components/dashboard/settings/Modal.vue
  3. 4
      packages/nc-gui/components/project/AllTables.vue
  4. 2
      packages/nc-gui/lang/ar.json
  5. 2
      packages/nc-gui/lang/bn_IN.json
  6. 2
      packages/nc-gui/lang/cs.json
  7. 2
      packages/nc-gui/lang/da.json
  8. 2
      packages/nc-gui/lang/de.json
  9. 2
      packages/nc-gui/lang/en.json
  10. 2
      packages/nc-gui/lang/eu.json
  11. 2
      packages/nc-gui/lang/fa.json
  12. 2
      packages/nc-gui/lang/fi.json
  13. 2
      packages/nc-gui/lang/he.json
  14. 2
      packages/nc-gui/lang/hi.json
  15. 2
      packages/nc-gui/lang/hr.json
  16. 2
      packages/nc-gui/lang/id.json
  17. 2
      packages/nc-gui/lang/ja.json
  18. 2
      packages/nc-gui/lang/lv.json
  19. 2
      packages/nc-gui/lang/nl.json
  20. 2
      packages/nc-gui/lang/no.json
  21. 2
      packages/nc-gui/lang/pt.json
  22. 2
      packages/nc-gui/lang/pt_BR.json
  23. 2
      packages/nc-gui/lang/ru.json
  24. 2
      packages/nc-gui/lang/sk.json
  25. 2
      packages/nc-gui/lang/sl.json
  26. 2
      packages/nc-gui/lang/sv.json
  27. 2
      packages/nc-gui/lang/th.json
  28. 2
      packages/nc-gui/lang/tr.json
  29. 2
      packages/nc-gui/lang/uk.json
  30. 2
      packages/nc-gui/lang/vi.json
  31. 2
      packages/nc-gui/lang/zh-Hant.json

36
packages/nc-gui/components/dashboard/settings/DataSources.vue

@ -10,7 +10,7 @@ interface Props {
const props = defineProps<Props>()
const emits = defineEmits(['update:state', 'update:reload', 'awaken'])
const emits = defineEmits(['update:state', 'update:reload'])
const vState = useVModel(props, 'state', emits)
@ -20,7 +20,9 @@ const { $api, $e } = useNuxtApp()
const { t } = useI18n()
const { loadProject } = useBases()
const basesStore = useBases()
const { loadProject } = basesStore
const { isDataSourceLimitReached } = storeToRefs(basesStore)
const baseStore = useBase()
const { base } = storeToRefs(baseStore)
@ -37,10 +39,6 @@ const clientType = ref<ClientType>(ClientType.MYSQL)
const isReloading = ref(false)
const forceAwakened = ref(false)
const dataSourcesAwakened = ref(false)
const isDeleteBaseModalOpen = ref(false)
const toBeDeletedBase = ref<SourceType | undefined>()
@ -142,12 +140,6 @@ const moveBase = async (e: any) => {
}
}
const forceAwaken = () => {
forceAwakened.value = !forceAwakened.value
dataSourcesAwakened.value = forceAwakened.value
emits('awaken', forceAwakened.value)
}
watch(
projectPageTab,
() => {
@ -169,20 +161,6 @@ watch(
},
)
watch(
() => sources.value.length,
(l) => {
if (l > 1 && !forceAwakened.value) {
dataSourcesAwakened.value = false
emits('awaken', false)
} else {
dataSourcesAwakened.value = true
emits('awaken', true)
}
},
{ immediate: true },
)
watch(
vState,
async (newState) => {
@ -211,7 +189,7 @@ watch(
vState.value = DataSourcesSubTab.New
break
case DataSourcesSubTab.New:
if (sources.value.length > 1 && !forceAwakened.value) {
if (isDataSourceLimitReached.value) {
vState.value = ''
}
break
@ -292,7 +270,7 @@ const isEditBaseModalOpen = computed({
<div class="flex flex-col w-full overflow-auto">
<div class="flex flex-row w-full justify-end mt-6.5 mb-2">
<NcButton
v-if="dataSourcesAwakened"
v-if="!isDataSourceLimitReached"
size="large"
class="z-10 !px-2"
type="primary"
@ -312,7 +290,7 @@ const isEditBaseModalOpen = computed({
>
<div class="ds-table-head">
<div class="ds-table-row">
<div class="ds-table-col ds-table-enabled cursor-pointer" @dblclick="forceAwaken">{{ $t('general.visibility') }}</div>
<div class="ds-table-col ds-table-enabled cursor-pointer">{{ $t('general.visibility') }}</div>
<div class="ds-table-col ds-table-name">{{ $t('general.name') }}</div>
<div class="ds-table-col ds-table-type">{{ $t('general.type') }}</div>
<div class="ds-table-col ds-table-actions -ml-13">{{ $t('labels.actions') }}</div>

11
packages/nc-gui/components/dashboard/settings/Modal.vue

@ -45,9 +45,9 @@ const { $e } = useNuxtApp()
const { t } = useI18n()
const dataSourcesReload = ref(false)
const { isDataSourceLimitReached } = storeToRefs(useBases())
const dataSourcesAwakened = ref(false)
const dataSourcesReload = ref(false)
const tabsInfo: TabGroup = {
// teamAndAuth: {
@ -139,10 +139,6 @@ const selectedTab = computed(() => tabsInfo[selectedTabKeys.value[0]])
const selectedSubTabKeys = ref<string[]>([firstKeyOfObject(selectedTab.value.subTabs)])
const selectedSubTab = computed(() => selectedTab.value.subTabs[selectedSubTabKeys.value[0]])
const handleAwaken = (val: boolean) => {
dataSourcesAwakened.value = val
}
watch(
() => selectedTabKeys.value[0],
(newTabKey) => {
@ -221,7 +217,7 @@ watch(
</a-breadcrumb>
<div v-if="vDataState === ''" class="flex flex-row justify-end items-center w-full gap-1">
<a-button
v-if="dataSourcesAwakened"
v-if="!isDataSourceLimitReached"
type="primary"
class="self-start !rounded-md nc-btn-new-datasource"
@click="vDataState = DataSourcesSubTab.New"
@ -257,7 +253,6 @@ watch(
class="px-2 pb-2"
:data-testid="`nc-settings-subtab-${selectedSubTab.key}`"
:base-id="baseId"
@awaken="handleAwaken"
/>
<component
:is="selectedSubTab?.body"

4
packages/nc-gui/components/project/AllTables.vue

@ -5,14 +5,12 @@ import NcTooltip from '~/components/nc/Tooltip.vue'
const { activeTables } = storeToRefs(useTablesStore())
const { openTable } = useTablesStore()
const { openedProject } = storeToRefs(useBases())
const { openedProject, isDataSourceLimitReached } = storeToRefs(useBases())
const { base } = useBase()
const isNewBaseModalOpen = ref(false)
const isDataSourceLimitReached = computed(() => Number(openedProject.value?.sources?.length) > 1)
const { isUIAllowed } = useRoles()
const { $e } = useNuxtApp()

2
packages/nc-gui/lang/ar.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "حفظ التغييرات",
"xcDB": "إنشاء مشروع جديد",
"extDB": "يدعم MySQL ، PostgreSQL ، SQL Server و SQLite",

2
packages/nc-gui/lang/bn_IN.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "परिवरतनरकित कर",
"xcDB": "একটি নতন পরকলপ তি করন",
"extDB": "মইএসকিউএল, পটগসকিউএল, এসকিউএল সর এব এসকিউএলইট সমরথন কর",

2
packages/nc-gui/lang/cs.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "Uložit změny",
"xcDB": "Vytvoření nového projektu",
"extDB": "Podpora MySQL, PostgreSQL, SQL Server a SQLite",

2
packages/nc-gui/lang/da.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "Gem ændringer",
"xcDB": "Opret et nyt projekt",
"extDB": "Understøtter MySQL, PostgreSQL, SQL Server & SQLITE",

2
packages/nc-gui/lang/de.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "Änderungen speichern",
"xcDB": "Neues Projekt erstellen",
"extDB": "Unterstützt MySQL, PostgreSQL, SQL Server & SQLite",

2
packages/nc-gui/lang/en.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "Save changes",
"xcDB": "Create a new base",
"extDB": "Supports MySQL, PostgreSQL, SQL Server & SQLite",

2
packages/nc-gui/lang/eu.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "Save changes",
"xcDB": "Create a new project",
"extDB": "Supports MySQL, PostgreSQL, SQL Server & SQLite",

2
packages/nc-gui/lang/fa.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "ذخیره تغییرات",
"xcDB": "ایجاد یک پروژه جدید",
"extDB": "پشتیبانی از MySQL ،PostgreSQL ،SQL Server و SQLite",

2
packages/nc-gui/lang/fi.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "Tallenna muutokset",
"xcDB": "Luo uusi projekti",
"extDB": "Tukee MySQL, PostgreSQL, SQL Server & Sqlite",

2
packages/nc-gui/lang/he.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "שמור שינויים",
"xcDB": "צור פרויקט חדש",
"extDB": "תומך MySQL, PostgreSQL, SQL Server & SQLite",

2
packages/nc-gui/lang/hi.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "परिवरतनरकित कर",
"xcDB": "एक नयट बन",
"extDB": "MySQL, PostgreSQL, SQL सरवर और SQLite क समरथन करत",

2
packages/nc-gui/lang/hr.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "Spremi promjene",
"xcDB": "Stvoriti novi projekt",
"extDB": "Podržava MySQL, PostgreSQL, SQL Server & Sqlite",

2
packages/nc-gui/lang/id.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "Simpan perubahan",
"xcDB": "Buat proyek baru",
"extDB": "Mendukung MySQL, PostgreSQL, SQL Server & SQLite",

2
packages/nc-gui/lang/ja.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "変更を保存",
"xcDB": "プロジェクトを作成",
"extDB": "MySQL、PostgreSQL、SQL Server&SQLiteをサポートしています",

2
packages/nc-gui/lang/lv.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "Saglabāt izmaiņas",
"xcDB": "Izveidot jaunu projektu",
"extDB": "Atbalsta MySQL, PostgreSQL, SQL Server & SQLite",

2
packages/nc-gui/lang/nl.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "Wijzigingen opslaan",
"xcDB": "Maak een nieuw project",
"extDB": "Ondersteunt MySQL, PostgreSQL, SQL Server & Sqlite",

2
packages/nc-gui/lang/no.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "Lagre endringer",
"xcDB": "Opprett et nytt prosjekt",
"extDB": "Støtter MySQL, PostgreSQL, SQL Server & Sqlite",

2
packages/nc-gui/lang/pt.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "Salvar alterações",
"xcDB": "Criar um novo projecto",
"extDB": "Suporta MySQL, PostgreSQL, SQL Server & SQLite",

2
packages/nc-gui/lang/pt_BR.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "Salvar alterações",
"xcDB": "Criar um novo projeto",
"extDB": "Suporta MySQL, PostgreSQL, SQL Server e SQLite",

2
packages/nc-gui/lang/ru.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "Сохранить изменения",
"xcDB": "Создать новый проект",
"extDB": "Поддерживает MySQL, PostgreSQL, SQL Server & Sqlite",

2
packages/nc-gui/lang/sk.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "Uloženie zmien",
"xcDB": "Vytvorenie nového projektu",
"extDB": "Podporuje MySQL, PostgreSQL, SQL Server a SQLite",

2
packages/nc-gui/lang/sl.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "Shrani spremembe",
"xcDB": "Ustvari nov projekt",
"extDB": "Podpira MySQL, PostgreSQL, SQL Server & SqLite",

2
packages/nc-gui/lang/sv.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "Spara ändringar",
"xcDB": "Skapa ett nytt projekt",
"extDB": "Stödjer MySQL, PostgreSQL, SQL Server & SQLite",

2
packages/nc-gui/lang/th.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "บนทกการเปลยนแปลง",
"xcDB": "สรางโครงการใหม",
"extDB": "รองรบ MySQL, POSTGRESQL, SQL Server & SQLite",

2
packages/nc-gui/lang/tr.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "Değişiklikleri Kaydet",
"xcDB": "Yeni bir proje oluştur",
"extDB": "MySQL, PostgreSQL, SQL Server & SQLite destekler",

2
packages/nc-gui/lang/uk.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "Зберегти зміни",
"xcDB": "Створити новий проєкт",
"extDB": "Підтримує MySQL, PostgreSQL, SQL Server та SQLite",

2
packages/nc-gui/lang/vi.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "Lưu thay đổi",
"xcDB": "Tạo một dự án mới",
"extDB": "Hỗ trợ MySQL, PostgreSQL, SQL Server & SQLite",

2
packages/nc-gui/lang/zh-Hant.json

@ -1009,7 +1009,7 @@
"group": "Group"
},
"tooltip": {
"reachedSourceLimit": "Limited to only one data source for the moment",
"reachedSourceLimit": "Limited to 10 data sources per base for the moment",
"saveChanges": "儲存更動",
"xcDB": "建立新專案",
"extDB": "支援 MySQL、PostgreSQL、SQL Server 和 SQLite",

Loading…
Cancel
Save