mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
autoSave
→ autosave
This commit is contained in:
parent
f68404fbed
commit
d7a015cb3a
9 changed files with 85 additions and 85 deletions
|
@ -910,7 +910,7 @@ class App extends React.Component<ExcalidrawProps, AppState> {
|
|||
.querySelector(".excalidraw")
|
||||
?.classList.toggle("theme--dark", this.state.theme === "dark");
|
||||
|
||||
if (this.state.autoSave && this.state.fileHandle && supported) {
|
||||
if (this.state.autosave && this.state.fileHandle && supported) {
|
||||
this.saveLocalSceneDebounced(
|
||||
this.scene.getElementsIncludingDeleted(),
|
||||
this.state,
|
||||
|
@ -1051,14 +1051,14 @@ class App extends React.Component<ExcalidrawProps, AppState> {
|
|||
|
||||
private saveLocalSceneDebounced = debounce(
|
||||
async (elements: readonly ExcalidrawElement[], state: AppState) => {
|
||||
if (this.state.autoSave && this.state.fileHandle && supported) {
|
||||
if (this.state.autosave && this.state.fileHandle && supported) {
|
||||
try {
|
||||
await saveAsJSON(elements, state);
|
||||
} catch (error) {
|
||||
// shouldn't (almost) ever happen, so let's log it
|
||||
console.error(error);
|
||||
this.setState({
|
||||
autoSave: false,
|
||||
autosave: false,
|
||||
errorMessage: t("toast.autosaveFailed"),
|
||||
});
|
||||
}
|
||||
|
|
|
@ -202,7 +202,7 @@ const ExportModal = ({
|
|||
})}
|
||||
</Stack.Row>
|
||||
</div>
|
||||
{actionManager.renderAction("toggleAutoSave")}
|
||||
{actionManager.renderAction("toggleAutosave")}
|
||||
{actionManager.renderAction("changeExportBackground")}
|
||||
{someElementIsSelected && (
|
||||
<div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue