Browse Source

Working tests

hkremer/rebranding
Gregory Rudolph 3 years ago
parent
commit
5770ce7fb9
Signed by: rudi
GPG Key ID: EF64F3CBD1A1EBDD
  1. 2
      static/js/main.482e8a8c.chunk.js
  2. 1
      static/js/main.482e8a8c.chunk.js.map

2
static/js/main.482e8a8c.chunk.js

@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
(this.webpackJsonpthanos=this.webpackJsonpthanos||[]).push([[0],{15:function(t,e,n){},16:function(t,e,n){},17:function(t,e,n){"use strict";n.r(e);var a=n(0),s=n(1),c=n.n(s),i=n(9),r=n.n(i),o=(n(15),n(8)),h=n(3),j=n(4),d=n(2),l=n(6),u=n(5),b=(n(16),function(t){Object(l.a)(n,t);var e=Object(u.a)(n);function n(t){var a;return Object(h.a)(this,n),(a=e.call(this,t)).state={data:{},details:{},expand:!1},a.state.data=t,a.state.details={},a.state.expand=!1,a.onClick=a.onClick.bind(Object(d.a)(a)),a}return Object(j.a)(n,[{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(){return this.state.expand&&null!=this.state.details?Object(a.jsx)("div",{onClick:this.onClick,children:Object(a.jsx)(p,{data:this.state.details,verification:this.state.data.Photo})}):Object(a.jsxs)("div",{className:"card",onClick:this.onClick,children:[Object(a.jsx)("h4",{children:Object(a.jsxs)("b",{children:[this.state.data.Username,null==this.state.details?" (Invalid)":""]})}),Object(a.jsxs)("div",{className:"container",children:[Object(a.jsx)("p",{children:this.state.data.Closed}),Object(a.jsx)("p",{children:this.state.data.UserID}),Object(a.jsx)("p",{children:Object(a.jsx)("a",{href:this.state.data.Photo,children:"Verification Photo"})})]})]})}}]),n}(c.a.Component));function O(t){return Object(a.jsxs)("div",{className:"card-img",children:[Object(a.jsx)("h4",{children:Object(a.jsxs)("b",{children:["Pend: ",t.Username]})}),Object(a.jsx)("img",{src:void 0!==t.Photo?t.Photo:"https://thiscatdoesnotexist.com/",alt:"Avatar",style:{width:"100%"}}),Object(a.jsx)("div",{className:"container",children:Object(a.jsx)("p",{children:t.UserID})})]})}function p(t,e){return e=(t=t.data).verification,console.log(t.verification),Object(a.jsxs)("div",{className:"card-img",children:[Object(a.jsx)("h4",{children:Object(a.jsx)("b",{children:null!==t.Nick?t.Nick:t.user.Username})}),Object(a.jsx)("img",{src:void 0!==t.user.avatar?"https://cdn.discordapp.com/avatars/".concat(t.user.id,"/").concat(t.user.avatar,".png?size=64"):"https://thiscatdoesnotexist.com/",alt:"Avatar"}),Object(a.jsxs)("div",{className:"container",children:[Object(a.jsx)("img",{src:void 0!==e?e:"https://thiscatdoesnotexist.com/",alt:"Avatar",style:{width:"100%"}}),Object(a.jsx)("p",{children:t.joined_at}),Object(a.jsx)("p",{children:t.user.id})]})]})}var v=function(t){Object(l.a)(n,t);var e=Object(u.a)(n);function n(){var t;Object(h.a)(this,n);for(var a=arguments.length,s=new Array(a),c=0;c<a;c++)s[c]=arguments[c];return(t=e.call.apply(e,[this].concat(s))).state={pending:[]},t}return Object(j.a)(n,[{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(a.jsxs)("div",{className:"App",children:[Object(a.jsx)("ul",{children:this.state.pending.map((function(t,e){return Object(a.jsxs)("li",{children:[" ",Object(a.jsx)(O,Object(o.a)({},t))]},e)}))}),Object(a.jsx)("br",{})]})}}]),n}(c.a.Component),x=function(t){Object(l.a)(n,t);var e=Object(u.a)(n);function n(){var t;Object(h.a)(this,n);for(var a=arguments.length,s=new Array(a),c=0;c<a;c++)s[c]=arguments[c];return(t=e.call.apply(e,[this].concat(s))).state={verifications:[]},t}return Object(j.a)(n,[{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(a.jsxs)("div",{className:"App",children:[Object(a.jsx)(v,{}),Object(a.jsx)("ul",{children:this.state.verifications.map((function(t,e){return Object(a.jsxs)("li",{children:[" ",Object(a.jsx)(b,Object(o.a)({},t))]},e)}))})]})}}]),n}(c.a.Component);r.a.render(Object(a.jsxs)(c.a.StrictMode,{children:[Object(a.jsx)(x,{}),Object(a.jsx)(x,{})]}),document.getElementById("react_app"))}},[[17,1,2]]]);
//# sourceMappingURL=main.482e8a8c.chunk.js.map

1
static/js/main.482e8a8c.chunk.js.map

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save