import Vue from "vue"; import App from "./App.vue"; import store from "./store"; import UIkit from "uikit"; import VueTour from "vue-tour"; import LoadScript from "vue-plugin-load-script"; import VueFriendlyIframe from "vue-friendly-iframe"; require("vue-tour/dist/vue-tour.css"); // Import MD icons import "material-design-icons/iconfont/material-icons.css"; // Use load-script module Vue.use(LoadScript); // Use vue-tour module Vue.use(VueTour); // Use Friendly Iframe module Vue.use(VueFriendlyIframe); Vue.config.productionTip = false; Vue.mixin({ methods: { modalConfirm: function(modalText) { var context = this; // Stop GPU preview to show modal context.$root.$emit("globalTogglePreview", false); var showModal = function(resolve, reject) { UIkit.modal .confirm(modalText) .then( function() { resolve(); }, function() { reject(); } ) .finally(function() { // Reenable the GPU preview, if it was active before the modal console.log("Re-enabling GPU preview"); if (context.$store.state.globalSettings.autoGpuPreview) { console.log("Re-enabling preview"); context.$root.$emit("globalTogglePreview", true); } }); }; return new Promise(showModal); }, modalNotify: function(message, status = "success") { UIkit.notification({ message: message, status: status }); }, modalDialog: function(title, message) { UIkit.modal.dialog(`
${message}