UNPKG

@europeana/portal

Version:
124 lines (102 loc) 3.83 kB
exports.ids = [5]; exports.modules = { /***/ 571: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/components/generic/ContentWarningModal.vue?vue&type=template&id=7d3e3ef4& var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-modal',{attrs:{"id":"content-warning-modal","title":_vm.title,"hide-header-close":"","hide-footer":"","data-qa":"content warning modal","static":_vm.modalStatic}},[_c('p',[_vm._v(_vm._s(_vm.description))]),_vm._v(" "),_c('div',{staticClass:"modal-footer pt-2"},[_c('b-button',{attrs:{"variant":"outline-primary","data-qa":"go away button","to":_vm.$path({ name: 'index' })},nativeOn:{"click":function($event){_vm.$matomo && _vm.$matomo.trackEvent('Content warning', 'Click go away', _vm.pageSlug);}}},[_vm._v("\n "+_vm._s(_vm.$t('actions.goHome'))+"\n ")]),_vm._v(" "),_c('b-button',{staticClass:"continue-button",attrs:{"variant":"primary"},on:{"click":_vm.dismissWarning}},[_vm._v("\n "+_vm._s(_vm.$t('actions.continue'))+"\n ")])],1)])} var staticRenderFns = [] // CONCATENATED MODULE: ./src/components/generic/ContentWarningModal.vue?vue&type=template&id=7d3e3ef4& // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/generic/ContentWarningModal.vue?vue&type=script&lang=js& // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ var ContentWarningModalvue_type_script_lang_js_ = ({ name: 'ContentWarningModal', props: { title: { type: String, default: null }, description: { type: String, default: null }, pageSlug: { type: String, default: null }, modalStatic: { type: Boolean, default: false } }, mounted() { this.showWarning(); }, methods: { showWarning() { const dismissedWarnings = JSON.parse(sessionStorage.dismissedWarnings || '[]'); const contentWarningDismissed = dismissedWarnings === null || dismissedWarnings === void 0 ? void 0 : dismissedWarnings.includes(this.pageSlug); if (!contentWarningDismissed) { this.$bvModal.show('content-warning-modal'); this.$matomo && this.$matomo.trackEvent('Content warning', 'Content warning modal shows', this.pageSlug); } }, dismissWarning() { this.$bvModal.hide('content-warning-modal'); const dismissedWarnings = JSON.parse(sessionStorage.dismissedWarnings || '[]'); dismissedWarnings.push(this.pageSlug); sessionStorage.dismissedWarnings = JSON.stringify(dismissedWarnings); this.$matomo && this.$matomo.trackEvent('Content warning', 'Click continue', this.pageSlug); } } }); // CONCATENATED MODULE: ./src/components/generic/ContentWarningModal.vue?vue&type=script&lang=js& /* harmony default export */ var generic_ContentWarningModalvue_type_script_lang_js_ = (ContentWarningModalvue_type_script_lang_js_); // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(3); // CONCATENATED MODULE: ./src/components/generic/ContentWarningModal.vue /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( generic_ContentWarningModalvue_type_script_lang_js_, render, staticRenderFns, false, null, null, "635d07e9" ) /* harmony default export */ var ContentWarningModal = __webpack_exports__["default"] = (component.exports); /***/ }) };; //# sourceMappingURL=5.js.map