Skip to content

Commit 561c0b1

Browse files
Merge remote-tracking branch 'origin/release.24.05' into fix-allow-user-selection-on-dashboard-widgets-content
2 parents 5252a9a + 19a8aac commit 561c0b1

File tree

4 files changed

+35
-7
lines changed

4 files changed

+35
-7
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
## Version 24.05.XX
2+
Features:
3+
- [core] Implement go to link in notification
4+
25
Fixes:
36
- [dashboard] Allow users to select text inside the widget without dragging it
47

58
Enterprise Fixes:
69
- [data-manager] Fixed segment data deletion
10+
- [users] Fix add/remove user to profile group
11+
- [users] Remove link to profile group page after removing user from group
712

813
## Version 24.05.42
914
Fixes:

frontend/express/public/javascripts/countly/countly.helpers.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@
346346
payload.autoHide = !msg.sticky;
347347
payload.id = msg.id;
348348
payload.width = msg.width;
349+
payload.goTo = msg.goTo;
349350
var colorToUse;
350351

351352
if (countlyGlobal.ssr) {
@@ -398,9 +399,14 @@
398399
* title is the text that will be dispalyed for the backlink url.
399400
*/
400401
CountlyHelpers.goTo = function(options) {
401-
app.backlinkUrl = options.from;
402-
app.backlinkTitle = options.title;
403-
window.location.hash = options.url;
402+
if (options.url && options.url.startsWith('https://')) {
403+
window.open(options.url, '_blank', 'noopener,noreferrer');
404+
}
405+
else {
406+
app.backlinkUrl = options.from;
407+
app.backlinkTitle = options.title;
408+
window.location.hash = options.url;
409+
}
404410
};
405411

406412
/**

frontend/express/public/javascripts/countly/vue/components/helpers.js

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,11 +1036,13 @@
10361036
Vue.component("cly-notification", countlyBaseComponent.extend({
10371037
template: '<div v-if="isModalVisible===true" :class="dynamicClasses" class="cly-vue-notification__alert-box">\n' +
10381038
'<div class="bu-is-flex bu-is-justify-content-space-between bu-p-3">\n' +
1039-
'<div class="bu-is-flex">\n' +
1039+
'<div class="bu-is-flex" style="width:100%">\n' +
10401040
'<img data-test-id="cly-notification-img" :src="image" class="alert-image bu-mr-3">\n' +
1041-
'<slot><span class="alert-text" data-test-id="cly-notification-text" style="margin-block:auto" v-html="innerText">{{text}}</span></slot>\n' +
1041+
'<div :style="dynamicStyle">\n' +
1042+
'<slot><span class="alert-text" data-test-id="cly-notification-text" style="margin-block:auto" v-html="innerText">{{text}}</span></slot>\n' +
1043+
'<div v-if="goTo.title" class="bu-is-flex cursor-pointer"><a class="bu-level-item bu-has-text-link bu-has-text-weight-medium" @click="goToUrl">{{goTo.title}}</a></div>' +
1044+
'</div>\n' +
10421045
'</div>\n' +
1043-
'<div v-if="goTo.title" class="bu-is-flex bu-ml-auto"><a class="bu-level-item bu-has-text-link bu-has-text-weight-medium" @click="goToUrl">{{goTo.title}}</a></div>' +
10441046
'<div v-if="closable" class="" >\n' +
10451047
'<div v-if="size==\'full\'" @click="closeModal" class=" bu-ml-2" >\n' +
10461048
'<slot name="close"><i data-test-id="cly-notification-full-size-close-icon" class="el-icon-close"></i></slot>\n' +
@@ -1069,6 +1071,7 @@
10691071
type: Object
10701072
},
10711073
customWidth: { default: "", type: String },
1074+
toast: { default: false, type: Boolean },
10721075
},
10731076
data: function() {
10741077
return {
@@ -1115,6 +1118,20 @@
11151118
return this.text;
11161119
}
11171120
return "";
1121+
},
1122+
dynamicStyle: function() {
1123+
let style = {
1124+
display: 'flex',
1125+
'flex-direction': this.toast ? 'column' : 'row',
1126+
width: '100%'
1127+
};
1128+
if (this.toast) {
1129+
style.gap = '5px';
1130+
}
1131+
else {
1132+
style['justify-content'] = 'space-between';
1133+
}
1134+
return style;
11181135
}
11191136
},
11201137
methods: {

frontend/express/public/javascripts/countly/vue/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@
688688

689689
var NotificationToastsView = {
690690
template: '<div class="notification-toasts"> \
691-
<cly-notification v-for="(toast) in notificationToasts" :key="toast.id" :id="toast.id" :text="toast.text" :autoHide="toast.autoHide" :color="toast.color" :closable="true" :customWidth="toast.width" @close="onClose" class="notification-toasts__item"></cly-notification>\
691+
<cly-notification v-for="(toast) in notificationToasts" :key="toast.id" v-bind="toast" closable :customWidth="toast.width" toast @close="onClose" class="notification-toasts__item"></cly-notification>\
692692
</div>',
693693
store: _vuex.getGlobalStore(),
694694
computed: {

0 commit comments

Comments
 (0)