You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
4.4 KiB
2 lines
4.4 KiB
4 years ago
|
(this.webpackJsonpthanos=this.webpackJsonpthanos||[]).push([[0],{15:function(t,e,a){},16:function(t,e,a){},17:function(t,e,a){"use strict";a.r(e);var n=a(0),s=a(1),c=a.n(s),i=a(9),r=a.n(i),o=(a(15),a(8)),d=a(3),h=a(4),j=a(2),l=a(6),u=a(5),b=(a(16),function(t){Object(l.a)(a,t);var e=Object(u.a)(a);function a(t){var n;return Object(d.a)(this,a),(n=e.call(this,t)).state={data:{},details:{},expand:!1},n.state.data=t,n.state.details={},n.state.expand=!1,n.onClick=n.onClick.bind(Object(j.a)(n)),n}return Object(h.a)(a,[{key:"onClick",value:function(t){var e=this;fetch("https://thanos.nightmare.haus/api/user?userID=".concat(this.state.data.UserID)).then((function(t){return t.json()})).then((function(t){e.setState({data:e.state.data,expand:!e.state.expand,details:t})})).catch((function(t){return console.log(t)}))}},{key:"render",value:function(){if(this.state.expand){if(null!=this.state.details)return Object(n.jsx)("div",{onClick:this.onClick,children:Object(n.jsx)(p,{data:this.state.details,verification:this.state.data.Photo})});var t={};return t.Nick=this.state.data.Username+" (Invalid)",t.user={},t.user.id=this.state.data.UserID,t.joined_at=this.state.data.Closed,Object(n.jsx)("div",{onClick:this.onClick,children:Object(n.jsx)(p,{data:t,verification:this.state.data.Photo})})}return Object(n.jsxs)("div",{className:"card",onClick:this.onClick,children:[Object(n.jsx)("h4",{children:Object(n.jsxs)("b",{children:[this.state.data.Username,null==this.state.details?" (Invalid)":""]})}),Object(n.jsxs)("div",{className:"container",children:[Object(n.jsx)("p",{children:this.state.data.Closed}),Object(n.jsx)("p",{children:this.state.data.UserID}),Object(n.jsx)("p",{children:Object(n.jsx)("a",{href:this.state.data.Photo,children:"Verification Photo"})})]})]})}}]),a}(c.a.Component));function O(t){return Object(n.jsxs)("div",{className:"card-img",children:[Object(n.jsx)("h4",{children:Object(n.jsxs)("b",{children:["Pend: ",t.Username]})}),Object(n.jsx)("img",{src:void 0!==t.Photo?t.Photo:"https://thiscatdoesnotexist.com/",alt:"Avatar",style:{width:"100%"}}),Object(n.jsx)("div",{className:"container",children:Object(n.jsx)("p",{children:t.UserID})})]})}function p(t,e){return console.log(t),e=t.verification,t=t.data,Object(n.jsxs)("div",{className:"card-img",children:[Object(n.jsx)("h4",{children:Object(n.jsx)("b",{children:null!==t.Nick?t.Nick:t.user.Username})}),Object(n.jsx)("img",{src:void 0!==t.user.avatar?"https://cdn.discordapp.com/avatars/".concat(t.user.id,"/").concat(t.user.avatar,".png?size=64"):"",alt:"Avatar"}),Object(n.jsxs)("div",{className:"container",children:[Object(n.jsx)("img",{src:void 0!==e?e:"https://thiscatdoesnotexist.com/",alt:"Avatar",style:{width:"100%"}}),Object(n.jsx)("p",{children:t.joined_at}),Object(n.jsx)("p",{children:t.user.id})]})]})}var v=function(t){Object(l.a)(a,t);var e=Object(u.a)(a);function a(){var t;Object(d.a)(this,a);for(var n=arguments.length,s=new Array(n),c=0;c<n;c++)s[c]=arguments[c];return(t=e.call.apply(e,[this].concat(s))).state={pending:[]},t}return Object(h.a)(a,[{key:"componentDidMount",value:function(){var t=this;fetch("https://thanos.nightmare.haus/api/pending").then((function(t){return t.json()})).then((function(e){return t.setState({pending:Object.values(e)})}))}},{key:"render",value:function(){return Object(n.jsxs)("div",{className:"App",children:[Object(n.jsx)("ul",{children:this.state.pending.map((function(t,e){return Object(n.jsxs)("li",{children:[" ",Object(n.jsx)(O,Object(o.a)({},t))]},e)}))}),Object(n.jsx)("br",{})]})}}]),a}(c.a.Component),x=function(t){Object(l.a)(a,t);var e=Object(u.a)(a);function a(){var t;Object(d.a)(this,a);for(var n=arguments.length,s=new Array(n),c=0;c<n;c++)s[c]=arguments[c];return(t=e.call.apply(e,[this].concat(s))).state={verifications:[]},t}return Object(h.a)(a,[{key:"componentDidMount",value:function(){var t=this;fetch("https://thanos.nightmare.haus/api/verifications").then((function(t){return t.json()})).then((function(e){return t.setState({verifications:e})}))}},{key:"render",value:function(){return Object(n.jsxs)("div",{className:"App",children
|
||
|
//# sourceMappingURL=main.a24cc14e.chunk.js.map
|