Skip to content

Commit 1d3e54c

Browse files
committed
add goto link
1 parent a0907e4 commit 1d3e54c

File tree

1 file changed

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

1 file changed

+7
-2
lines changed

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

+7-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,8 @@
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: { default: { title: '', url: '', from: ''}, type: Object, required: false },
938940
},
939941
data: function() {
940942
return {
@@ -984,6 +986,9 @@
984986
this.isModalVisible = false;
985987
this.$emit('close', this.id);
986988
},
989+
goToUrl: function() {
990+
CountlyHelpers.goTo(this.goTo);
991+
}
987992
},
988993
mounted: function() {
989994
if (this.autoHide) {

0 commit comments

Comments
 (0)