Added all files successfully converted

This commit is contained in:
Nicola Thouliss
2021-06-03 15:31:18 +10:00
parent c590adf836
commit bfd0529207
58 changed files with 622 additions and 445 deletions

View File

@@ -29,15 +29,14 @@ import Session from "../../network/Session";
import { Grid } from "../../helpers/grid";
import { ImageFile } from "../../helpers/image";
type Resolutions = Record<string, ImageFile>
export type Resolutions = Record<string, ImageFile>
export type Map = {
id: string,
name: string,
owner: string,
file: Uint8Array,
quality: string,
resolutions: Resolutions,
file?: Uint8Array,
quality?: string,
resolutions?: Resolutions,
grid: Grid,
group: string,
width: number,
@@ -48,7 +47,7 @@ export type Map = {
created: number,
showGrid: boolean,
snapToGrid: boolean,
thumbnail: ImageFile,
thumbnail?: ImageFile,
}
export type Note = {
@@ -92,7 +91,7 @@ export type MapState = {
tokens: Record<string, TokenState>,
drawShapes: PathId | ShapeId,
fogShapes: Fog[],
editFlags: string[],
editFlags: ["drawing", "tokens", "notes", "fog"],
notes: Note[],
mapId: string,
}

View File

@@ -1,4 +1,3 @@
import React from "react";
import { Box } from "theme-ui";
import { useMapLoading } from "../../contexts/MapLoadingContext";
@@ -8,8 +7,11 @@ import LoadingBar from "../LoadingBar";
function MapLoadingOverlay() {
const { isLoading, loadingProgressRef } = useMapLoading();
if (!isLoading) {
return null;
}
return (
isLoading && (
<Box
sx={{
position: "absolute",
@@ -29,8 +31,7 @@ function MapLoadingOverlay() {
loadingProgressRef={loadingProgressRef}
/>
</Box>
)
);
);
}
export default MapLoadingOverlay;