Use checksum more broadly, not specifically SHA256

This commit is contained in:
Dane Everitt 2020-08-23 18:06:47 -07:00
parent 4cd44d2025
commit 034a310702
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
8 changed files with 50 additions and 9 deletions

View file

@ -3,7 +3,7 @@ export interface ServerBackup {
isSuccessful: boolean;
name: string;
ignoredFiles: string;
sha256Hash: string;
checksum: string;
bytes: number;
createdAt: Date;
completedAt: Date | null;

View file

@ -46,7 +46,7 @@ export const rawDataToServerBackup = ({ attributes }: FractalResponseData): Serv
isSuccessful: attributes.is_successful,
name: attributes.name,
ignoredFiles: attributes.ignored_files,
sha256Hash: attributes.sha256_hash,
checksum: attributes.checksum,
bytes: attributes.bytes,
createdAt: new Date(attributes.created_at),
completedAt: attributes.completed_at ? new Date(attributes.completed_at) : null,

View file

@ -66,7 +66,7 @@ export default ({ backup }: Props) => {
appear
visible={visible}
onDismissed={() => setVisible(false)}
checksum={backup.sha256Hash}
checksum={backup.checksum}
/>
}
<ConfirmationModal

View file

@ -29,7 +29,7 @@ export default ({ backup, className }: Props) => {
items: data.items.map(b => b.uuid !== backup.uuid ? b : ({
...b,
isSuccessful: parsed.is_successful || true,
sha256Hash: parsed.sha256_hash || '',
checksum: parsed.checksum || '',
bytes: parsed.file_size || 0,
completedAt: new Date(),
})),

View file

@ -6,7 +6,7 @@ const ChecksumModal = ({ checksum, ...props }: RequiredModalProps & { checksum:
<Modal {...props}>
<h3 css={tw`mb-6`}>Verify file checksum</h3>
<p css={tw`text-sm`}>
The SHA256 checksum of this file is:
The checksum of this file is:
</p>
<pre css={tw`mt-2 text-sm p-2 bg-neutral-900 rounded`}>
<code css={tw`block font-mono`}>{checksum}</code>