yeungalan 5 年 前
コミット
ac777e9f3c
3 ファイル変更15 行追加9 行削除
  1. 2 2
      photo/src/FolderList.js
  2. 12 6
      photo/src/ImageList.js
  3. 1 1
      photo/src/SearchAppMenu.js

+ 2 - 2
photo/src/FolderList.js

@@ -9,7 +9,7 @@ import InfoIcon from '@material-ui/icons/Info';
 import tileData from './tileData';
 import { useEffect } from 'react';
 import imageList from './imageList.js';
-
+import LinearProgress from '@material-ui/core/LinearProgress';
 
 const useStyles = makeStyles((theme) => ({
     root: {
@@ -86,7 +86,7 @@ export default function TitlebarGridList(props) {
     if (error) {
         return <div>Error: {error.message}</div>;
     } else if (!isLoaded) {
-        return <div>Loading...</div>;
+        return <div><LinearProgress /></div>;
     } else {
         return (
             <div className={classes.root}>

+ 12 - 6
photo/src/ImageList.js

@@ -2,6 +2,7 @@ import PropTypes from 'prop-types';
 import React from 'react';
 import ReactDOM from 'react-dom';
 import Gallery from 'react-grid-gallery';
+import LinearProgress from '@material-ui/core/LinearProgress';
 
 class imageList extends React.Component {
     constructor(props) {
@@ -18,7 +19,8 @@ class imageList extends React.Component {
     }
 
     componentDidMount() {
-        fetch("/system/ajgi/interface?script=/Photo/backend/listFile.js", {
+        //fetch("/system/ajgi/interface?script=/Photo/backend/listFile.js", {
+        fetch("https://google.com", {
                 method: 'post',
                 headers: {
                     'Accept': 'application/json',
@@ -52,11 +54,15 @@ class imageList extends React.Component {
 
     render() {
         const { isLoaded, items } = this.state;
-        return ( < Gallery images = { this.state.images }
-            enableLightbox = { true }
-            enableImageSelection = { false }
-            />
-        );
+        if (!isLoaded) {
+            return <div><LinearProgress /></div>;
+        } else {
+            return ( < Gallery images = { this.state.images }
+                enableLightbox = { true }
+                enableImageSelection = { false }
+                />
+            );
+        }
     }
 }
 

+ 1 - 1
photo/src/SearchAppMenu.js

@@ -283,7 +283,7 @@ export default function ButtonAppBar() {
                     <IconButton style={{ color: '#ffffff' }} aria-label="settings" onClick={handleSettingOpen}>
                         <SettingsIcon />
                     </IconButton>
-                    <Avatar alt="Remy Sharp" src="/static/images/avatar/1.jpg" />
+                    <Avatar alt="ArOZ Admin" src="/static/images/avatar/1.jpg" />
                 </Toolbar>
             </AppBar>
             <Drawer