(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{596:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("Content",{attrs:{"app-name":"mail"}},[n("Navigation"),t._v(" "),n("AppContent",[n("div",{staticClass:"section"},[n("h2",[t._v(t._s(t.t("mail","Account Settings"))+" - "+t._s(t.email))]),t._v(" "),n("h3",[t._v(t._s(t.t("mail","Mail server")))]),t._v(" "),n("div",{attrs:{id:"mail-settings"}},[n("AccountForm",{attrs:{"display-name":t.displayName,email:t.email,save:t.onSave,account:t.account}})],1),t._v(" "),n("SignatureSettings",{attrs:{account:t.account}})],1)])],1)};a._withStripped=!0;var i=n(30),o=(n(96),n(170)),s=n(389),u=n(226),r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("h3",[t._v(t._s(t.t("mail","Signature")))]),t._v(" "),n("p",[t._v("\n\t\t"+t._s(t.t("mail","A signature will be added to the text of new and response messages."))+"\n\t")]),t._v(" "),n("p",[n("textarea",{directives:[{name:"model",rawName:"v-model",value:t.signature,expression:"signature"}],attrs:{disabled:t.loading},domProps:{value:t.signature},on:{input:function(e){e.target.composing||(t.signature=e.target.value)}}})]),t._v(" "),n("p",[n("input",{attrs:{type:"submit",disabled:t.loading},domProps:{value:t.t("mail","Delete")},on:{click:t.deleteSignature}}),t._v(" "),n("input",{staticClass:"primary",attrs:{type:"submit",disabled:t.loading},domProps:{value:t.t("mail","Save")},on:{click:t.saveSignature}})])])};r._withStripped=!0;var c={name:"SignatureSettings",props:{account:{type:Object,required:!0}},data:function(){return{loading:!1,signature:this.account.signature}},methods:{deleteSignature:function(){var t=this;this.loading=!0,this.$store.dispatch("updateAccountSignature",{account:this.account,signature:null}).then(function(){console.info("signature deleted"),t.signature="",t.loading=!1}).catch(function(t){throw console.error("could not delete account signature",t),t})},saveSignature:function(){var t=this;this.loading=!0,this.$store.dispatch("updateAccountSignature",{account:this.account,signature:this.signature}).then(function(){console.info("signature updated"),t.loading=!1}).catch(function(t){throw console.error("could not update account signature",t),t})}}},l=n(54),d=Object(l.a)(c,r,[],!1,null,null,null);d.options.__file="src/components/SignatureSettings.vue";var p=d.exports,g={name:"AccountSettings",components:{AccountForm:s.a,AppContent:o.AppContent,Content:o.Content,Navigation:u.a,SignatureSettings:p},data:function(){var t=this.$store.getters.getAccount(this.$route.params.accountId);return{account:t,signature:t.signature}},computed:{menu:function(){return this.buildMenu()},displayName:function(){return this.$store.getters.getAccount(this.$route.params.accountId).name},email:function(){return this.$store.getters.getAccount(this.$route.params.accountId).emailAddress}},methods:{onSave:function(t){return console.log("data to save:",t),this.$store.dispatch("updateAccount",Object(i.a)({},t,{accountId:this.$route.params.accountId})).then(function(t){return t}).catch(function(t){throw console.error("account update failed:",t),t})}}},m=Object(l.a)(g,a,[],!1,null,null,null);m.options.__file="src/views/AccountSettings.vue";e.default=m.exports}}]);
//# sourceMappingURL=mail.8.5d519b2d1fd8be86e18e.js.map