2019-11-16 10:21:14 +03:00
|
|
|
/**
|
|
|
|
* First we will load all of this project's JavaScript dependencies which
|
|
|
|
* includes Vue and other libraries. It is a great starting point when
|
|
|
|
* building robust, powerful web applications using Vue and Laravel.
|
|
|
|
*/
|
|
|
|
|
|
|
|
require('./../../bootstrap');
|
|
|
|
|
|
|
|
import Vue from 'vue';
|
|
|
|
|
|
|
|
import Global from './../../mixins/global';
|
|
|
|
|
|
|
|
import Form from './../../plugins/form';
|
|
|
|
import BulkAction from './../../plugins/bulk-action';
|
2019-11-22 15:16:57 +03:00
|
|
|
import HtmlEditor from './../../components/Inputs/HtmlEditor';
|
2019-11-16 10:21:14 +03:00
|
|
|
|
|
|
|
const app = new Vue({
|
|
|
|
el: '#app',
|
2019-11-22 15:16:57 +03:00
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
mixins: [
|
|
|
|
Global
|
|
|
|
],
|
2019-11-22 15:16:57 +03:00
|
|
|
|
|
|
|
components: {
|
|
|
|
HtmlEditor
|
|
|
|
},
|
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
data: function () {
|
|
|
|
return {
|
|
|
|
form: new Form('setting'),
|
2019-12-20 20:12:43 +03:00
|
|
|
bulk_action: new BulkAction('settings'),
|
|
|
|
email:{
|
|
|
|
sendmailPath:true,
|
|
|
|
smtpHost:true,
|
|
|
|
smtpPort:true,
|
|
|
|
smtpUsername:true,
|
|
|
|
smtpPassword:true,
|
|
|
|
smtpEncryption:true,
|
|
|
|
}
|
2019-11-16 10:21:14 +03:00
|
|
|
}
|
2019-12-05 18:47:42 +08:00
|
|
|
},
|
|
|
|
|
2019-12-20 20:12:43 +03:00
|
|
|
mounted(){
|
|
|
|
this.onChangeProtocol(this.form.protocol);
|
|
|
|
},
|
|
|
|
|
|
|
|
methods:{
|
|
|
|
onChangeProtocol(protocol){
|
|
|
|
switch(protocol){
|
|
|
|
case "smtp":
|
|
|
|
this.email.sendmailPath = true;
|
|
|
|
this.email.smtpHost = false;
|
|
|
|
this.email.smtpPort = false;
|
|
|
|
this.email.smtpUsername = false;
|
|
|
|
this.email.smtpPassword = false;
|
|
|
|
this.email.smtpEncryption = false;
|
|
|
|
break;
|
|
|
|
case "sendmail":
|
|
|
|
this.email.sendmailPath = false;
|
|
|
|
this.email.smtpHost = true;
|
|
|
|
this.email.smtpPort = true;
|
|
|
|
this.email.smtpUsername = true;
|
|
|
|
this.email.smtpPassword = true;
|
|
|
|
this.email.smtpEncryption = true;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
this.email.sendmailPath = true;
|
|
|
|
this.email.smtpHost = true;
|
|
|
|
this.email.smtpPort = true;
|
|
|
|
this.email.smtpUsername = true;
|
|
|
|
this.email.smtpPassword = true;
|
|
|
|
this.email.smtpEncryption = true;
|
|
|
|
break;
|
2019-12-05 18:47:42 +08:00
|
|
|
}
|
|
|
|
}
|
2019-11-16 10:21:14 +03:00
|
|
|
}
|
|
|
|
});
|