Skip to content

Commit 12cc673

Browse files
authored
Merge pull request #539 from weni-ai/hs-1817-language-bug
[HS-1817] Bugs: Template Language, Weni Web Chat Unicode and Gmail App
2 parents ce91dab + c19dc75 commit 12cc673

File tree

6 files changed

+46
-19
lines changed

6 files changed

+46
-19
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
3.4.3
2+
----------
3+
`2025-09-11 · 3 🐛`
4+
5+
### 🐛 Bug fixes
6+
- Fix: scroll on language select tab in templates
7+
- Fix: HTML unicode for the generated Weni Web Chat script
8+
- Fix: remove drawer details view for Gmail app
9+
110
3.4.2
211
----------
312
`2025-08-12 · 2 🎉`

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "weni-integrations",
3-
"version": "3.4.2",
3+
"version": "3.4.3",
44
"private": true,
55
"type": "module",
66
"scripts": {

src/components/AppGrid/index.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
:iconSrc="appIcon(app)"
3232
:typeAction="app.generic ? (type === 'add' ? 'edit' : typeAction) : typeAction"
3333
:clickable="
34-
(!app.generic && app.code !== 'email' && app.code !== 'gmail') || type !== 'add'
34+
(!app.generic && app.code !== 'email' && app.code !== 'gmail') || (type !== 'add' && app.code !== 'gmail')
3535
"
3636
@openModal="openAppModal(app)"
3737
>
@@ -49,14 +49,15 @@
4949
<unnnic-button size="small" type="tertiary" :iconCenter="card" />
5050
</template>
5151
<unnnic-dropdown-item
52+
v-if="!['gmail'].includes(app.code)"
5253
class="app-grid__content__item__button--action"
5354
@click="openAppModal(app)"
5455
>
5556
<unnnic-icon-svg :icon="action" size="sm" />
5657
{{ $t(`apps.discovery.action.${type}`) }}
5758
</unnnic-dropdown-item>
5859
<unnnic-dropdown-item
59-
v-if="app.code !== 'wpp'"
60+
v-if="!['wpp', 'gmail'].includes(app.code)"
6061
class="app-grid__content__item__button--details"
6162
id="openAppDetails"
6263
ref="openAppDetails"
@@ -267,7 +268,7 @@
267268
},
268269
openAppModal(app) {
269270
this.setAppUuid(app.uuid);
270-
if (this.type === 'add' && app.generic) {
271+
if ((this.type === 'add' && app.generic) || app.code === 'gmail') {
271272
return;
272273
}
273274

src/components/config/channels/WWC/Config.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,10 +653,12 @@
653653
return b64File.split(';')[0].split(':')[1];
654654
},
655655
async downloadScript() {
656+
const htmlScript = `<!DOCTYPE html>\n<head>\n\t<meta charset="UTF-8">\n</head>\n<body>\n\t${this.scriptCode}\n</body>\n</html>`;
657+
656658
let element = document.createElement('a');
657659
element.setAttribute(
658660
'href',
659-
'data:text/plain;charset=utf-8, ' + encodeURIComponent(this.scriptCode),
661+
'data:text/plain;charset=utf-8, ' + encodeURIComponent(htmlScript),
660662
);
661663
element.setAttribute('download', `wwc-script-${this.title}.html`);
662664
element.style.display = 'none';

src/components/config/channels/generic/Config.vue

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
:loading="loadingUpdateAppConfig"
7474
:disabled="isConfigured"
7575
@click="saveConfig"
76-
></unnnic-button>
76+
></unnnic-button>
7777
</div>
7878
</div>
7979
</template>
@@ -125,6 +125,9 @@
125125
await this.fetchAppData();
126126
},
127127
computed: {
128+
channelCode() {
129+
return this.app.config.channel_code;
130+
},
128131
...mapState(app_type, [
129132
'currentApp',
130133
'loadingCurrentApp',
@@ -134,7 +137,7 @@
134137
]),
135138
...mapState(generic_store, ['errorAppForm', 'genericAppForm']),
136139
appDescription() {
137-
const i18nkey = `GenericApp.configuration_guide.${this.app.config.channel_code}`;
140+
const i18nkey = `GenericApp.configuration_guide.${this.channelCode}`;
138141
return this.$t(i18nkey) ?? this.app.config.channel_claim_blurb;
139142
},
140143
shouldDisplayCallback() {
@@ -148,7 +151,7 @@
148151
async fetchAppData() {
149152
this.loadingFormBuild = true;
150153
await app_type().getApp({ code: this.app.code, appUuid: this.app.uuid });
151-
await generic_store().getAppForm({ channelCode: this.app.config.channel_code });
154+
await generic_store().getAppForm({ channelCode: this.channelCode });
152155
153156
if (this.errorCurrentApp || this.errorAppForm) {
154157
this.callModal({
@@ -211,7 +214,7 @@
211214
appUuid: this.app.uuid,
212215
payload: {
213216
config: payloadConfig,
214-
channel_code: this.app.config.channel_code,
217+
channel_code: this.channelCode,
215218
},
216219
};
217220

src/components/whatsAppTemplates/FormTabs.vue

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,18 @@
9797
sampleFileData: null,
9898
};
9999
},
100-
updated() {
100+
mounted() {
101101
this.headerScrollBehavior();
102102
},
103-
beforeDestroy() {
104-
window.removeEventListener('wheel', this.handleWheelEvent);
103+
beforeUnmount() {
104+
const tabHeader = document.getElementsByClassName('tab-content')[0];
105+
if (tabHeader) {
106+
tabHeader.removeEventListener(
107+
'wheel',
108+
this.listenToWheelEvent,
109+
{ passive: true },
110+
);
111+
}
105112
},
106113
async created() {
107114
this.dataProcessingLoading = true;
@@ -181,16 +188,21 @@
181188
this.handleWheelEvent(tabHeader);
182189
}
183190
},
191+
listenToWheelEvent(event) {
192+
event.preventDefault();
193+
194+
const tabHeader = document.getElementsByClassName('tab-content')[0];
195+
196+
if (tabHeader) {
197+
tabHeader.scrollBy({
198+
left: event.deltaY < 0 ? -30 : 30,
199+
});
200+
}
201+
},
184202
handleWheelEvent(component) {
185203
component.addEventListener(
186204
'wheel',
187-
(event) => {
188-
event.preventDefault();
189-
190-
component.scrollBy({
191-
left: event.deltaY < 0 ? -30 : 30,
192-
});
193-
},
205+
this.listenToWheelEvent,
194206
{ passive: true },
195207
);
196208
},

0 commit comments

Comments
 (0)