Browse Source

Working tests

hkremer/rebranding
Gregory Rudolph 3 years ago
parent
commit
a205581a44
Signed by: rudi
GPG Key ID: EF64F3CBD1A1EBDD
  1. 31
      src/App.js
  2. 2
      static/css/main.5c7015b9.chunk.css
  3. 1
      static/css/main.5c7015b9.chunk.css.map
  4. 3
      static/js/2.55237e37.chunk.js
  5. 41
      static/js/2.55237e37.chunk.js.LICENSE.txt
  6. 1
      static/js/2.55237e37.chunk.js.map
  7. 2
      static/js/main.e873c6b9.chunk.js
  8. 1
      static/js/main.e873c6b9.chunk.js.map
  9. 2
      static/js/runtime-main.e8303b2e.js
  10. 1
      static/js/runtime-main.e8303b2e.js.map
  11. 4
      static/loggedIn.tpl

31
src/App.js

@ -27,13 +27,27 @@ class Card extends React.Component{ @@ -27,13 +27,27 @@ class Card extends React.Component{
.catch(error => console.log(error));
}
render() {
if (this.state.expand && this.state.details != null) {
return (
<div onClick={this.onClick}>
<UserDetail data={this.state.details} verification={this.state.data.Photo} />
</div>
)
if (this.state.expand) {
if (this.state.details != null) {
return (
<div onClick={this.onClick}>
<UserDetail data={this.state.details} verification={this.state.data.Photo} />
</div>
)
} else {
var details = {};
details.Nick = this.state.data.Username + " (Invalid)";
details.user = {};
details.user.id = this.state.data.UserID;
details.joined_at = this.state.data.Closed;
return (
<div onClick={this.onClick}>
<UserDetail data={details} verification={this.state.data.Photo} />
</div>
)
}
}
return (
<div className="card" onClick={this.onClick}>
@ -61,12 +75,13 @@ class Card extends React.Component{ @@ -61,12 +75,13 @@ class Card extends React.Component{
}
function UserDetail(data, verification) {
console.log(data);
verification = data.verification
data = data.data;
return (
<div className="card-img">
<h4><b>{data.Nick !== null ? data.Nick : data.user.Username}</b></h4>
<img src={data.user.avatar !== undefined ? `https://cdn.discordapp.com/avatars/${data.user.id}/${data.user.avatar}.png?size=64` : "https://thiscatdoesnotexist.com/"} alt="Avatar" />
<img src={data.user.avatar !== undefined ? `https://cdn.discordapp.com/avatars/${data.user.id}/${data.user.avatar}.png?size=64` : ""} alt="Avatar" />
<div className="container">

2
static/css/main.5c7015b9.chunk.css

@ -1,2 +0,0 @@ @@ -1,2 +0,0 @@
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,"Courier New",monospace}.card{height:200px}.card,.card-img{box-shadow:0 4px 8px 0 rgba(0,0,0,.137);border-radius:3%;transition:.3s;position:relative;width:300px;padding:10px;background-color:#282c34;color:#fff}.card-img{height:450px}.card:hover{box-shadow:0 8px 16px 0 rgba(0,0,0,.795)}.container{padding:6px 16px}ul{list-style-type:none;margin:4;padding:20px;overflow:hidden;display:table;width:100%;list-style:none}li{float:left;display:table-cell;text-align:center;margin:5px}ul li div{display:block}.App{text-align:center}.App-logo{height:40vmin;pointer-events:none}@media (prefers-reduced-motion:no-preference){.App-logo{-webkit-animation:App-logo-spin 20s linear infinite;animation:App-logo-spin 20s linear infinite}}.App-header{background-color:#282c34;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:calc(10px + 2vmin);color:#fff}.App-link{color:#61dafb}@-webkit-keyframes App-logo-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes App-logo-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}
/*# sourceMappingURL=main.5c7015b9.chunk.css.map */

1
static/css/main.5c7015b9.chunk.css.map

@ -1 +0,0 @@ @@ -1 +0,0 @@
{"version":3,"sources":["webpack://src/index.css","webpack://src/App.css"],"names":[],"mappings":"AAAA,KACI,QAAS,CACT,mJAEY,CACZ,kCAAmC,CACnC,iCACF,CAEA,KACE,yEAEF,CACA,MAOE,YAIF,CACA,gBAVE,uCAA4C,CAC5C,gBAAiB,CACjB,cAAgB,CAChB,iBAAkB,CAClB,WAAY,CAEZ,YAAa,CACb,wBAAyB,CACzB,UAaF,CAXA,UAOE,YAIF,CAGA,YACE,wCACF,CAGA,WACE,gBACF,CAEA,GACE,oBAAqB,CACrB,QAAS,CACT,YAAa,CACb,eAAgB,CACd,aAAc,CACd,UAAW,CACX,eACJ,CAEA,GACE,UAAW,CACX,kBAAmB,CACnB,iBAAkB,CAClB,UACF,CACA,UACE,aACF,CClEF,KACE,iBACF,CAEA,UACE,aAAc,CACd,mBACF,CAEA,8CACE,UACE,mDAA4C,CAA5C,2CACF,CACF,CAEA,YACE,wBAAyB,CACzB,gBAAiB,CACjB,YAAa,CACb,qBAAsB,CACtB,kBAAmB,CACnB,sBAAuB,CACvB,4BAA6B,CAC7B,UACF,CAEA,UACE,aACF,CAEA,iCACE,GACE,sBACF,CACA,GACE,uBACF,CACF,CAPA,yBACE,GACE,sBACF,CACA,GACE,uBACF,CACF","file":"main.5c7015b9.chunk.css","sourcesContent":["body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n \n code {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n }\n .card {\n /* Add shadows to create the \"card\" effect */\n box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.137);\n border-radius: 3%;\n transition: 0.3s;\n position: relative;\n width: 300px;\n height: 200px;\n padding: 10px;\n background-color: #282c34;\n color: #FFFFFF;\n }\n .card-img {\n /* Add shadows to create the \"card\" effect */\n box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.137);\n border-radius: 3%;\n transition: 0.3s;\n position: relative;\n width: 300px;\n height: 450px;\n padding: 10px;\n background-color: #282c34;\n color: #FFFFFF;\n }\n \n /* On mouse-over, add a deeper shadow */\n .card:hover {\n box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.795);\n }\n \n /* Add some padding inside the card container */\n .container {\n padding: 6px 16px;\n }\n \n ul {\n list-style-type: none;\n margin: 4;\n padding: 20px;\n overflow: hidden;\n display: table;\n width: 100%;\n list-style: none;\n }\n \n li {\n float: left;\n display: table-cell;\n text-align: center;\n margin: 5px;\n }\n ul li div {\n display: block;\n }",".App {\n text-align: center;\n}\n\n.App-logo {\n height: 40vmin;\n pointer-events: none;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .App-logo {\n animation: App-logo-spin infinite 20s linear;\n }\n}\n\n.App-header {\n background-color: #282c34;\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n font-size: calc(10px + 2vmin);\n color: white;\n}\n\n.App-link {\n color: #61dafb;\n}\n\n@keyframes App-logo-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n"]}

3
static/js/2.55237e37.chunk.js

File diff suppressed because one or more lines are too long

41
static/js/2.55237e37.chunk.js.LICENSE.txt

@ -1,41 +0,0 @@ @@ -1,41 +0,0 @@
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/** @license React v0.20.1
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.1
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.1
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.1
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

1
static/js/2.55237e37.chunk.js.map

File diff suppressed because one or more lines are too long

2
static/js/main.e873c6b9.chunk.js

@ -1,2 +0,0 @@ @@ -1,2 +0,0 @@
(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.verification,t=t.data,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.e873c6b9.chunk.js.map

1
static/js/main.e873c6b9.chunk.js.map

File diff suppressed because one or more lines are too long

2
static/js/runtime-main.e8303b2e.js

@ -1,2 +0,0 @@ @@ -1,2 +0,0 @@
!function(e){function t(t){for(var n,l,a=t[0],f=t[1],i=t[2],c=0,s=[];c<a.length;c++)l=a[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(p&&p(t);s.length;)s.shift()();return u.push.apply(u,i||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,a=1;a<r.length;a++){var f=r[a];0!==o[f]&&(n=!1)}n&&(u.splice(t--,1),e=l(l.s=r[0]))}return e}var n={},o={1:0},u=[];function l(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,l),r.l=!0,r.exports}l.m=e,l.c=n,l.d=function(e,t,r){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(l.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)l.d(r,n,function(t){return e[t]}.bind(null,n));return r},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="/";var a=this.webpackJsonpthanos=this.webpackJsonpthanos||[],f=a.push.bind(a);a.push=t,a=a.slice();for(var i=0;i<a.length;i++)t(a[i]);var p=f;r()}([]);
//# sourceMappingURL=runtime-main.e8303b2e.js.map

1
static/js/runtime-main.e8303b2e.js.map

File diff suppressed because one or more lines are too long

4
static/loggedIn.tpl

@ -1,8 +1,8 @@ @@ -1,8 +1,8 @@
<div id="react_app"></div>
<div class="container h-100 d-flex justify-content-center align-items-center">
<script>!function (e) { function t(t) { for (var n, l, a = t[0], f = t[1], i = t[2], c = 0, s = []; c < a.length; c++)l = a[c], Object.prototype.hasOwnProperty.call(o, l) && o[l] && s.push(o[l][0]), o[l] = 0; for (n in f) Object.prototype.hasOwnProperty.call(f, n) && (e[n] = f[n]); for (p && p(t); s.length;)s.shift()(); return u.push.apply(u, i || []), r() } function r() { for (var e, t = 0; t < u.length; t++) { for (var r = u[t], n = !0, a = 1; a < r.length; a++) { var f = r[a]; 0 !== o[f] && (n = !1) } n && (u.splice(t--, 1), e = l(l.s = r[0])) } return e } var n = {}, o = { 1: 0 }, u = []; function l(t) { if (n[t]) return n[t].exports; var r = n[t] = { i: t, l: !1, exports: {} }; return e[t].call(r.exports, r, r.exports, l), r.l = !0, r.exports } l.m = e, l.c = n, l.d = function (e, t, r) { l.o(e, t) || Object.defineProperty(e, t, { enumerable: !0, get: r }) }, l.r = function (e) { "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 }) }, l.t = function (e, t) { if (1 & t && (e = l(e)), 8 & t) return e; if (4 & t && "object" == typeof e && e && e.__esModule) return e; var r = Object.create(null); if (l.r(r), Object.defineProperty(r, "default", { enumerable: !0, value: e }), 2 & t && "string" != typeof e) for (var n in e) l.d(r, n, function (t) { return e[t] }.bind(null, n)); return r }, l.n = function (e) { var t = e && e.__esModule ? function () { return e.default } : function () { return e }; return l.d(t, "a", t), t }, l.o = function (e, t) { return Object.prototype.hasOwnProperty.call(e, t) }, l.p = "/"; var a = this.webpackJsonpthanos = this.webpackJsonpthanos || [], f = a.push.bind(a); a.push = t, a = a.slice(); for (var i = 0; i < a.length; i++)t(a[i]); var p = f; r() }([])</script>
<script>!function (e) { function t(t) { for (var n, l, a = t[0], f = t[1], i = t[2], c = 0, s = []; c < a.length; c++)l = a[c], Object.prototype.hasOwnProperty.call(o, l) && o[l] && s.push(o[l][0]), o[l] = 0; for (n in f) Object.prototype.hasOwnProperty.call(f, n) && (e[n] = f[n]); for (p && p(t); s.length;)s.shift()(); return u.push.apply(u, i || []), r() } function r() { for (var e, t = 0; t < u.length; t++) { for (var r = u[t], n = !0, a = 1; a < r.length; a++) { var f = r[a]; 0 !== o[f] && (n = !1) } n && (u.splice(t--, 1), e = l(l.s = r[0])) } return e } var n = {}, o = { 1: 0 }, u = []; function l(t) { if (n[t]) return n[t].exports; var r = n[t] = { i: t, l: !1, exports: {} }; return e[t].call(r.exports, r, r.exports, l), r.l = !0, r.exports } l.m = e, l.c = n, l.d = function (e, t, r) { l.o(e, t) || Object.defineProperty(e, t, { enumerable: !0, get: r }) }, l.r = function (e) { "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 }) }, l.t = function (e, t) { if (1 & t && (e = l(e)), 8 & t) return e; if (4 & t && "object" == typeof e && e && e.__esModule) return e; var r = Object.create(null); if (l.r(r), Object.defineProperty(r, "default", { enumerable: !0, value: e }), 2 & t && "string" != typeof e) for (var n in e) l.d(r, n, function (t) { return e[t] }.bind(null, n)); return r }, l.n = function (e) { var t = e && e.__esModule ? function () { return e.default } : function () { return e }; return l.d(t, "a", t), t }, l.o = function (e, t) { return Object.prototype.hasOwnProperty.call(e, t) }, l.p = "/"; var a = this.webpackJsonpthanos = this.webpackJsonpthanos || [], f = a.push.bind(a); a.push = t, a = a.slice(); for (var i = 0; i < a.length; i++)t(a[i]); var p = f; r() }([])</script>
<script src="/static/js/2.55237e37.chunk.js"></script>
<script src="/static/js/main.e873c6b9.chunk.js"></script>
<script src="/static/js/main.a24cc14e.chunk.js"></script>
</div>
</body>
Loading…
Cancel
Save