From 56b72f29e183bfc8640e301c883c5cb5e5880b2b Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Thu, 18 Aug 2022 18:49:05 +0530 Subject: [PATCH 01/12] fix/Fixed pagination info of nestedChildrenExcludedList api where totalRows was set wrong due to bugged sql query --- .../sql-data-mapper/lib/sql/BaseModelSqlv2.ts | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts b/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts index a87241315d..a2a955e369 100644 --- a/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts +++ b/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts @@ -251,7 +251,7 @@ class BaseModelSqlv2 { if (!ignoreFilterSort) applyPaginate(qb, rest); const proto = await this.getProto(); - let data = await this.extractRawQueryAndExec(qb); + const data = await this.extractRawQueryAndExec(qb); return data?.map((d) => { d.__proto__ = proto; @@ -362,7 +362,7 @@ class BaseModelSqlv2 { qb.groupBy(args.column_name); if (sorts) await sortV2(sorts, qb, this.dbDriver); applyPaginate(qb, rest); - let data = await qb; + const data = await qb; return data; } @@ -571,7 +571,10 @@ class BaseModelSqlv2 { } } - public async multipleMmList({ colId, parentIds }, args: { limit?; offset? } = {}) { + public async multipleMmList( + { colId, parentIds }, + args: { limit?; offset? } = {} + ) { const { where, ...rest } = this._getListArgs(args as any); const relColumn = (await this.model.getColumns()).find( (c) => c.id === colId @@ -879,7 +882,7 @@ class BaseModelSqlv2 { applyPaginate(qb, rest); const proto = await childModel.getProto(); - let data = await qb; + const data = await qb; return data.map((c) => { c.__proto__ = proto; @@ -979,7 +982,7 @@ class BaseModelSqlv2 { applyPaginate(qb, rest); const proto = await childModel.getProto(); - let data = await this.extractRawQueryAndExec(qb); + const data = await this.extractRawQueryAndExec(qb); return data.map((c) => { c.__proto__ = proto; @@ -1018,7 +1021,8 @@ class BaseModelSqlv2 { .select(cn) // .where(childTable.primaryKey.cn, cid) .where(_wherePk(childTable.primaryKeys, cid)) - ).orWhereNull(rcn); + .whereNotNull(cn) + ); }) .count(`*`, { as: 'count' }); @@ -1079,7 +1083,7 @@ class BaseModelSqlv2 { applyPaginate(qb, rest); const proto = await parentModel.getProto(); - let data = await this.extractRawQueryAndExec(qb); + const data = await this.extractRawQueryAndExec(qb); return data.map((c) => { c.__proto__ = proto; @@ -1554,8 +1558,7 @@ class BaseModelSqlv2 { { const childCol = await colOptions.getChildColumn(); const parentCol = await colOptions.getParentColumn(); - insertObj[childCol.column_name] = - nestedData?.[parentCol.title]; + insertObj[childCol.column_name] = nestedData?.[parentCol.title]; } break; case RelationTypes.HAS_MANY: From c323a53b88a5274e20c5349bc8e559b5286d0765 Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Thu, 18 Aug 2022 22:06:55 +0200 Subject: [PATCH 02/12] chore(gui-v2): update transitions & styles --- packages/nc-gui-v2/assets/style-v2.scss | 30 +++++++------------ packages/nc-gui-v2/pages/signin.vue | 7 +++-- packages/nc-gui-v2/pages/signup/[[token]].vue | 5 ++++ packages/nc-gui-v2/windi.config.ts | 19 +----------- 4 files changed, 21 insertions(+), 40 deletions(-) diff --git a/packages/nc-gui-v2/assets/style-v2.scss b/packages/nc-gui-v2/assets/style-v2.scss index 2ff1b5e33b..1fb987a247 100644 --- a/packages/nc-gui-v2/assets/style-v2.scss +++ b/packages/nc-gui-v2/assets/style-v2.scss @@ -27,17 +27,8 @@ main { overflow-x: hidden; } -nav, -nav .v-list { - @apply dark:(!bg-gray-900 text-white) -} - -.v-divider { - @apply dark:bg-white -} - a { - @apply prose text-primary underline hover:opacity-75 dark:(text-secondary); + @apply prose text-primary !underline hover:!text-pink-500; } h1, h2, h3, h4, h5, h6, p, label, button, textarea, select { @@ -159,25 +150,24 @@ h1, h2, h3, h4, h5, h6, p, label, button, textarea, select { .page-leave-active, .layout-enter-active, .layout-leave-active { - @apply transition-opacity duration-300 ease-in-out; + @apply transition-opacity duration-400 ease-in-out; } -.page-enter-active, -.page-leave-active, -.layout-enter-active, -.layout-leave-active { +.page-enter-from, +.page-leave-to, +.layout-enter-from, +.layout-leave-to { @apply opacity-0; } .slide-enter-active, .slide-leave-active { @apply transition-all duration-200 ease-in-out; - transform: translate(100%, 0); } -.slide-enter, +.slide-enter-from, -.slide-leave-active { +.slide-leave-to { transform: translate(-100%, 0); } @@ -190,8 +180,8 @@ h1, h2, h3, h4, h5, h6, p, label, button, textarea, select { @apply ring ring-xl; } -.glow-enter, -.glow-leave-active { +.glow-enter-from, +.glow-leave-to { @apply opacity-0; } diff --git a/packages/nc-gui-v2/pages/signin.vue b/packages/nc-gui-v2/pages/signin.vue index 86eb53b19f..026b6239bb 100644 --- a/packages/nc-gui-v2/pages/signin.vue +++ b/packages/nc-gui-v2/pages/signin.vue @@ -128,8 +128,11 @@ function resetError() {
-
diff --git a/packages/nc-gui-v2/pages/signup/[[token]].vue b/packages/nc-gui-v2/pages/signup/[[token]].vue index 44bad26614..3ab64b8886 100644 --- a/packages/nc-gui-v2/pages/signup/[[token]].vue +++ b/packages/nc-gui-v2/pages/signup/[[token]].vue @@ -10,6 +10,7 @@ import { useApi, useGlobal, useI18n, + useNuxtApp, useRoute, } from '#imports' @@ -17,6 +18,8 @@ definePageMeta({ requiresAuth: false, }) +const { $e } = useNuxtApp() + const route = useRoute() const { appInfo, signIn } = useGlobal() @@ -84,6 +87,8 @@ async function signUp() { signIn(token!) await navigateTo('/') + + $e('a:auth:sign-up') }) .catch(async (err) => { error = await extractSdkResponseErrorMsg(err) diff --git a/packages/nc-gui-v2/windi.config.ts b/packages/nc-gui-v2/windi.config.ts index da391a88a8..e7928d925a 100644 --- a/packages/nc-gui-v2/windi.config.ts +++ b/packages/nc-gui-v2/windi.config.ts @@ -55,27 +55,10 @@ export default defineConfig({ mono: ['Roboto', 'mono'], }, extend: { - typography: { - DEFAULT: { - css: { - 'a': { - 'color': '#1348ba', - '&:hover': { - color: 'rgba(19,72,186,0.75)', - }, - }, - 'nuxt-link': { - 'color': '#1348ba', - '&:hover': { - color: 'rgba(19,72,186,0.75)', - }, - }, - }, - }, - }, colors: { ...windiColors, ...themeColors, + accent: windiColors.pink['500'], dark: colors.dark, light: colors.light, }, From f8cd8685b63276c79e0f644d441a394a5cea6f62 Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Thu, 18 Aug 2022 22:26:24 +0200 Subject: [PATCH 03/12] chore(gui-v2): change signin, signup & forget-password form structure --- packages/nc-gui-v2/pages/forgot-password.vue | 65 +++++++++---------- packages/nc-gui-v2/pages/signin.vue | 40 +++++------- packages/nc-gui-v2/pages/signup/[[token]].vue | 4 +- 3 files changed, 50 insertions(+), 59 deletions(-) diff --git a/packages/nc-gui-v2/pages/forgot-password.vue b/packages/nc-gui-v2/pages/forgot-password.vue index 7f4e124ddc..6c167e006d 100644 --- a/packages/nc-gui-v2/pages/forgot-password.vue +++ b/packages/nc-gui-v2/pages/forgot-password.vue @@ -59,39 +59,33 @@ function resetError() { diff --git a/packages/nc-gui-v2/pages/signin.vue b/packages/nc-gui-v2/pages/signin.vue index 026b6239bb..d97cd95e70 100644 --- a/packages/nc-gui-v2/pages/signin.vue +++ b/packages/nc-gui-v2/pages/signin.vue @@ -80,24 +80,18 @@ function resetError() { diff --git a/packages/nc-gui-v2/pages/signup/[[token]].vue b/packages/nc-gui-v2/pages/signup/[[token]].vue index 3ab64b8886..e0810bb7dc 100644 --- a/packages/nc-gui-v2/pages/signup/[[token]].vue +++ b/packages/nc-gui-v2/pages/signup/[[token]].vue @@ -102,9 +102,9 @@ function resetError() { @@ -424,7 +421,7 @@ function openTableCreateDialog() { } .nc-treeview-footer-item { - @apply cursor-pointer px-4 py-2 flex align-center hover:bg-gray-200/20 text-xs text-current; + @apply cursor-pointer px-4 py-2 flex items-center hover:bg-gray-200/20 text-xs text-current; } :deep(.nc-filter-input input::placeholder) { @@ -460,7 +457,7 @@ function openTableCreateDialog() { } .sortable-chosen { - @apply !bg-primary/25 text-primary; + @apply !bg-primary bg-opacity-25 text-primary; } } @@ -469,20 +466,20 @@ function openTableCreateDialog() { } .nc-tree-item svg { - @apply text-primary/60; + @apply text-primary text-opacity-60; } .nc-tree-item.active { - @apply !text-primary font-weight-bold after:(!opacity-20); - @apply border-r-3 border-indigo-500; + @apply text-primary font-weight-bold after:(!opacity-20); + @apply border-r-3 border-primary; svg { - @apply !text-primary; + @apply text-primary !text-opacity-100; } } .nc-tree-item:hover { - @apply !text-grey after:(!opacity-5); + @apply text-primary after:(!opacity-5); } :deep(.nc-filter-input) { diff --git a/packages/nc-gui-v2/components/dashboard/settings/AppStore.vue b/packages/nc-gui-v2/components/dashboard/settings/AppStore.vue index b649427120..327080ccf1 100644 --- a/packages/nc-gui-v2/components/dashboard/settings/AppStore.vue +++ b/packages/nc-gui-v2/components/dashboard/settings/AppStore.vue @@ -130,7 +130,7 @@ onMounted(async () => { />
-
+
{{ app.title }} {{ app.description }}
diff --git a/packages/nc-gui-v2/components/dashboard/settings/Metadata.vue b/packages/nc-gui-v2/components/dashboard/settings/Metadata.vue index 909fcad2a3..a1b992cac0 100644 --- a/packages/nc-gui-v2/components/dashboard/settings/Metadata.vue +++ b/packages/nc-gui-v2/components/dashboard/settings/Metadata.vue @@ -73,7 +73,7 @@ const columns = [