Skip to content
Snippets Groups Projects
Commit 012ade47 authored by Trirst's avatar Trirst
Browse files

Update new build (Fix)

parent 3c2ebdc9
Branches
No related tags found
No related merge requests found
#image-container[data-v-198eb460]{position:relative}img[data-v-198eb460]{height:100%;width:100%}#checkmark[data-v-198eb460]{font-family:Lucida Console,monospace;font-weight:700;color:#fff;background:#d12727;position:absolute;top:.4em;left:.4em;padding:.4em .6em}#list-container[data-v-5e7dae37]{width:100%;display:flex;flex-direction:row;flex-wrap:wrap;position:relative}#item-container[data-v-5e7dae37]{max-width:20%;display:flex;flex-direction:column}button[data-v-5e7dae37]{position:fixed;bottom:1em;right:1em;padding:1em 1em;background:#add8e6;color:#2f2a2a}[v-cloak][data-v-c28ab3e2]{display:none}.login-button[data-v-43e19d24]{margin-left:.5rem;display:inline-block;stroke:currentColor;--tw-text-opacity:1;color:rgba(75,85,99,var(--tw-text-opacity))}.login-button[data-v-43e19d24]:hover{--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity))}#user-section[data-v-2cbece45]{display:flex;flex-flow:column;position:sticky;top:0;height:100vh}#home-container[data-v-2cbece45]{display:flex;flex-flow:row}img[data-v-086aeb6a]{height:100%}#image-container[data-v-086aeb6a]{height:100vh;display:flex;justify-content:center}
/*! tailwindcss v2.2.4 | MIT License | https://tailwindcss.com */
/*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */html{-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji}hr{height:0;color:inherit}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],button{-webkit-appearance:button}legend{padding:0}progress{vertical-align:baseline}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:transparent;background-image:none}fieldset,ol,ul{margin:0;padding:0}ol,ul{list-style:none}html{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{font-family:inherit;line-height:inherit}*,:after,:before{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}*,:after,:before{--tw-border-opacity:1;border-color:rgba(229,231,235,var(--tw-border-opacity))}.absolute{position:absolute}.relative{position:relative}.right-0{right:0}.right-0\.5{right:.125rem}.bottom-0{bottom:0}.bottom-0\.5{bottom:.125rem}.z-10{z-index:10}.m-2{margin:.5rem}.m-4{margin:1rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.ml-1{margin-left:.25rem}.inline-block{display:inline-block}.flex{display:flex}.table{display:table}.h-full{height:100%}.w-1\/4{width:25%}.w-full{width:100%}@-webkit-keyframes spin{to{transform:rotate(1turn)}}@keyframes spin{to{transform:rotate(1turn)}}@-webkit-keyframes ping{75%,to{transform:scale(2);opacity:0}}@keyframes ping{75%,to{transform:scale(2);opacity:0}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}@keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.justify-center{justify-content:center}.rounded{border-radius:.25rem}.border-4{border-width:4px}.border{border-width:1px}.border-dotted{border-style:dotted}.border-transparent{border-color:transparent}.border-gray-400{--tw-border-opacity:1;border-color:rgba(156,163,175,var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity:1;border-color:rgba(107,114,128,var(--tw-border-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity:1;background-color:rgba(248,113,113,var(--tw-bg-opacity))}.hover\:bg-gray-800:hover{--tw-bg-opacity:1;background-color:rgba(31,41,55,var(--tw-bg-opacity))}.stroke-current{stroke:currentColor}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-12{padding:3rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.font-semibold{font-weight:600}.text-gray-50{--tw-text-opacity:1;color:rgba(249,250,251,var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgba(75,85,99,var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgba(220,38,38,var(--tw-text-opacity))}.hover\:text-gray-100:hover{--tw-text-opacity:1;color:rgba(243,244,246,var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity:1;color:rgba(75,85,99,var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgba(55,65,81,var(--tw-text-opacity))}.hover\:text-gray-800:hover{--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity))}.opacity-0{opacity:0}.opacity-25{opacity:.25}.disabled\:opacity-40:disabled,.opacity-40{opacity:.4}*,:after,:before{--tw-shadow:0 0 transparent}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 rgba(0,0,0,0.06);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}*,:after,:before{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,0.5);--tw-ring-offset-shadow:0 0 transparent;--tw-ring-shadow:0 0 transparent}.focus\:ring-2:focus,.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}.ring-red-500{--tw-ring-opacity:1;--tw-ring-color:rgba(239,68,68,var(--tw-ring-opacity))}.focus\:ring-gray-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgba(156,163,175,var(--tw-ring-opacity))}
\ No newline at end of file
(function(e){function t(t){for(var n,s,o=t[0],c=t[1],u=t[2],d=0,h=[];d<o.length;d++)s=o[d],Object.prototype.hasOwnProperty.call(r,s)&&r[s]&&h.push(r[s][0]),r[s]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);l&&l(t);while(h.length)h.shift()();return i.push.apply(i,u||[]),a()}function a(){for(var e,t=0;t<i.length;t++){for(var a=i[t],n=!0,o=1;o<a.length;o++){var c=a[o];0!==r[c]&&(n=!1)}n&&(i.splice(t--,1),e=s(s.s=a[0]))}return e}var n={},r={app:0},i=[];function s(t){if(n[t])return n[t].exports;var a=n[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,s),a.l=!0,a.exports}s.m=e,s.c=n,s.d=function(e,t,a){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},s.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(s.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)s.d(a,n,function(t){return e[t]}.bind(null,n));return a},s.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="/web/";var o=window["webpackJsonp"]=window["webpackJsonp"]||[],c=o.push.bind(o);o.push=t,o=o.slice();for(var u=0;u<o.length;u++)t(o[u]);var l=c;i.push([0,"chunk-vendors"]),a()})({0:function(e,t,a){e.exports=a("56d7")},"00f7":function(e,t,a){},"08fa":function(e,t,a){"use strict";a("3bd5")},"26ff":function(e,t,a){"use strict";a("e686")},"2e88":function(e,t,a){"use strict";a("c678")},"3bd5":function(e,t,a){},"56d7":function(e,t,a){"use strict";a.r(t);a("e260"),a("e6cf"),a("cca6"),a("a79d");var n=a("2b0e"),r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"app"}},[a("router-view")],1)},i=[],s=a("2877"),o={},c=Object(s["a"])(o,r,i,!1,null,null,null),u=c.exports,l=a("8c4f"),d=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"home-container"}},[a("section",{staticClass:"w-1/4",attrs:{id:"user-section"}},[a("div",[a("ImageUpload"),a("TagCreation"),a("UserAuthentication",{staticClass:"absolute bottom-0"})],1)]),a("ImageList",{attrs:{hashArray:e.stateHashArray}})],1)},h=[],g=a("1da1"),p=a("5530"),f=(a("96cf"),a("d3b7"),function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{attrs:{id:"list-container"}},[e._l(e.hashArray,(function(t,n){return a("div",{key:n,attrs:{id:"item-container"}},[a("ImageItem",{attrs:{hash:t},on:{checked:e.appendToDeleteArray}})],1)})),a("button",{directives:[{name:"show",rawName:"v-show",value:e.deleteArray.length,expression:"deleteArray.length"}],on:{click:function(t){return e.deleteImages(e.deleteArray)}}},[e._v(" Delete ")])],2)}),m=[],v=(a("a434"),function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"image-container"},on:{click:function(t){return t.ctrlKey&&t.shiftKey?t.altKey||t.metaKey?null:(e.checked=!e.checked,void e.$emit("checked",e.checked,e.hash)):null}}},[a("div",{directives:[{name:"show",rawName:"v-show",value:e.checked,expression:"checked"}],attrs:{id:"checkmark"},on:{click:function(t){e.checked=!e.checked,e.$emit("checked",e.checked,e.hash)}}},[e._v(" X ")]),a("router-link",{attrs:{to:"/image/"+e.hash},nativeOn:{click:function(e){return e.ctrlKey&&e.shiftKey?void e.preventDefault():null}}},[a("img",{attrs:{src:"/api/image/"+e.hash+"/file"}})])],1)}),y=[],b={data:function(){return{checked:!1}},props:{hash:{required:!0}},methods:{}},_=b,k=(a("a9dd"),Object(s["a"])(_,v,y,!1,null,"198eb460",null)),w=k.exports,x=a("2f62"),O={components:{ImageItem:w},data:function(){return{deleteArray:[]}},props:{hashArray:{required:!0}},computed:Object(p["a"])({},Object(x["c"])(["stateUser"])),methods:{appendToDeleteArray:function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];var n=t[0],r=t[1];n?this.deleteArray.push(r):this.deleteArray.splice(this.deleteArray.indexOf(r),1)},deleteImages:function(e){for(var t={method:"DELETE",headers:{secret:this.stateUser.secret}},a=0;a<e.length;a++)fetch("/api/image/".concat(e[a]),t);this.deleteArray=[]}}},j=O,A=(a("c6d3"),Object(s["a"])(j,f,m,!1,null,"5e7dae37",null)),T=A.exports,I=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"flex flex-col justify-center"},[a("div",{staticClass:"p-12 m-4 border-dotted border-4 border-gray-400",on:{drop:function(t){t.preventDefault(),e.updateImageListDrop(t),t.currentTarget.classList.remove("bg-gray-200")},dragover:function(e){return e.preventDefault(),e.currentTarget.classList.add("bg-gray-200")},dragleave:function(e){return e.preventDefault(),e.currentTarget.classList.remove("bg-gray-200")}}},[a("div",{staticClass:"relative"},[a("input",{ref:"imageInput",staticClass:"h-full w-full opacity-0 absolute z-10 cursor-pointer",attrs:{type:"file",accept:"image/png, image/jpeg, image/gif",multiple:""},on:{change:function(t){e.updateImageList(),e.checkImageType()}}}),a("div",{staticClass:"font-semibold text-sm opacity-25 relative"},[e._v(" Drag and drop images here or click here to browse. ")])])]),e.imageList.length?a("ul",{},e._l(e.imageList,(function(t,n){return a("li",{key:n,staticClass:"text-gray-600 hover:text-gray-700 font-semibold cursor-pointer",on:{click:function(a){e.removeImage(e.imageList.indexOf(t))}}},[e._v(" "+e._s(t.name)+" ")])})),0):e._e(),a("button",{staticClass:"\n border border-gray-500\n p-2\n rounded\n mx-auto\n font-semibold\n text-gray-800\n hover:bg-gray-800\n hover:text-gray-100\n disabled:opacity-40\n ",attrs:{disabled:e.notImage||e.noImage},on:{click:e.submitImage}},[e._v(" Submit ")]),e.notImage?a("div",[e._v(" One or more files is possibly not image type. Please upload images only. ")]):e._e()])},C=[],S=a("2909"),U={data:function(){return{imageList:[],notImage:!1}},computed:Object(p["a"])({noImage:function(){return!this.imageList.length}},Object(x["c"])(["stateUser"])),methods:Object(p["a"])({updateImageList:function(){this.imageList=Object(S["a"])(this.$refs.imageInput.files)},updateImageListDrop:function(e){this.imageList=Object(S["a"])(e.dataTransfer.files)},removeImage:function(e){this.imageList.splice(e,1)},checkImageType:function(){this.notImage=!1;for(var e=["image/png","image/jpeg","image/gif"],t=0;t<this.imageList.length;t++)if(-1===e.indexOf(this.imageList[t].type)){this.notImage=!0;break}},submitImage:function(){for(var e=new FormData,t=0;t<this.imageList.length;t++)e.set("image",this.imageList[t]),this.postImage(e);this.imageList=[]},postImage:function(e){var t=this;return Object(g["a"])(regeneratorRuntime.mark((function a(){var n,r,i;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.prev=0,n={method:"POST",headers:{secret:t.stateUser.secret},body:e},a.next=4,fetch("../api/image",n);case 4:return r=a.sent,a.next=7,r.json();case 7:i=a.sent,t.addStateHashArray(i.hash),a.next=14;break;case 11:a.prev=11,a.t0=a["catch"](0);case 14:case"end":return a.stop()}}),a,null,[[0,11]])})))()}},Object(x["b"])(["addStateHashArray"]))},L=U,H=(a("08fa"),Object(s["a"])(L,I,C,!1,null,"c28ab3e2",null)),$=H.exports,E=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",[e._v("Add tag/Change tag type")]),a("div",[a("input",{directives:[{name:"model",rawName:"v-model",value:e.tag,expression:"tag"}],attrs:{placeholder:"Tag to add"},domProps:{value:e.tag},on:{input:function(t){t.target.composing||(e.tag=t.target.value)}}}),a("select",{directives:[{name:"model",rawName:"v-model",value:e.tagType,expression:"tagType"}],on:{change:function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.tagType=t.target.multiple?a:a[0]}}},[a("option",{attrs:{disabled:""}},[e._v("Tag type")]),a("option",{attrs:{value:"artist"}},[e._v("Artist")]),a("option",{attrs:{value:"character"}},[e._v("Character")]),a("option",{attrs:{value:"copyright"}},[e._v("Copyright")]),a("option",{attrs:{value:"generic"}},[e._v("Generic")]),a("option",{attrs:{value:"group"}},[e._v("Group")]),a("option",{attrs:{value:"meta"}},[e._v("Meta")])])]),a("div",[a("button",{attrs:{disabled:e.tagIncorrect},on:{click:function(t){e.setTag(),e.setType(),e.resetTagAndType()}}},[e._v(" Submit ")])]),e.tagIncorrect?a("div",[e._v(" Tag incorrect. Make sure your tag doesn't exceed 128 characters and matches "),a("b",[e._v("/^[a-z0-9()_-]*$/g")])]):e._e(),a("div",[e._v("Type: "+e._s(e.tagType)+", Tag: "+e._s(e.tag))])])},P=[],D=(a("ac1f"),a("466d"),{data:function(){return{tag:"",tagType:"generic"}},computed:Object(p["a"])({tagIncorrect:function(){var e=/^[a-z0-9()_-]*$/g;return!this.tag.match(e)||this.tag.length>128}},Object(x["c"])(["stateUser"])),methods:{setTag:function(){fetch("/api/tag/".concat(this.tag),{method:"PUT",headers:{secret:this.stateUser.secret}}).then((function(e){console.log(e)})).catch((function(e){return console.error(e)}))},setType:function(){var e={method:"PATCH",headers:{"Content-Type":"application/json",secret:this.stateUser.secret},body:JSON.stringify({type:this.tagType})};fetch("/api/tag/".concat(this.tag,"/info"),e).then((function(e){return console.log(e)})).catch((function(e){return console.error(e)}))},resetTagAndType:function(){this.tag="",this.tagType="generic"}}}),M=D,K=Object(s["a"])(M,E,P,!1,null,null,null),N=K.exports,R=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[e.stateUser.id?a("div",{staticClass:"text-lg ml-1 mb-1"},[e._v("Welcome, "+e._s(e.stateUser.username))]):a("div",[e.authenticating?e._e():a("button",{staticClass:"\n hover:text-gray-600\n focus:outline-none\n text-gray-800\n font-semibold\n p-2\n ",on:{click:function(t){e.authenticating=!0}}},[e._v(" Authenticate ")]),e.authenticating?a("div",[e.authenticationFailed?a("div",{staticClass:"\n p-1\n m-2\n font-semibold\n bg-red-400\n ring-2 ring-red-500\n rounded\n text-gray-50\n relative\n "},[e._v(" Authentication failed. Please check your secret token. "),a("XCircle",{staticClass:"\n absolute\n bottom-0.5\n right-0.5\n stroke-current\n text-red-600\n opacity-40\n "})],1):e._e(),a("input",{directives:[{name:"model",rawName:"v-model",value:e.secret,expression:"secret"}],staticClass:"\n border border-transparent\n rounded\n m-4\n p-1\n shadow-inner\n bg-gray-200\n focus:ring-2 focus:ring-gray-400\n ",attrs:{type:"text",placeholder:"Secret token"},domProps:{value:e.secret},on:{keyup:function(t){if(!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter"))return null;e.authenticate(e.secret.trim())},input:function(t){t.target.composing||(e.secret=t.target.value)}}}),a("span",[a("button",{on:{click:function(t){e.authenticate(e.secret.trim())}}},[a("Checkmark",{staticClass:"login-button",attrs:{width:"30",height:"30"}})],1),a("button",{on:{click:function(t){e.authenticating=!1,e.authenticationFailed=!1,e.secret=""}}},[a("XCircle",{staticClass:"login-button",attrs:{width:"30",height:"30"}})],1)])]):e._e()])])},F=[],X=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:e.width,height:e.height,viewBox:"0 0 24 24",fill:"none",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[a("path",{attrs:{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}}),a("polyline",{attrs:{points:"22 4 12 14.01 9 11.01"}})])},z=[],J={props:{width:{default:24},height:{default:24}}},q=J,B=Object(s["a"])(q,X,z,!1,null,null,null),G=B.exports,V=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:e.width,height:e.height,viewBox:"0 0 24 24",fill:"none",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[a("circle",{attrs:{cx:"12",cy:"12",r:"10"}}),a("line",{attrs:{x1:"15",y1:"9",x2:"9",y2:"15"}}),a("line",{attrs:{x1:"9",y1:"9",x2:"15",y2:"15"}})])},W=[],Q={props:{width:{default:24},height:{default:24}}},Y=Q,Z=Object(s["a"])(Y,V,W,!1,null,null,null),ee=Z.exports,te={components:{Checkmark:G,XCircle:ee},data:function(){return{authenticating:!1,authenticationFailed:!1,secret:""}},computed:Object(p["a"])({},Object(x["c"])(["stateUser"])),methods:Object(p["a"])({authenticate:function(e){var t=this;return Object(g["a"])(regeneratorRuntime.mark((function a(){var n,r;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,fetch("/api/user/this",{headers:{secret:e}});case 3:return n=a.sent,a.next=6,n.json();case 6:r=a.sent,n.ok?t.saveStateUser({id:r.id,privileged:r.privileged,username:r.username,secret:e}):t.authenticationFailed=!0,a.next=13;break;case 10:a.prev=10,a.t0=a["catch"](0);case 13:case"end":return a.stop()}}),a,null,[[0,10]])})))()}},Object(x["b"])(["saveStateUser"]))},ae=te,ne=(a("26ff"),Object(s["a"])(ae,R,F,!1,null,"43e19d24",null)),re=ne.exports,ie={components:{ImageList:T,ImageUpload:$,TagCreation:N,UserAuthentication:re},computed:Object(p["a"])({},Object(x["c"])(["stateHashArray"])),created:function(){this.updateHashArray()},methods:Object(p["a"])({updateHashArray:function(){var e=this;return Object(g["a"])(regeneratorRuntime.mark((function t(){var a,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,fetch("../api/image");case 2:return a=t.sent,t.next=5,a.json();case 5:n=t.sent,n&&(e.setStateHashArray(n),console.log("Set State Hash Array"));case 7:case"end":return t.stop()}}),t)})))()}},Object(x["b"])(["setStateHashArray"]))},se=ie,oe=(a("2e88"),Object(s["a"])(se,d,h,!1,null,"2cbece45",null)),ce=oe.exports,ue=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{attrs:{id:"image-container"}},[a("img",{attrs:{src:"/api/image/"+e.hash+"/file",alt:""}})])])},le=[],de=(a("1276"),{computed:{hash:function(){return window.location.pathname.split("/")[3]}}}),he=de,ge=(a("f4d7"),Object(s["a"])(he,ue,le,!1,null,"086aeb6a",null)),pe=ge.exports;n["a"].use(l["a"]);var fe=[{path:"/",name:"Home",component:ce},{path:"/image/:hash",name:"ImageView",component:pe}],me=new l["a"]({mode:"history",base:"/web/",routes:fe}),ve=me,ye=a("0e44");n["a"].use(x["a"]);var be=Object(ye["a"])({key:"imageboard",paths:["stateUser"]}),_e=new x["a"].Store({state:{stateHashArray:[],stateUser:{id:null,privileged:null,username:null,secret:null}},mutations:{setStateHashArray:function(e,t){e.stateHashArray=t},addStateHashArray:function(e,t){e.stateHashArray.unshift(t)},saveStateUser:function(e,t){e.stateUser.id=t.id,e.stateUser.privileged=t.privileged,e.stateUser.username=t.username,e.stateUser.secret=t.secret}},actions:{setStateHashArray:function(e,t){e.commit("setStateHashArray",t)},addStateHashArray:function(e,t){e.commit("addStateHashArray",t)},saveStateUser:function(e,t){e.commit("saveStateUser",t)}},modules:{},plugins:[be]});a("def6");n["a"].config.productionTip=!1,new n["a"]({router:ve,store:_e,render:function(e){return e(u)}}).$mount("#app")},a9dd:function(e,t,a){"use strict";a("c412")},c412:function(e,t,a){},c678:function(e,t,a){},c6d3:function(e,t,a){"use strict";a("00f7")},def6:function(e,t,a){},df8d:function(e,t,a){},e686:function(e,t,a){},f4d7:function(e,t,a){"use strict";a("df8d")}});
//# sourceMappingURL=app.e93518f9.js.map
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment