Joystream Stats 1 год назад
Родитель
Сommit
97462418d8

+ 12 - 30
src/App.tsx

@@ -82,36 +82,18 @@ class App extends React.Component<IProps, IState> {
       <BrowserRouter>
         <NavBar toggleShowNotes={this.toggleShowNotes} />
 
-        <div
-          className="d-flex flex-row overflow-hidden w-100 h-100"
-          style={{ maxHeight: "95vh" }}
-        >
-          <Notes
-            addNote={this.addNote}
-            save={this.save}
-            notes={this.state.notes}
-            note={this.state.note}
-            settings={settings}
-            log={this.log}
-          />
-          <div className="d-flex flex-column-reverse">
-            <Log log={log} settings={settings} save={this.save} />
-            <div className="overflow-auto">
-              <Routes
-                selectEvent={this.selectEvent}
-                selectVideo={this.selectVideo}
-                toggleEditKpi={this.toggleEditKpi}
-                toggleFooter={this.toggleFooter}
-                toggleStar={this.toggleStar}
-                fetchQuery={this.fetchQuery}
-                saveQuery={this.saveQuery}
-                save={this.save}
-                hidden={this.state.hidden}
-                {...this.state}
-              />
-            </div>
-          </div>
-        </div>
+        <Routes
+          selectEvent={this.selectEvent}
+          selectVideo={this.selectVideo}
+          toggleEditKpi={this.toggleEditKpi}
+          toggleFooter={this.toggleFooter}
+          toggleStar={this.toggleStar}
+          fetchQuery={this.fetchQuery}
+          saveQuery={this.saveQuery}
+          save={this.save}
+          hidden={this.state.hidden}
+          {...this.state}
+        />
 
         <Modals
           selectEvent={this.selectEvent}

+ 1 - 0
src/components/Distribution/TestResults.tsx

@@ -3,6 +3,7 @@ import Provider from "./ProviderLatency";
 
 const Results = (props: { providers: any[]; uploadErrors: any[] }) => {
   const { uploadErrors, providers } = props;
+  return <></>
   return (
     <div className="mt-2">
       <h2>Upload errors</h2>

+ 1 - 0
src/components/Distribution/index.tsx

@@ -73,6 +73,7 @@ const Distribution = (props: {
       ) : (
         <Loading target="distribution buckets" />
       )}
+
       <TestResults uploadErrors={uploadErrors} providers={providers} />
     </div>
   );

+ 1 - 1
src/components/Loading.tsx

@@ -8,7 +8,7 @@ const Loading = (props: { target?: string; gridSize?: GridSize }) => {
   const title = target ? `Fetching ${target}` : "Connecting to Websocket";
   return (
     <Grid style={{ textAlign: "center" }} lg={gridSize ? gridSize : 6} item>
-      <Button variant="warning" className="m-1 py-0 mr-2 mt-3">
+      <Button variant="warning" className="text-left m-1 py-0 mr-2 mt-3">
         <Spinner animation="border" variant="dark" size="sm" className="mr-1" />
         {title}
       </Button>

+ 1 - 2
src/components/Media/index.tsx

@@ -10,8 +10,7 @@ const query = `query {
   storageBags { id 
     distributionBuckets { operators { metadata{nodeEndpoint } } }
     objects { id size  
-      videoMedia {id categoryId
-      isCensored     isExplicit    isFeatured    isPublic
+      videoMedia {id categoryId isCensored isExplicit isPublic
       thumbnailPhotoId duration title description
       mediaMetadata {pixelWidth pixelHeight size encoding {codecName} } }               
     }  }

+ 5 - 0
src/components/Routes/index.tsx

@@ -32,6 +32,7 @@ const Grading = React.lazy(() => import("../Grading"));
 const Data = React.lazy(() => import("../Data"));
 const Openings = React.lazy(() => import("../Openings"));
 const Notes = React.lazy(() => import("../Notes"));
+const Media = React.lazy(() => import("../Media"));
 const Settings = React.lazy(() => import("../Settings"));
 
 interface IProps extends IState {
@@ -110,6 +111,10 @@ const Routes = (props: IProps) => {
           path="/curation"
           render={(routeprops) => <Curation {...routeprops} {...props} />}
         />
+        <Route
+          path="/media"
+          render={(routeprops) => <Media {...routeprops} {...props} />}
+        />
         <Route
           path="/forum/threads/:thread"
           render={(routeprops) => <Forum {...routeprops} {...props} />}

+ 1 - 2
src/state.ts

@@ -48,13 +48,12 @@ export const initialState = {
   queriesUpdated: {},
   notes: { index: "Notes are automatically saved in your browser." },
   note: "index",
-  showNotes: false,
   settings: {
     connectApi: false,
     connectSocket: true,
     queryInterval: 60,
     saveInterval: 10,
-    theme: "light",
+    theme: "dark",
     expandNotes: false,
     useStorage: true,
     searches: [],