| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /framework7/src/js/ |
Upload File : |
export const mixin = {
computed: {
alert_message() {
return this.$store.getters.alert_message;
},
quit_application() {
return this.$store.getters.quit_application;
},
},
watch: {
alert_message(value) {
const self = this;
if (value == null) {
return
}
this.showToastBottom(value);
setTimeout(() => {
self.$store.commit("setAlertMessage", null);
}, 200);
},
quit_application(value) {
const self = this;
//console.log("quit app", value)
if (value != null) {
this.quitAppDialogue(value);
this.$store.commit("setQuitApplication", null);
}
}
},
methods: {
showToastBottom(text) {
const self = this;
// Create toast
if (!self.toastBottom || self.toastBottom.destroyed) {
self.toastBottom = self.$f7.toast.create({
text: text,
closeTimeout: 4000,
position: 'center',
destroyOnClose: true
});
}
// Open it
self.toastBottom.open();
},
quitAppDialogue(cnt1) {
var dialog = this.$f7.dialog
.create({
title: "Quit",
text:
"Are you sure you want to quit Application?",
content: "",
buttons: [{ text: "No", close: true }, { text: "Yes" }],
onClick: (dialog, index) => {
const app = this.$f7;
if (index == 1) {
this.$store.commit("setQuitApplication", null);
this.$f7.dialog.close();
app.panel.close();
if (window.hasOwnProperty("cordova")) {
window.navigator.app.exitApp();
}
} else {
this.$store.commit("setQuitApplication", null);
this.$f7.dialog.close();
app.panel.close();
}
},
on: {
open: function () {
//console.log("OPEN");
},
},
})
// console.log("close here2")
.open();
}
}
};