🚀
This commit is contained in:
parent
be284b9acb
commit
14395bdbdd
|
@ -1,25 +1,25 @@
|
|||
{
|
||||
"files": {
|
||||
"main.css": "/static/css/main.df392f58.chunk.css",
|
||||
"main.js": "/static/js/main.f00f7f92.chunk.js",
|
||||
"main.js.map": "/static/js/main.f00f7f92.chunk.js.map",
|
||||
"main.js": "/static/js/main.333f1baa.chunk.js",
|
||||
"main.js.map": "/static/js/main.333f1baa.chunk.js.map",
|
||||
"runtime-main.js": "/static/js/runtime-main.3a03ddd0.js",
|
||||
"runtime-main.js.map": "/static/js/runtime-main.3a03ddd0.js.map",
|
||||
"static/css/2.015dc0ab.chunk.css": "/static/css/2.015dc0ab.chunk.css",
|
||||
"static/js/2.0cc5fa69.chunk.js": "/static/js/2.0cc5fa69.chunk.js",
|
||||
"static/js/2.0cc5fa69.chunk.js.map": "/static/js/2.0cc5fa69.chunk.js.map",
|
||||
"static/js/2.7f3df502.chunk.js": "/static/js/2.7f3df502.chunk.js",
|
||||
"static/js/2.7f3df502.chunk.js.map": "/static/js/2.7f3df502.chunk.js.map",
|
||||
"static/js/3.2f629505.chunk.js": "/static/js/3.2f629505.chunk.js",
|
||||
"static/js/3.2f629505.chunk.js.map": "/static/js/3.2f629505.chunk.js.map",
|
||||
"index.html": "/index.html",
|
||||
"static/css/2.015dc0ab.chunk.css.map": "/static/css/2.015dc0ab.chunk.css.map",
|
||||
"static/css/main.df392f58.chunk.css.map": "/static/css/main.df392f58.chunk.css.map",
|
||||
"static/js/2.0cc5fa69.chunk.js.LICENSE.txt": "/static/js/2.0cc5fa69.chunk.js.LICENSE.txt"
|
||||
"static/js/2.7f3df502.chunk.js.LICENSE.txt": "/static/js/2.7f3df502.chunk.js.LICENSE.txt"
|
||||
},
|
||||
"entrypoints": [
|
||||
"static/js/runtime-main.3a03ddd0.js",
|
||||
"static/css/2.015dc0ab.chunk.css",
|
||||
"static/js/2.0cc5fa69.chunk.js",
|
||||
"static/js/2.7f3df502.chunk.js",
|
||||
"static/css/main.df392f58.chunk.css",
|
||||
"static/js/main.f00f7f92.chunk.js"
|
||||
"static/js/main.333f1baa.chunk.js"
|
||||
]
|
||||
}
|
|
@ -1 +1 @@
|
|||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="3D Shock by Tanner and Elijah enterprises"/><link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>⚡</text></svg>"><link rel="manifest" href="/manifest.json"/><title>3D Shock!</title><link href="/static/css/2.015dc0ab.chunk.css" rel="stylesheet"><link href="/static/css/main.df392f58.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var n,i,a=t[0],c=t[1],l=t[2],s=0,p=[];s<a.length;s++)i=a[s],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&p.push(o[i][0]),o[i]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(t);p.length;)p.shift()();return u.push.apply(u,l||[]),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 c=r[a];0!==o[c]&&(n=!1)}n&&(u.splice(t--,1),e=i(i.s=r[0]))}return e}var n={},o={1:0},u=[];function i(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,i),r.l=!0,r.exports}i.e=function(e){var t=[],r=o[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=o[e]=[t,n]}));t.push(r[2]=n);var u,a=document.createElement("script");a.charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=function(e){return i.p+"static/js/"+({}[e]||e)+"."+{3:"2f629505"}[e]+".chunk.js"}(e);var c=new Error;u=function(t){a.onerror=a.onload=null,clearTimeout(l);var r=o[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),u=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,r[1](c)}o[e]=void 0}};var l=setTimeout((function(){u({type:"timeout",target:a})}),12e4);a.onerror=a.onload=u,document.head.appendChild(a)}return Promise.all(t)},i.m=e,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i.oe=function(e){throw console.error(e),e};var a=this.webpackJsonpclient=this.webpackJsonpclient||[],c=a.push.bind(a);a.push=t,a=a.slice();for(var l=0;l<a.length;l++)t(a[l]);var f=c;r()}([])</script><script src="/static/js/2.0cc5fa69.chunk.js"></script><script src="/static/js/main.f00f7f92.chunk.js"></script></body></html>
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="3D Shock by Tanner and Elijah enterprises"/><link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>⚡</text></svg>"><link rel="manifest" href="/manifest.json"/><title>3D Shock!</title><link href="/static/css/2.015dc0ab.chunk.css" rel="stylesheet"><link href="/static/css/main.df392f58.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var n,i,a=t[0],c=t[1],l=t[2],s=0,p=[];s<a.length;s++)i=a[s],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&p.push(o[i][0]),o[i]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(t);p.length;)p.shift()();return u.push.apply(u,l||[]),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 c=r[a];0!==o[c]&&(n=!1)}n&&(u.splice(t--,1),e=i(i.s=r[0]))}return e}var n={},o={1:0},u=[];function i(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,i),r.l=!0,r.exports}i.e=function(e){var t=[],r=o[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=o[e]=[t,n]}));t.push(r[2]=n);var u,a=document.createElement("script");a.charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=function(e){return i.p+"static/js/"+({}[e]||e)+"."+{3:"2f629505"}[e]+".chunk.js"}(e);var c=new Error;u=function(t){a.onerror=a.onload=null,clearTimeout(l);var r=o[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),u=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,r[1](c)}o[e]=void 0}};var l=setTimeout((function(){u({type:"timeout",target:a})}),12e4);a.onerror=a.onload=u,document.head.appendChild(a)}return Promise.all(t)},i.m=e,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i.oe=function(e){throw console.error(e),e};var a=this.webpackJsonpclient=this.webpackJsonpclient||[],c=a.push.bind(a);a.push=t,a=a.slice();for(var l=0;l<a.length;l++)t(a[l]);var f=c;r()}([])</script><script src="/static/js/2.7f3df502.chunk.js"></script><script src="/static/js/main.333f1baa.chunk.js"></script></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
client/build/static/js/2.7f3df502.chunk.js.map
Normal file
1
client/build/static/js/2.7f3df502.chunk.js.map
Normal file
File diff suppressed because one or more lines are too long
2
client/build/static/js/main.333f1baa.chunk.js
Normal file
2
client/build/static/js/main.333f1baa.chunk.js
Normal file
File diff suppressed because one or more lines are too long
1
client/build/static/js/main.333f1baa.chunk.js.map
Normal file
1
client/build/static/js/main.333f1baa.chunk.js.map
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -37,6 +37,8 @@ export const restartSession = async (clientId: string) => {
|
|||
await startSession(clientId)
|
||||
}
|
||||
|
||||
// TOOD: Get status
|
||||
|
||||
// Someday
|
||||
|
||||
export const getClients = async (): Promise<Client[]> => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { message } from 'antd'
|
||||
import { Button, Divider, message, PageHeader } from 'antd'
|
||||
import { Content } from 'antd/lib/layout/layout'
|
||||
import React, { FormEvent } from 'react'
|
||||
import { useState } from 'react'
|
||||
|
@ -40,7 +40,11 @@ export const Dashboard = () => {
|
|||
|
||||
return (
|
||||
<Content>
|
||||
<h1>Dashboard</h1>
|
||||
<PageHeader
|
||||
title="Dashboard"
|
||||
subTitle="Enter the name, email and phone number of the subject"
|
||||
></PageHeader>
|
||||
<Divider />
|
||||
<form onSubmit={handleSubmit}>
|
||||
<label htmlFor="name">
|
||||
Name:
|
||||
|
@ -69,10 +73,12 @@ export const Dashboard = () => {
|
|||
name="phone"
|
||||
/>
|
||||
</label>
|
||||
<button type="submit">Start Session</button>
|
||||
<button type="button" onClick={handleReset}>
|
||||
<Button danger onClick={handleReset}>
|
||||
Reset
|
||||
</button>
|
||||
</Button>
|
||||
<Button htmlType="submit" type="primary">
|
||||
Start Session
|
||||
</Button>
|
||||
{error && <p className="error">{error}</p>}
|
||||
</form>
|
||||
</Content>
|
||||
|
|
|
@ -85,11 +85,11 @@ export const Session = (props: Props) => {
|
|||
</Popconfirm>,
|
||||
<Popconfirm
|
||||
key="nuke"
|
||||
title="Delete all photos?"
|
||||
title="Delete all photos and return to dashboard?"
|
||||
onConfirm={handleNuke}
|
||||
>
|
||||
<Button danger disabled={!active}>
|
||||
Nuke Session
|
||||
Abort Session
|
||||
</Button>
|
||||
</Popconfirm>,
|
||||
<Button
|
||||
|
@ -105,7 +105,7 @@ export const Session = (props: Props) => {
|
|||
></PageHeader>
|
||||
<Divider />
|
||||
<Row className="controls">
|
||||
<SessionPictures clientId={clientId} />
|
||||
{active && <SessionPictures clientId={clientId} />}
|
||||
</Row>
|
||||
</Content>
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React, { useEffect, useState } from 'react'
|
||||
import { Card, Modal, Spin } from 'antd'
|
||||
import { Button, Card, message, Modal, PageHeader, Spin } from 'antd'
|
||||
import { getSession } from '../api'
|
||||
import settings from '../settings'
|
||||
|
||||
|
@ -10,10 +10,20 @@ type Props = {
|
|||
export const SessionPictures = ({ clientId }: Props) => {
|
||||
const [urls, setUrls] = useState<string[] | null>(null)
|
||||
const [activeUrl, setActiveUrl] = useState<string | null>(null)
|
||||
const [loading, setLoading] = useState(true)
|
||||
|
||||
const handleSync = async () => {
|
||||
message.info('Syncing photos...')
|
||||
const { photos } = await getSession(clientId)
|
||||
if (photos.length) setUrls(photos)
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
const get = async () => {
|
||||
if (urls) return
|
||||
if (urls && urls.length >= 89 * 2) {
|
||||
setLoading(false)
|
||||
return
|
||||
}
|
||||
|
||||
const { photos } = await getSession(clientId)
|
||||
if (photos.length) setUrls(photos)
|
||||
|
@ -46,27 +56,28 @@ export const SessionPictures = ({ clientId }: Props) => {
|
|||
alt="large image"
|
||||
></img>
|
||||
</Modal>
|
||||
<div>
|
||||
<h3>Session Pictures</h3>
|
||||
<div className="photo-wall">
|
||||
{urls ? (
|
||||
urls
|
||||
.sort((a, b) => a.split('_')[0].localeCompare(b.split('_')[0]))
|
||||
.map((src) => (
|
||||
<Card className="photo" title={src.split('_')[0]}>
|
||||
<img
|
||||
onClick={() => setActiveUrl(src)}
|
||||
key={src}
|
||||
id={src}
|
||||
src={`${host}/output/${clientId}/${src}`}
|
||||
alt="lol"
|
||||
/>
|
||||
</Card>
|
||||
))
|
||||
) : (
|
||||
<Spin />
|
||||
)}
|
||||
</div>
|
||||
<PageHeader
|
||||
title="Session Pictures"
|
||||
subTitle={`${urls.length}/${89 * 2} loaded`}
|
||||
></PageHeader>
|
||||
<div className="photo-wall">
|
||||
{urls ? (
|
||||
urls
|
||||
.sort((a, b) => a.split('_')[0].localeCompare(b.split('_')[0]))
|
||||
.map((src) => (
|
||||
<Card className="photo" title={src.split('_')[0]}>
|
||||
<img
|
||||
onClick={() => setActiveUrl(src)}
|
||||
key={src}
|
||||
id={src}
|
||||
src={`${host}/output/${clientId}/${src}`}
|
||||
alt="lol"
|
||||
/>
|
||||
</Card>
|
||||
))
|
||||
) : (
|
||||
<Spin />
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user