Skip to content

Commit 4685949

Browse files
Merge pull request #4860 from Countly/SER-1054
[SER-1054] Add link to cly-notification
2 parents 4170a7f + cfad358 commit 4685949

File tree

1 file changed

+12
-2
lines changed
  • frontend/express/public/javascripts/countly/vue/components

1 file changed

+12
-2
lines changed

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

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* global Vue, CV, app, countlyEvent, countlyGlobal, countlyAuth, VueJsonPretty, ElementTiptapPlugin, countlyCommon */
1+
/* global Vue, CV, app, countlyEvent, countlyGlobal, countlyAuth, VueJsonPretty, ElementTiptapPlugin, countlyCommon CountlyHelpers*/
22

33
(function(countlyVue) {
44

@@ -914,6 +914,7 @@
914914
'<img data-test-id="cly-notification-img" :src="image" class="alert-image bu-mr-4 bu-my-2 bu-ml-2">\n' +
915915
'<slot><span class="alert-text" data-test-id="cly-notification-text" style="margin-block:auto" v-html="innerText">{{text}}</span></slot>\n' +
916916
'</div>\n' +
917+
'<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>' +
917918
'<div v-if="closable" class="bu-mt-2" >\n' +
918919
'<div v-if="size==\'full\'" @click="closeModal" class="bu-mr-2 bu-ml-2" >\n' +
919920
'<slot name="close"><i data-test-id="cly-notification-full-size-close-icon" class="el-icon-close"></i></slot>\n' +
@@ -934,7 +935,13 @@
934935
size: {default: "full", type: String},
935936
visible: {default: true, type: Boolean},
936937
closable: {default: true, type: Boolean},
937-
autoHide: {default: false, type: Boolean},
938+
autoHide: { default: false, type: Boolean },
939+
goTo: {
940+
default() {
941+
return { title: '', url: '', from: '' };
942+
},
943+
type: Object
944+
}
938945
},
939946
data: function() {
940947
return {
@@ -984,6 +991,9 @@
984991
this.isModalVisible = false;
985992
this.$emit('close', this.id);
986993
},
994+
goToUrl: function() {
995+
CountlyHelpers.goTo(this.goTo);
996+
}
987997
},
988998
mounted: function() {
989999
if (this.autoHide) {

0 commit comments

Comments
 (0)