|
1 |
| -/* global Vue, CV, app, countlyEvent, countlyGlobal, countlyAuth, VueJsonPretty, ElementTiptapPlugin, countlyCommon */ |
| 1 | +/* global Vue, CV, app, countlyEvent, countlyGlobal, countlyAuth, VueJsonPretty, ElementTiptapPlugin, countlyCommon CountlyHelpers*/ |
2 | 2 |
|
3 | 3 | (function(countlyVue) {
|
4 | 4 |
|
|
914 | 914 | '<img data-test-id="cly-notification-img" :src="image" class="alert-image bu-mr-4 bu-my-2 bu-ml-2">\n' +
|
915 | 915 | '<slot><span class="alert-text" data-test-id="cly-notification-text" style="margin-block:auto" v-html="innerText">{{text}}</span></slot>\n' +
|
916 | 916 | '</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>' + |
917 | 918 | '<div v-if="closable" class="bu-mt-2" >\n' +
|
918 | 919 | '<div v-if="size==\'full\'" @click="closeModal" class="bu-mr-2 bu-ml-2" >\n' +
|
919 | 920 | '<slot name="close"><i data-test-id="cly-notification-full-size-close-icon" class="el-icon-close"></i></slot>\n' +
|
|
934 | 935 | size: {default: "full", type: String},
|
935 | 936 | visible: {default: true, type: Boolean},
|
936 | 937 | 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 }, |
938 | 940 | },
|
939 | 941 | data: function() {
|
940 | 942 | return {
|
|
984 | 986 | this.isModalVisible = false;
|
985 | 987 | this.$emit('close', this.id);
|
986 | 988 | },
|
| 989 | + goToUrl: function() { |
| 990 | + CountlyHelpers.goTo(this.goTo); |
| 991 | + } |
987 | 992 | },
|
988 | 993 | mounted: function() {
|
989 | 994 | if (this.autoHide) {
|
|
0 commit comments