mirror of
https://github.com/drawdb-io/drawdb.git
synced 2026-02-12 02:00:40 +08:00
Handle incorrect links and corrupted files
This commit is contained in:
@@ -1084,7 +1084,7 @@ export default function ControlPanel({
|
||||
data: result,
|
||||
extension: "md",
|
||||
}));
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
function: () => {},
|
||||
@@ -1604,6 +1604,8 @@ export default function ControlPanel({
|
||||
return t("saving");
|
||||
case State.ERROR:
|
||||
return t("failed_to_save");
|
||||
case State.FAILED_TO_LOAD:
|
||||
return t("failed_to_load");
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -146,10 +146,7 @@ export default function Share({ title }) {
|
||||
</Button>
|
||||
</div>
|
||||
<hr className="opacity-20 mt-3 mb-1" />
|
||||
<div className="text-xs">
|
||||
* Sharing this link will not create a live real-time collaboration
|
||||
session
|
||||
</div>
|
||||
<div className="text-xs">{t("share_info")}</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -356,6 +356,7 @@ export default function WorkSpace() {
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
setSaveState(State.FAILED_TO_LOAD);
|
||||
}
|
||||
},
|
||||
[
|
||||
@@ -369,6 +370,7 @@ export default function WorkSpace() {
|
||||
setTransform,
|
||||
setRedoStack,
|
||||
setUndoStack,
|
||||
setSaveState,
|
||||
],
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user