diff --git a/client/web/compose/src/components/PageBlocks/Nylas/Components/Mailbox.vue b/client/web/compose/src/components/PageBlocks/Nylas/Components/Mailbox.vue
index ea3b17b2a..91d86650e 100644
--- a/client/web/compose/src/components/PageBlocks/Nylas/Components/Mailbox.vue
+++ b/client/web/compose/src/components/PageBlocks/Nylas/Components/Mailbox.vue
@@ -23,8 +23,8 @@ export default {
computed: {
queryString () {
- const { queryString = [] } = this.prefillValues
- return `from=${queryString}`
+ const { queryString = '' } = this.prefillValues
+ return queryString ? `from=${queryString}` : undefined
},
},
}
diff --git a/client/web/compose/src/components/PageBlocks/Nylas/Components/base.vue b/client/web/compose/src/components/PageBlocks/Nylas/Components/base.vue
index 1364243f0..47f91d909 100644
--- a/client/web/compose/src/components/PageBlocks/Nylas/Components/base.vue
+++ b/client/web/compose/src/components/PageBlocks/Nylas/Components/base.vue
@@ -8,7 +8,7 @@ export default {
accessToken: {
type: String,
- required: true,
+ default: undefined,
},
},
}
diff --git a/client/web/compose/src/components/PageBlocks/Nylas/NylasBase.vue b/client/web/compose/src/components/PageBlocks/Nylas/NylasBase.vue
index 71613127d..db1608b3f 100644
--- a/client/web/compose/src/components/PageBlocks/Nylas/NylasBase.vue
+++ b/client/web/compose/src/components/PageBlocks/Nylas/NylasBase.vue
@@ -5,7 +5,7 @@
>
{
this.processing = false
})
+ },
+ },
- this.processPrefillValues()
+ options: {
+ deep: true,
+ handler () {
+ this.processing = true
+
+ setTimeout(() => {
+ this.processing = false
+ }, 300)
},
},
},
@@ -118,7 +133,7 @@ export default {
to: this.mapFieldToValue('to').map(v => ({ email: v })),
subject: this.mapFieldToValue('subject').join(','),
body: this.mapFieldToValue('body').join('
'),
- queryString: this.mapFieldToValue('queryString').join(','),
+ queryString: this.mapFieldToValue('queryString')[0],
}
}
},
diff --git a/client/web/compose/src/components/PageBlocks/Nylas/NylasConfigurator.vue b/client/web/compose/src/components/PageBlocks/Nylas/NylasConfigurator.vue
index e6df113e1..e25c37e28 100644
--- a/client/web/compose/src/components/PageBlocks/Nylas/NylasConfigurator.vue
+++ b/client/web/compose/src/components/PageBlocks/Nylas/NylasConfigurator.vue
@@ -1,21 +1,51 @@
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -149,7 +179,7 @@ export default {
{ value: 'Mailbox', text: this.$t('kinds.mailbox') },
],
- checkboxLabel: {
+ checkboxLabels: {
on: this.$t('general:label.yes'),
off: this.$t('general:label.no'),
},
diff --git a/lib/js/src/compose/types/page-block/nylas.ts b/lib/js/src/compose/types/page-block/nylas.ts
index 62d69da78..93fdabfc0 100644
--- a/lib/js/src/compose/types/page-block/nylas.ts
+++ b/lib/js/src/compose/types/page-block/nylas.ts
@@ -6,6 +6,7 @@ const kind = 'Nylas'
interface Options {
kind: string,
componentID: string;
+ accessTokenRequired: boolean;
magnifyOption: string;
prefill: Prefill;
}
@@ -20,6 +21,7 @@ interface Prefill {
const defaults: Readonly = Object.freeze({
kind: 'Composer', // Default kind of nylas component
componentID: '',
+ accessTokenRequired: true,
magnifyOption: '',
prefill: {
to: '',
@@ -43,6 +45,7 @@ export class PageBlockNylas extends PageBlock {
if (!o) return
Apply(this.options, o, String, 'kind', 'componentID', 'magnifyOption')
+ Apply(this.options, o, Boolean, 'accessTokenRequired')
this.options.prefill = { ...defaults.prefill, ...o.prefill }
}
diff --git a/locale/en/corteza-webapp-compose/block.yaml b/locale/en/corteza-webapp-compose/block.yaml
index 0f264c824..146909750 100644
--- a/locale/en/corteza-webapp-compose/block.yaml
+++ b/locale/en/corteza-webapp-compose/block.yaml
@@ -729,6 +729,7 @@ nylas:
label: Office365/Google
kind: Component kind
componentID: Component ID
+ accessTokenRequired: Access token required
prefill:
title: Prefill values
selectField: Select field