alex/v2-file-notice: quick note when trying to open a v1 file (#1177)

This commit is contained in:
alex 2023-03-24 14:42:28 +00:00 committed by GitHub
parent bd124dc308
commit 784b4503aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -93,6 +93,13 @@ export async function openFromFileSystem(): Promise<null | {
// Parse
const file: TDFile = JSON.parse(json)
if ('tldrawFileFormatVersion' in file) {
alert(
// todo: update this message when we do the actual migration
'This file was created in a newer version of tldraw. Please visit beta.tldraw.com to open it.'
)
return null
}
const fileHandle = blob.handle ?? null