Loaded a thumb.

master
Sander Vocke 6 years ago
parent 73956825d3
commit 5e6a901cf0
  1. BIN
      public/test_photos_thumbs/54625640b7fc045a134b1fefb661afc1.jpg
  2. BIN
      public/test_photos_thumbs/7363535a705fed1bab1b6699841d53ea.jpg
  3. BIN
      public/test_photos_thumbs/f918453a328369b0d2dcd3518bb9b215.jpg
  4. 8
      src/index.js

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

@ -33,10 +33,10 @@ export class PhotoFromDB extends React.Component {
}
componentDidMount() {
this.props.database.queries_async(["SELECT Images.name, Albums.relativePath FROM Images INNER JOIN Albums ON Images.album=Albums.id;"])
this.props.database.queries_async(["SELECT Images.uniqueHash FROM Images;"])
.then(res => {
var photo = new Photo;
var imagepath = process.env.PUBLIC_URL + "/test_photos" + res[0]["relativePath"] + "/" + res[0]["name"];
var imagepath = process.env.PUBLIC_URL + "/test_photos_thumbs/" + res[0]["uniqueHash"] + ".jpg";
photo.state.path = imagepath;
this.setState({ done: true, photo: photo });
});
@ -60,7 +60,7 @@ const TestDBFetch = ({ sqlite_file }) => (
{error && <DBError error={error} />}
{done && <DBFinished sqlite_file={sqlite_file} db={db} />}
{done && <DBQueryConsole database={db} />}
{/*done && <PhotoFromDB database={db} />*/}
{done && <PhotoFromDB database={db} />}
</>
)}
</ProvideDB>
@ -85,7 +85,7 @@ ReactDOM.render(
<h1>IndexedDB playground:</h1>
<TestDBPlayground db_name="playground_db" />
<h1>Test DB fetching:</h1>
<TestDBFetch sqlite_file={process.env.PUBLIC_URL + "/home_db/digikam4.db"} />
<TestDBFetch sqlite_file={process.env.PUBLIC_URL + "/test_photos_db/digikam4.db"} />
</>,
document.getElementById('root')
);

Loading…
Cancel
Save