mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-22 21:45:56 +03:00
migration to new flat structure
This commit is contained in:
parent
3c2d78f451
commit
37b9bac7b0
@ -159,7 +159,7 @@ export const upload = async ({ file, onProgress, bucketName, uploadAbort }) => {
|
||||
}
|
||||
|
||||
let item = res.data.data;
|
||||
if (item.type.startsWith("image/")) {
|
||||
if (Validations.isPreviewableImage(item.type)) {
|
||||
let url = Strings.getURLfromCID(item.cid);
|
||||
try {
|
||||
let blurhash = await encodeImageToBlurhash(url);
|
||||
|
@ -226,7 +226,7 @@ function Controls() {
|
||||
<System.H5 color="textGrayDark" as="p" style={{ textAlign: "center" }}>
|
||||
Drop or select files to save to Slate
|
||||
<br />
|
||||
(we recommend uploading less than 200 files at a time)
|
||||
(we recommend uploading fewer than 200 files at a time)
|
||||
</System.H5>
|
||||
<System.ButtonTertiary
|
||||
type="label"
|
||||
@ -297,7 +297,7 @@ function Summary({ viewer }) {
|
||||
uploadSummary.push({
|
||||
id: file.id,
|
||||
name: file.filename,
|
||||
total: file.data.size,
|
||||
total: file.size,
|
||||
createdAt: file.createdAt,
|
||||
status: "saved",
|
||||
libraryId: idx,
|
||||
@ -354,8 +354,8 @@ const SummaryBox = () => {
|
||||
<System.H5 color="textGrayDark" style={{ marginTop: 12 }}>
|
||||
{Strings.bytesToSize(totalBytesUploaded, 0)} of {Strings.bytesToSize(totalBytes, 0)}{" "}
|
||||
<Show when={uploadRemainingTime && uploadRemainingTime !== Infinity}>
|
||||
– {Strings.getRemainingTime(uploadRemainingTime)} (Please don’t close the browser tab
|
||||
during this time)
|
||||
– {Strings.getRemainingTime(uploadRemainingTime)} (Please keep this tab open during
|
||||
uploading)
|
||||
</Show>
|
||||
</System.H5>
|
||||
<System.ButtonTertiary
|
||||
@ -493,7 +493,7 @@ const SummaryTable = ({ uploadSummary, viewer, fileLoading, retry, cancel, ...pr
|
||||
</TableButton>
|
||||
</Match>
|
||||
<Match when={row.status === "failed"}>
|
||||
<TableButton onClick={() => retry({ fileKey: row.id })}> Retry</TableButton>
|
||||
<TableButton onClick={() => retry({ fileKey: row.id })}>Retry</TableButton>
|
||||
</Match>
|
||||
</Switch>
|
||||
</div>
|
||||
|
@ -22,7 +22,7 @@ import WebsitePrototypeWrapper from "~/components/core/WebsitePrototypeWrapper";
|
||||
import ProcessedText from "~/components/core/ProcessedText";
|
||||
import ScenePage from "~/components/core/ScenePage";
|
||||
import ScenePageHeader from "~/components/core/ScenePageHeader";
|
||||
import SquareButtonGray, { STYLES_SQUARE_BUTTON_GRAY } from "~/components/core/SquareButtonGray";
|
||||
import SquareButtonGray from "~/components/core/SquareButtonGray";
|
||||
import EmptyState from "~/components/core/EmptyState";
|
||||
import DataView from "~/components/core/DataView";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user