nextcloud/apps/user_status/js/user-status-modal.js

2 lines
20 KiB
JavaScript

(window.webpackJsonpUserStatus=window.webpackJsonpUserStatus||[]).push([[2],{465:function(n,t,e){"use strict";var s=e(90),a=e.n(s),r=e(91),i=e.n(r)()(a.a);i.push([n.i,".predefined-status[data-v-2af0cabf]{display:flex;flex-wrap:nowrap;justify-content:flex-start;flex-basis:100%;border-radius:var(--border-radius);align-items:center;min-height:44px}.predefined-status[data-v-2af0cabf]:hover,.predefined-status[data-v-2af0cabf]:focus{background-color:var(--color-background-hover)}.predefined-status__icon[data-v-2af0cabf]{flex-basis:40px;text-align:center}.predefined-status__message[data-v-2af0cabf]{font-weight:bold;padding:0 6px}.predefined-status__clear-at[data-v-2af0cabf]{opacity:.7}.predefined-status__clear-at[data-v-2af0cabf]::before{content:' - '}\n","",{version:3,sources:["webpack://./apps/user_status/src/components/PredefinedStatus.vue"],names:[],mappings:"AA8EA,oCACC,YAAa,CACb,gBAAiB,CACjB,0BAA2B,CAC3B,eAAgB,CAChB,kCAAmC,CACnC,kBAAmB,CACnB,eAAgB,CAPjB,oFAWE,8CAA+C,CAC/C,0CAGA,eAAgB,CAChB,iBAAkB,CAClB,6CAGA,gBAAiB,CACjB,aAAc,CACd,8CAGA,UAAW,CADX,sDAIC,aAAc",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.predefined-status {\n\tdisplay: flex;\n\tflex-wrap: nowrap;\n\tjustify-content: flex-start;\n\tflex-basis: 100%;\n\tborder-radius: var(--border-radius);\n\talign-items: center;\n\tmin-height: 44px;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: var(--color-background-hover);\n\t}\n\n\t&__icon {\n\t\tflex-basis: 40px;\n\t\ttext-align: center;\n\t}\n\n\t&__message {\n\t\tfont-weight: bold;\n\t\tpadding: 0 6px;\n\t}\n\n\t&__clear-at {\n\t\topacity: .7;\n\n\t\t&::before {\n\t\t\tcontent: ' - ';\n\t\t}\n\t}\n}\n"],sourceRoot:""}]),t.a=i},466:function(n,t,e){"use strict";var s=e(90),a=e.n(s),r=e(91),i=e.n(r)()(a.a);i.push([n.i,".predefined-statuses-list[data-v-3b99f880]{display:flex;flex-direction:column;margin-bottom:10px}\n","",{version:3,sources:["webpack://./apps/user_status/src/components/PredefinedStatusesList.vue"],names:[],mappings:"AAoFA,2CACC,YAAa,CACb,qBAAsB,CACtB,kBAAmB",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.predefined-statuses-list {\n\tdisplay: flex;\n\tflex-direction: column;\n\tmargin-bottom: 10px;\n}\n"],sourceRoot:""}]),t.a=i},467:function(n,t,e){"use strict";var s=e(90),a=e.n(s),r=e(91),i=e.n(r)()(a.a);i.push([n.i,".custom-input__form[data-v-38e098a9]{flex-grow:1}.custom-input__form input[data-v-38e098a9]{width:100%;border-radius:0 var(--border-radius) var(--border-radius) 0}\n","",{version:3,sources:["webpack://./apps/user_status/src/components/CustomMessageInput.vue"],names:[],mappings:"AA0EA,qCACC,WAAY,CADb,2CAIE,UAAW,CACX,2DAA4D",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.custom-input__form {\n\tflex-grow: 1;\n\n\tinput {\n\t\twidth: 100%;\n\t\tborder-radius: 0 var(--border-radius) var(--border-radius) 0;\n\t}\n}\n"],sourceRoot:""}]),t.a=i},477:function(n,t,e){"use strict";var s=e(90),a=e.n(s),r=e(91),i=e.n(r)()(a.a);i.push([n.i,".clear-at-select[data-v-44cd4ace]{display:flex;margin-bottom:10px;align-items:center}.clear-at-select__label[data-v-44cd4ace]{margin-right:10px}.clear-at-select .multiselect[data-v-44cd4ace]{flex-grow:1}\n","",{version:3,sources:["webpack://./apps/user_status/src/components/ClearAtSelect.vue"],names:[],mappings:"AAwFA,kCACC,YAAa,CACb,kBAAmB,CACnB,kBAAmB,CAEnB,yCACC,iBAAkB,CANpB,+CAUE,WAAY",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.clear-at-select {\n\tdisplay: flex;\n\tmargin-bottom: 10px;\n\talign-items: center;\n\n\t&__label {\n\t\tmargin-right: 10px;\n\t}\n\n\t.multiselect {\n\t\tflex-grow: 1;\n\t}\n}\n"],sourceRoot:""}]),t.a=i},478:function(n,t,e){"use strict";var s=e(90),a=e.n(s),r=e(91),i=e.n(r)()(a.a);i.push([n.i,".user-status-online-select__input[data-v-d5c541dc]{position:absolute;top:auto;left:-10000px;overflow:hidden;width:1px;height:1px}.user-status-online-select__label[data-v-d5c541dc]{display:block;margin:8px;padding:8px;padding-left:40px;border:2px solid var(--color-main-background);border-radius:var(--border-radius-large);background-color:var(--color-background-hover);background-position:8px center;background-size:24px}.user-status-online-select__label span[data-v-d5c541dc],.user-status-online-select__label[data-v-d5c541dc]{cursor:pointer}.user-status-online-select__input:checked+.user-status-online-select__label[data-v-d5c541dc],.user-status-online-select__input:focus+.user-status-online-select__label[data-v-d5c541dc],.user-status-online-select__label[data-v-d5c541dc]:hover{border-color:var(--color-primary)}.user-status-online-select__subline[data-v-d5c541dc]{display:block;color:var(--color-text-lighter)}\n","",{version:3,sources:["webpack://./apps/user_status/src/components/OnlineStatusSelect.vue"],names:[],mappings:"AAmFC,mDACC,iBAAkB,CAClB,QAAS,CACT,aAAc,CACd,eAAgB,CAChB,SAAU,CACV,UAAW,CACX,mDAGA,aAAc,CACd,UAfiB,CAgBjB,WAhBiB,CAiBjB,iBAA6C,CAC7C,6CAA8C,CAC9C,wCAAyC,CACzC,8CAA+C,CAC/C,8BAA0C,CAC1C,oBAvBc,CAcd,2GAaC,cAAe,CACf,iPAMD,iCAAkC,CAClC,qDAGA,aAAc,CACd,+BAAgC",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n$icon-size: 24px;\n$label-padding: 8px;\n\n.user-status-online-select {\n\t// Inputs are here for keyboard navigation, they are not visually visible\n\t&__input {\n\t\tposition: absolute;\n\t\ttop: auto;\n\t\tleft: -10000px;\n\t\toverflow: hidden;\n\t\twidth: 1px;\n\t\theight: 1px;\n\t}\n\n\t&__label {\n\t\tdisplay: block;\n\t\tmargin: $label-padding;\n\t\tpadding: $label-padding;\n\t\tpadding-left: $icon-size + $label-padding * 2;\n\t\tborder: 2px solid var(--color-main-background);\n\t\tborder-radius: var(--border-radius-large);\n\t\tbackground-color: var(--color-background-hover);\n\t\tbackground-position: $label-padding center;\n\t\tbackground-size: $icon-size;\n\n\t\tspan,\n\t\t& {\n\t\t\tcursor: pointer;\n\t\t}\n\t}\n\n\t&__input:checked + &__label,\n\t&__input:focus + &__label,\n\t&__label:hover {\n\t\tborder-color: var(--color-primary);\n\t}\n\n\t&__subline {\n\t\tdisplay: block;\n\t\tcolor: var(--color-text-lighter);\n\t}\n}\n\n"],sourceRoot:""}]),t.a=i},479:function(n,t,e){"use strict";var s=e(90),a=e.n(s),r=e(91),i=e.n(r)()(a.a);i.push([n.i,".set-status-modal[data-v-5b6a92a6]{min-width:500px;min-height:200px;padding:8px 20px 20px 20px;max-height:70vh;overflow:auto}.set-status-modal__header[data-v-5b6a92a6]{text-align:center;font-weight:bold}.set-status-modal__online-status[data-v-5b6a92a6]{display:grid;margin-bottom:40px;grid-template-columns:1fr 1fr}.set-status-modal__custom-input[data-v-5b6a92a6]{display:flex;width:100%;margin-bottom:10px}.set-status-modal__custom-input .custom-input__emoji-button[data-v-5b6a92a6]{flex-basis:40px;flex-grow:0;width:40px;height:34px;margin-right:0;border-right:none;border-radius:var(--border-radius) 0 0 var(--border-radius)}.set-status-modal .status-buttons[data-v-5b6a92a6]{display:flex}.set-status-modal .status-buttons button[data-v-5b6a92a6]{flex-basis:50%}\n","",{version:3,sources:["webpack://./apps/user_status/src/components/SetStatusModal.vue"],names:[],mappings:"AA+OA,mCACC,eAAgB,CAChB,gBAAiB,CACjB,0BAA2B,CAE3B,eAAgB,CAChB,aAAc,CAEd,2CACC,iBAAkB,CAClB,gBAAiB,CACjB,kDAGA,YAAa,CAEb,kBAAmB,CACnB,6BAA8B,CAC9B,iDAGA,YAAa,CACb,UAAW,CACX,kBAAmB,CAHnB,6EAMC,eAAgB,CAChB,WAAY,CACZ,UAAW,CACX,WAAY,CACZ,cAAe,CACf,iBAAkB,CAClB,2DAA4D,CAhC/D,mDAqCE,YAAa,CArCf,0DAwCG,cAAe",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.set-status-modal {\n\tmin-width: 500px;\n\tmin-height: 200px;\n\tpadding: 8px 20px 20px 20px;\n\t// Enable scrollbar for too long content, same way as in Dashboard customize\n\tmax-height: 70vh;\n\toverflow: auto;\n\n\t&__header {\n\t\ttext-align: center;\n\t\tfont-weight: bold;\n\t}\n\n\t&__online-status {\n\t\tdisplay: grid;\n\t\t// Space between the two sections\n\t\tmargin-bottom: 40px;\n\t\tgrid-template-columns: 1fr 1fr;\n\t}\n\n\t&__custom-input {\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t\tmargin-bottom: 10px;\n\n\t\t.custom-input__emoji-button {\n\t\t\tflex-basis: 40px;\n\t\t\tflex-grow: 0;\n\t\t\twidth: 40px;\n\t\t\theight: 34px;\n\t\t\tmargin-right: 0;\n\t\t\tborder-right: none;\n\t\t\tborder-radius: var(--border-radius) 0 0 var(--border-radius);\n\t\t}\n\t}\n\n\t.status-buttons {\n\t\tdisplay: flex;\n\n\t\tbutton {\n\t\t\tflex-basis: 50%;\n\t\t}\n\t}\n}\n\n"],sourceRoot:""}]),t.a=i},480:function(n,t,e){"use strict";e.r(t);var s=e(395),a=e(460),r=e.n(a),i=e(463),o=e.n(i),u=e(256),l=e(394),c=e(86),d=e.n(c),p=e(396),A=function(n){if(null===n)return Object(u.translate)("user_status","Don't clear");if("end-of"===n.type)switch(n.time){case"day":return Object(u.translate)("user_status","Today");case"week":return Object(u.translate)("user_status","This week");default:return null}if("period"===n.type)return d.a.duration(1e3*n.time).humanize();if("_time"===n.type){var t=d()(Object(p.a)()),e=d()(n.time,"X");return d.a.duration(t.diff(e)).humanize()}return null},b={name:"PredefinedStatus",filters:{clearAtFilter:A},props:{messageId:{type:String,required:!0},icon:{type:String,required:!0},message:{type:String,required:!0},clearAt:{type:Object,required:!1,default:null}},methods:{select:function(){this.$emit("select")}}},f=e(89),m=e.n(f),C=e(465),g={insert:"head",singleton:!1},_=(m()(C.a,g),C.a.locals,e(92)),h=Object(_.a)(b,(function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("div",{staticClass:"predefined-status",attrs:{tabindex:"0"},on:{keyup:[function(t){return!t.type.indexOf("key")&&n._k(t.keyCode,"enter",13,t.key,"Enter")?null:n.select(t)},function(t){return!t.type.indexOf("key")&&n._k(t.keyCode,"space",32,t.key,[" ","Spacebar"])?null:n.select(t)}],click:n.select}},[e("span",{staticClass:"predefined-status__icon"},[n._v("\n\t\t"+n._s(n.icon)+"\n\t")]),n._v(" "),e("span",{staticClass:"predefined-status__message"},[n._v("\n\t\t"+n._s(n.message)+"\n\t")]),n._v(" "),e("span",{staticClass:"predefined-status__clear-at"},[n._v("\n\t\t"+n._s(n._f("clearAtFilter")(n.clearAt))+"\n\t")])])}),[],!1,null,"2af0cabf",null).exports,v=e(251);function x(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),e.push.apply(e,s)}return e}function y(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?x(Object(e),!0).forEach((function(t){S(n,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):x(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}function S(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var B={name:"PredefinedStatusesList",components:{PredefinedStatus:h},computed:y(y({},Object(v.b)({predefinedStatuses:function(n){return n.predefinedStatuses.predefinedStatuses}})),{},{hasLoaded:function(){return this.predefinedStatuses.length>0}}),mounted:function(){this.$store.dispatch("loadAllPredefinedStatuses")},methods:{selectStatus:function(n){this.$emit("selectStatus",n)}}},k=e(466),w={insert:"head",singleton:!1},O=(m()(k.a,w),k.a.locals,Object(_.a)(B,(function(){var n=this,t=n.$createElement,e=n._self._c||t;return n.hasLoaded?e("div",{staticClass:"predefined-statuses-list"},n._l(n.predefinedStatuses,(function(t){return e("PredefinedStatus",{key:t.id,attrs:{"message-id":t.id,icon:t.icon,message:t.message,"clear-at":t.clearAt},on:{select:function(e){return n.selectStatus(t)}}})})),1):e("div",{staticClass:"predefined-statuses-list"},[e("div",{staticClass:"icon icon-loading-small"})])}),[],!1,null,"3b99f880",null).exports),j={name:"CustomMessageInput",props:{message:{type:String,required:!0,default:function(){return""}},disabled:{type:Boolean,default:!1}},methods:{focus:function(){this.$refs.input.focus()},change:function(n){this.$emit("change",n.target.value)},submit:function(n){this.$emit("submit",n.target.value)}}},$=e(467),P={insert:"head",singleton:!1},M=(m()($.a,P),$.a.locals,Object(_.a)(j,(function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("form",{staticClass:"custom-input__form",on:{submit:function(n){n.preventDefault()}}},[e("input",{ref:"input",attrs:{maxlength:"80",disabled:n.disabled,placeholder:n.$t("user_status","What's your status?"),type:"text"},domProps:{value:n.message},on:{change:n.change,keyup:[n.change,function(t){return!t.type.indexOf("key")&&n._k(t.keyCode,"enter",13,t.key,"Enter")?null:n.submit(t)}],paste:n.change}})])}),[],!1,null,"38e098a9",null).exports),D=e(468),E={name:"ClearAtSelect",components:{Multiselect:e.n(D).a},props:{clearAt:{type:Object,default:null}},data:function(){return{options:[{label:Object(u.translate)("user_status","Don't clear"),clearAt:null},{label:Object(u.translate)("user_status","30 minutes"),clearAt:{type:"period",time:1800}},{label:Object(u.translate)("user_status","1 hour"),clearAt:{type:"period",time:3600}},{label:Object(u.translate)("user_status","4 hours"),clearAt:{type:"period",time:14400}},{label:Object(u.translate)("user_status","Today"),clearAt:{type:"end-of",time:"day"}},{label:Object(u.translate)("user_status","This week"),clearAt:{type:"end-of",time:"week"}}]}},computed:{option:function(){return{clearAt:this.clearAt,label:A(this.clearAt)}}},methods:{select:function(n){n&&this.$emit("selectClearAt",n.clearAt)}}},I=e(477),q={insert:"head",singleton:!1},W=(m()(I.a,q),I.a.locals,Object(_.a)(E,(function(){var n=this.$createElement,t=this._self._c||n;return t("div",{staticClass:"clear-at-select"},[t("span",{staticClass:"clear-at-select__label"},[this._v("\n\t\t"+this._s(this.$t("user_status","Clear status message after"))+"\n\t")]),this._v(" "),t("Multiselect",{attrs:{label:"label",value:this.option,options:this.options,"open-direction":"top"},on:{select:this.select}})],1)}),[],!1,null,"44cd4ace",null).exports),z={name:"OnlineStatusSelect",props:{checked:{type:Boolean,default:!1},icon:{type:String,required:!0},type:{type:String,required:!0},label:{type:String,required:!0},subline:{type:String,default:null}},computed:{id:function(){return"user-status-online-status-".concat(this.type)}},methods:{onChange:function(){this.$emit("select",this.type)}}},R=e(478),U={insert:"head",singleton:!1},Y=(m()(R.a,U),R.a.locals,Object(_.a)(z,(function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("div",{staticClass:"user-status-online-select"},[e("input",{staticClass:"user-status-online-select__input",attrs:{id:n.id,type:"radio",name:"user-status-online"},domProps:{checked:n.checked},on:{change:n.onChange}}),n._v(" "),e("label",{staticClass:"user-status-online-select__label",class:n.icon,attrs:{for:n.id}},[n._v("\n\t\t"+n._s(n.label)+"\n\t\t"),e("em",{staticClass:"user-status-online-select__subline"},[n._v(n._s(n.subline))])])])}),[],!1,null,"d5c541dc",null).exports);function G(n,t,e,s,a,r,i){try{var o=n[r](i),u=o.value}catch(n){return void e(n)}o.done?t(u):Promise.resolve(u).then(s,a)}function T(n){return function(){var t=this,e=arguments;return new Promise((function(s,a){var r=n.apply(t,e);function i(n){G(r,s,a,i,o,"next",n)}function o(n){G(r,s,a,i,o,"throw",n)}i(void 0)}))}}var F={name:"SetStatusModal",components:{ClearAtSelect:W,CustomMessageInput:M,EmojiPicker:r.a,Modal:o.a,OnlineStatusSelect:Y,PredefinedStatusesList:O},mixins:[l.a],data:function(){return{clearAt:null,icon:null,message:"",isSavingStatus:!1,statuses:[{type:"online",label:Object(u.translate)("user_status","Online"),icon:"icon-user-status-online"},{type:"away",label:Object(u.translate)("user_status","Away"),icon:"icon-user-status-away"},{type:"dnd",label:Object(u.translate)("user_status","Do not disturb"),subline:Object(u.translate)("user_status","Mute all notifications"),icon:"icon-user-status-dnd"},{type:"invisible",label:Object(u.translate)("user_status","Invisible"),subline:Object(u.translate)("user_status","Appear offline"),icon:"icon-user-status-invisible"}]}},computed:{visibleIcon:function(){return this.icon||"😀"}},mounted:function(){this.messageId=this.$store.state.userStatus.messageId,this.icon=this.$store.state.userStatus.icon,this.message=this.$store.state.userStatus.message||"",null!==this.$store.state.userStatus.clearAt&&(this.clearAt={type:"_time",time:this.$store.state.userStatus.clearAt})},methods:{closeModal:function(){this.$emit("close")},setIcon:function(n){var t=this;this.messageId=null,this.icon=n,this.$nextTick((function(){t.$refs.customMessageInput.focus()}))},setMessage:function(n){this.messageId=null,this.message=n},setClearAt:function(n){this.clearAt=n},selectPredefinedMessage:function(n){this.messageId=n.id,this.clearAt=n.clearAt,this.icon=n.icon,this.message=n.message},saveStatus:function(){var n=this;return T(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n.isSavingStatus){t.next=2;break}return t.abrupt("return");case 2:if(t.prev=2,n.isSavingStatus=!0,null===n.messageId){t.next=9;break}return t.next=7,n.$store.dispatch("setPredefinedMessage",{messageId:n.messageId,clearAt:n.clearAt});case 7:t.next=11;break;case 9:return t.next=11,n.$store.dispatch("setCustomMessage",{message:n.message,icon:n.icon,clearAt:n.clearAt});case 11:t.next=19;break;case 13:return t.prev=13,t.t0=t.catch(2),Object(s.a)(n.$t("user_status","There was an error saving the status")),console.debug(t.t0),n.isSavingStatus=!1,t.abrupt("return");case 19:n.isSavingStatus=!1,n.closeModal();case 21:case"end":return t.stop()}}),t,null,[[2,13]])})))()},clearStatus:function(){var n=this;return T(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,n.isSavingStatus=!0,t.next=4,n.$store.dispatch("clearMessage");case 4:t.next=12;break;case 6:return t.prev=6,t.t0=t.catch(0),Object(s.a)(n.$t("user_status","There was an error clearing the status")),console.debug(t.t0),n.isSavingStatus=!1,t.abrupt("return");case 12:n.isSavingStatus=!1,n.closeModal();case 14:case"end":return t.stop()}}),t,null,[[0,6]])})))()}}},L=e(479),X={insert:"head",singleton:!1},J=(m()(L.a,X),L.a.locals,Object(_.a)(F,(function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("Modal",{attrs:{size:"normal",title:n.$t("user_status","Set status")},on:{close:n.closeModal}},[e("div",{staticClass:"set-status-modal"},[e("div",{staticClass:"set-status-modal__header"},[e("h3",[n._v(n._s(n.$t("user_status","Online status")))])]),n._v(" "),e("div",{staticClass:"set-status-modal__online-status"},n._l(n.statuses,(function(t){return e("OnlineStatusSelect",n._b({key:t.type,attrs:{checked:t.type===n.statusType},on:{select:n.changeStatus}},"OnlineStatusSelect",t,!1))})),1),n._v(" "),e("div",{staticClass:"set-status-modal__header"},[e("h3",[n._v(n._s(n.$t("user_status","Status message")))])]),n._v(" "),e("div",{staticClass:"set-status-modal__custom-input"},[e("EmojiPicker",{on:{select:n.setIcon}},[e("button",{staticClass:"custom-input__emoji-button"},[n._v("\n\t\t\t\t\t"+n._s(n.visibleIcon)+"\n\t\t\t\t")])]),n._v(" "),e("CustomMessageInput",{ref:"customMessageInput",attrs:{message:n.message},on:{change:n.setMessage,submit:n.saveStatus}})],1),n._v(" "),e("PredefinedStatusesList",{on:{selectStatus:n.selectPredefinedMessage}}),n._v(" "),e("ClearAtSelect",{attrs:{"clear-at":n.clearAt},on:{selectClearAt:n.setClearAt}}),n._v(" "),e("div",{staticClass:"status-buttons"},[e("button",{staticClass:"status-buttons__select",attrs:{disabled:n.isSavingStatus},on:{click:n.clearStatus}},[n._v("\n\t\t\t\t"+n._s(n.$t("user_status","Clear status message"))+"\n\t\t\t")]),n._v(" "),e("button",{staticClass:"status-buttons__primary primary",attrs:{disabled:n.isSavingStatus},on:{click:n.saveStatus}},[n._v("\n\t\t\t\t"+n._s(n.$t("user_status","Set status message"))+"\n\t\t\t")])])],1)])}),[],!1,null,"5b6a92a6",null));t.default=J.exports}}]);
//# sourceMappingURL=user-status-modal.js.map?v=4bc45b2e43f5bccb3c40