+
diff --git a/packages/nc-gui/components/extensions/Market/ExtensionsTab.vue b/packages/nc-gui/components/extensions/Market/ExtensionsTab.vue
index e008610bac..e492c6b0e9 100644
--- a/packages/nc-gui/components/extensions/Market/ExtensionsTab.vue
+++ b/packages/nc-gui/components/extensions/Market/ExtensionsTab.vue
@@ -43,7 +43,11 @@ const onAddExtension = (ext: any) => {
class="pb-2 grid gap-4"
:class="{
'h-full': searchQuery && !filteredAvailableExtensions.length && availableExtensions.length,
- 'grid-cols-1 md:grid-cols-2 xl:grid-cols-3': !(searchQuery && !filteredAvailableExtensions.length && availableExtensions.length),
+ 'grid-cols-1 md:grid-cols-2 xl:grid-cols-3': !(
+ searchQuery &&
+ !filteredAvailableExtensions.length &&
+ availableExtensions.length
+ ),
}"
>
diff --git a/packages/nc-gui/components/virtual-cell/Button.vue b/packages/nc-gui/components/virtual-cell/Button.vue
index 1ce18b62e0..1339b468e0 100644
--- a/packages/nc-gui/components/virtual-cell/Button.vue
+++ b/packages/nc-gui/components/virtual-cell/Button.vue
@@ -50,7 +50,15 @@ const triggerAction = async () => {
const componentProps = computed(() => {
if (column.value.colOptions.type === 'url') {
let url = `${cellValue.value?.url}`
- url = encodeURI(/^(https?|ftp|mailto|file):\/\//.test(url) ? url : url.trim() ? `http://${url}` : '')
+ url = /^(https?|ftp|mailto|file):\/\//.test(url) ? url : url.trim() ? `https://${url}` : ''
+
+ // if url params not encoded, encode them using encodeURI
+ try {
+ url = decodeURI(url) === url ? encodeURI(url) : url
+ } catch {
+ url = encodeURI(url)
+ }
+
return {
href: url,
target: '_blank',
diff --git a/packages/nocodb/src/db/sql-client/lib/pg/PgClient.ts b/packages/nocodb/src/db/sql-client/lib/pg/PgClient.ts
index a8e4c805c3..986004f743 100644
--- a/packages/nocodb/src/db/sql-client/lib/pg/PgClient.ts
+++ b/packages/nocodb/src/db/sql-client/lib/pg/PgClient.ts
@@ -3029,7 +3029,7 @@ class PGClient extends KnexClient {
n.dt,
castedColumn,
limit,
- n.meta.date_format || 'YYYY-MM-DD',
+ n.meta?.date_format || 'YYYY-MM-DD',
);
query += this.genQuery(castQuery, [], shouldSanitize);
diff --git a/packages/nocodb/src/modules/auth/auth.controller.ts b/packages/nocodb/src/modules/auth/auth.controller.ts
index 3d880d86d4..48c67a7085 100644
--- a/packages/nocodb/src/modules/auth/auth.controller.ts
+++ b/packages/nocodb/src/modules/auth/auth.controller.ts
@@ -257,7 +257,7 @@ export class AuthController {
(await import('~/modules/auth/ui/auth/resetPassword')).default,
{
ncPublicUrl: process.env.NC_PUBLIC_URL || '',
- token: JSON.stringify(tokenId),
+ token: tokenId,
baseUrl: `/`,
},
),
diff --git a/packages/nocodb/src/modules/auth/ui/auth/emailVerify.ts b/packages/nocodb/src/modules/auth/ui/auth/emailVerify.ts
index a531ddfb11..34eba67123 100644
--- a/packages/nocodb/src/modules/auth/ui/auth/emailVerify.ts
+++ b/packages/nocodb/src/modules/auth/ui/auth/emailVerify.ts
@@ -42,7 +42,7 @@ export default `
valid: null,
errMsg: null,
validForm: false,
- token: <%= token %>,
+ token: '<%= token %>',
greeting: 'Password Reset',
formdata: {
password: '',
diff --git a/packages/nocodb/src/modules/auth/ui/auth/resetPassword.ts b/packages/nocodb/src/modules/auth/ui/auth/resetPassword.ts
index b8af8c6c42..e4db0ac3ac 100644
--- a/packages/nocodb/src/modules/auth/ui/auth/resetPassword.ts
+++ b/packages/nocodb/src/modules/auth/ui/auth/resetPassword.ts
@@ -68,7 +68,7 @@ export default `
data: {
valid: null,
validForm: false,
- token: <%= token %>,
+ token: '<%= token %>',
greeting: 'Password Reset',
formdata: {
password: '',
diff --git a/packages/nocodb/src/modules/jobs/jobs/export-import/duplicate.controller.ts b/packages/nocodb/src/modules/jobs/jobs/export-import/duplicate.controller.ts
index 98718cdce3..27ebb1e5de 100644
--- a/packages/nocodb/src/modules/jobs/jobs/export-import/duplicate.controller.ts
+++ b/packages/nocodb/src/modules/jobs/jobs/export-import/duplicate.controller.ts
@@ -32,7 +32,7 @@ export class DuplicateController {
@Post([
'/api/v1/db/meta/duplicate/:workspaceId/shared/:sharedBaseId',
- '/api/v1/meta/duplicate/:workspaceId/shared/:sharedBaseId',
+ '/api/v2/meta/duplicate/:workspaceId/shared/:sharedBaseId',
])
@HttpCode(200)
@Acl('duplicateSharedBase', {
diff --git a/packages/nocodb/src/schema/swagger.json b/packages/nocodb/src/schema/swagger.json
index b12bcd423e..3842037747 100644
--- a/packages/nocodb/src/schema/swagger.json
+++ b/packages/nocodb/src/schema/swagger.json
@@ -4633,6 +4633,98 @@
]
}
},
+ "/api/v2/meta/duplicate/{workspaceId}/shared/{sharedBaseId}": {
+ "post": {
+ "summary": "Duplicate Shared Base",
+ "operationId": "base-duplicate-shared",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "400": {
+ "$ref": "#/components/responses/BadRequest"
+ }
+ },
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "options": {
+ "type": "object",
+ "properties": {
+ "excludeData": {
+ "type": "boolean",
+ "required": false
+ },
+ "excludeViews": {
+ "type": "boolean",
+ "required": false
+ }
+ }
+ },
+ "base": {
+ "type": "object",
+ "required": false
+ }
+ }
+ },
+ "examples": {
+ "Example 1": {
+ "value": {
+ "excludeData": true,
+ "excludeViews": true,
+ "excludeHooks": true
+ }
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Base"
+ ],
+ "description": "Duplicate a shared base",
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/xc-auth"
+ },
+ {
+ "schema": {
+ "$ref": "#/components/schemas/Id",
+ "example": "w_124hhlkbeasewh",
+ "type": "string"
+ },
+ "name": "workspaceId",
+ "in": "path",
+ "required": true,
+ "description": "Unique Workspace ID"
+ },
+ {
+ "name": "sharedBaseId",
+ "in": "path",
+ "required": true,
+ "description": "Unique Shared Base ID"
+ }
+ ]
+ }
+ },
"/api/v1/db/meta/projects/{baseId}/{sourceId}/tables": {
"parameters": [
{