Skip to content

Commit

Permalink
fix build break
Browse files Browse the repository at this point in the history
  • Loading branch information
Pistonight committed Feb 4, 2024
1 parent d075ff1 commit 1c78ca6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
13 changes: 7 additions & 6 deletions web-client/src/ui/toolbar/OpenCloseProject.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,13 @@ const useOpenCloseProjectControl = () => {
}

if (await editor.hasUnsavedChanges()) {
const yes = await kernel.showAlert(
"Unsaved changes",
"There are unsaved changes in the editor. Continue closing will discard all changes. Are you sure you want to continue?",
"Discard changes",
"Cancel",
);
const yes = await kernel.getAlertMgr().show({
title: "Unsaved changes",
message:
"There are unsaved changes in the editor. Continue closing will discard all changes. Are you sure you want to continue?",
okButton: "Discard changes",
cancelButton: "Cancel",
});
if (!yes) {
return;
}
Expand Down
12 changes: 6 additions & 6 deletions web-client/src/ui/toolbar/SyncProject.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ const useSyncProjectControl = () => {
// failure could be due to project structure change. try again
const result2 = await editor.loadChangesFromFs();
if (result2.isErr()) {
await kernel.showAlert(
"Error",
"Fail to load changes from file system. Please try again.",
"Close",
"",
);
await kernel.getAlertMgr().show({
title: "Error",
message:
"Fail to load changes from file system. Please try again.",
okButton: "Close",
});
}
}
incFileSysSerial();
Expand Down

0 comments on commit 1c78ca6

Please sign in to comment.