%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/forge/takeaseat.eco-n-tech.co.uk/.nuxt/dist/client/
Upload File :
Create Path :
Current File : //home/forge/takeaseat.eco-n-tech.co.uk/.nuxt/dist/client/98f0904.js

(window.webpackJsonp=window.webpackJsonp||[]).push([[25,11],{377:function(t,e,r){"use strict";r.r(e);var o={props:{title:{type:String,required:!0},description:{type:String,required:!1},width:{type:String,required:!1}}},l=r(10),component=Object(l.a)(o,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("section",{staticClass:"bg-gray py-8 md:py-20 px-4 md:px-8 mb-8"},[r("div",{staticClass:"max-w-xl mx-auto w-full"},[r("header",{staticClass:"text-center mb-10"},[r("h2",{staticClass:"text-2xl sm:text-3xl font-bold",class:t.description?"mb-8":""},[t._v(t._s(t.title))]),t._v(" "),t.description?r("p",{staticClass:"text-sm sm:text-base"},[t._v(t._s(t.description))]):t._e()])]),t._v(" "),r("div",{staticClass:"mx-auto w-full",class:t.width?t.width:"max-w-xl"},[t._t("default")],2)])}),[],!1,null,null,null);e.default=component.exports;installComponents(component,{Header:r(101).default})},423:function(t,e,r){"use strict";r.r(e);var o=r(0),l=(r(60),r(136),r(11),r(22),r(26),r(3),{data:function(){return{working:!1,showModal:!1,photo_url:null,file:null,selected_colour:"yellow",colours:[{name:"yellow"},{name:"green"},{name:"pink"},{name:"blue-light"},{name:"blue-medium"},{name:"orange"},{name:"green-dark"},{name:"red"},{name:"blue"},{name:"purple"}]}},computed:{user:function(){return this.$auth.user}},mounted:function(){var t=this;return Object(o.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$axios.$get("/profile").then((function(e){t.selected_colour=e.data.colour,t.photo_url=e.data.user.photo_url}));case 2:case"end":return e.stop()}}),e)})))()},methods:{handleFileChange:function(t){var e=this;return Object(o.a)(regeneratorRuntime.mark((function r(){var o,l,n;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.$refs.provider.validate(t);case 2:o=r.sent,l=o.valid,n=e.$refs.file.files[0],1==l&&(e.$refs.cropModal.show(),n&&setTimeout((function(){e.$refs.croppieRef.bind({url:URL.createObjectURL(n)})}),250));case 6:case"end":return r.stop()}}),r)})))()},crop:function(){var t=this;this.$refs.croppieRef.result({format:"jpeg"},(function(output){t.file=output,t.uploadPhoto()}))},result:function(output){this.file=output},uploadPhoto:function(){var t=this;return Object(o.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.$refs.form.validate().then((function(e){e&&(t.working=!0,t.$axios.$post("/account/profile/photo",{file:t.file}).then((function(e){t.working=!1,t.photo_url=e,t.$refs.cropModal.hide(),t.$store.dispatch("account/progress/get",{slug:"profile"}),t.$toast.success("Successfully updated your photo").goAway(1500)})).catch((function(e){t.working=!1,t.$refs.cropModal.hide(),t.$refs.form.setErrors(e.response.data.errors)})))}));case 1:case"end":return e.stop()}}),e)})))()},saveTheme:function(){var t=this;return Object(o.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.working=!0,t.$axios.$post("/profile/update",{colour:t.selected_colour}).then((function(e){t.working=!1,t.$toast.success("Successfully updated your colour").goAway(1500)}));case 2:case"end":return e.stop()}}),e)})))()}}}),n=r(10),component=Object(n.a)(l,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("Block",{attrs:{title:"Personalisation",description:"Upload a photo & choose a colour that makes you stand out"}},[r("ValidationObserver",{ref:"form"},[r("form",{attrs:{role:"form",method:"POST"},on:{submit:function(e){return e.preventDefault(),t.uploadPhoto(e)}}},[r("ValidationProvider",{ref:"provider",attrs:{rules:"image|size:10000"},scopedSlots:t._u([{key:"default",fn:function(e){e.validate;var o=e.errors;return[r("div",{staticClass:"w-full mx-auto mb-8 text-center",staticStyle:{"max-width":"170px"}},[r("label",{staticClass:"block cursor-pointer",attrs:{for:"file"}},[t.photo_url?r("div",{staticClass:"relative"},[r("div",{staticClass:"absolute top-0 left-0 w-full h-full border-15 border-opacity-50",class:"tas-border-"+t.selected_colour}),t._v(" "),r("img",{staticClass:"w-full",attrs:{src:t.photo_url,alt:t.user.data.full_name}})]):r("div",{staticClass:"w-full flex items-center justify-center border-2 border-dashed border-black border-opacity-20 rounded-md",staticStyle:{height:"170px"}},[r("span",{staticClass:"text-sm text-black"},[t._v("Click to upload")])]),t._v(" "),r("input",{ref:"file",staticClass:"hidden",attrs:{type:"file",id:"file",accept:"image/*"},on:{change:function(e){return t.handleFileChange()}}}),t._v(" "),r("span",{staticClass:"mt-4 block uppercase text-blue-light"},[t._v("Upload Photo")])]),t._v(" "),o[0]?r("span",{staticClass:"field-invalid"},[t._v(t._s(o[0]))]):t._e()]),t._v(" "),r("t-modal",{ref:"cropModal",attrs:{header:"Crop & Upload"},scopedSlots:t._u([{key:"footer",fn:function(){return[r("div",{staticClass:"flex flex-wrap justify-between"},[r("button",{staticClass:"btn btn-small btn-primary",attrs:{type:"button"},on:{click:function(e){return t.$refs.cropModal.hide()}}},[t._v("\n                Cancel\n              ")]),t._v(" "),r("button",{staticClass:"btn btn-small btn-primary",attrs:{type:"button"},on:{click:function(e){return t.crop()}}},[0==t.working?r("span",[t._v("Crop & Upload")]):r("span",{staticClass:"flex items-center justify-center"},[r("svg",{staticClass:"animate-spin -ml-1 mr-3 h-5 w-5 text-current",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"}},[r("circle",{staticClass:"opacity-25",attrs:{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}}),t._v(" "),r("path",{staticClass:"opacity-75",attrs:{fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"}})]),t._v(" "),r("span",[t._v("Processing")])])])])]},proxy:!0}],null,!0)},[r("vue-croppie",{ref:"croppieRef",attrs:{enableOrientation:!0,enableResize:!1,boundary:{width:270,height:270},viewport:{width:250,height:250}},on:{result:t.result}})],1)]}}])})],1)]),t._v(" "),r("div",{staticClass:"grid grid-cols-1 sm:grid-cols-4 bg-black mb-8"},[r("div",{staticClass:"relative col-span-1"},[r("div",{staticClass:"absolute top-0 left-0 w-full h-full border-10 border-opacity-75",class:"tas-border-"+t.selected_colour}),t._v(" "),r("img",{staticClass:"w-full",attrs:{src:t.photo_url,alt:t.user.data.full_name}})]),t._v(" "),r("div",{staticClass:"sm:col-span-3 py-6 sm:py-0 flex flex-col items-center justify-center"},[r("span",{staticClass:"text-5xl text-white ",class:"tas-text-"+t.selected_colour},[t._v(t._s(t.user.data.first_name))]),t._v(" "),r("span",{staticClass:"uppercase text-xl text-white"},[t._v(t._s(t.user.data.last_name))])])]),t._v(" "),r("t-input-group",{attrs:{label:"Colour Options"}},[r("div",{staticClass:"grid grid-cols-4 sm:grid-cols-5 gap-5 sm:gap-10 mb-10 pt-3"},t._l(t.colours,(function(e,o){return r("div",{key:o,staticClass:"flex items-center justify-center"},[r("label",{staticClass:"flex items-center justify-center relative w-10 h-10 rounded cursor-pointer",class:"tas-bg-"+e.name},[e.name==t.selected_colour?r("svg",{staticClass:"text-white w-8 h-8",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"}},[r("path",{attrs:{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"}})]):t._e(),t._v(" "),r("input",{directives:[{name:"model",rawName:"v-model",value:t.selected_colour,expression:"selected_colour"}],staticClass:"absolute top-0 left-0 w-full h-full hidden",attrs:{name:"colours",type:"radio"},domProps:{value:e.name,checked:t._q(t.selected_colour,e.name)},on:{change:[function(r){t.selected_colour=e.name},t.saveTheme]}})])])})),0)])],1)}),[],!1,null,null,null);e.default=component.exports;installComponents(component,{Block:r(377).default})}}]);

Zerion Mini Shell 1.0