mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-30 00:29:46 +08:00
refactor(editor): add helper function for undo notification (#11903)
### What Changes - Refactors the `notify` function call with undo button. It is called `notifyWithUndo`, which can associate the visibility of the `NotificationCard` with the top undo item in history stack, such as undo by shortcut `Cmd+Z`. - change icon of the "Insert into page" button. Close [BS-3267](https://linear.app/affine-design/issue/BS-3267/frame和group的insert-into-page图标也更换一下)
This commit is contained in:
@@ -244,7 +244,7 @@ const turnIntoLinkedDoc = {
|
||||
draftedModels,
|
||||
title
|
||||
);
|
||||
notifyDocCreated(std, store);
|
||||
notifyDocCreated(std);
|
||||
|
||||
track('DocCreated', {
|
||||
segment: 'doc',
|
||||
|
||||
@@ -347,7 +347,7 @@ export const moreActions = [
|
||||
other: 'new doc',
|
||||
});
|
||||
|
||||
notifyDocCreated(ctx.std, ctx.store);
|
||||
notifyDocCreated(ctx.std);
|
||||
};
|
||||
|
||||
create().catch(console.error);
|
||||
|
||||
@@ -156,7 +156,7 @@ export class PageKeyboardManager {
|
||||
draftedModels,
|
||||
title
|
||||
).catch(console.error);
|
||||
notifyDocCreated(rootComponent.std, doc);
|
||||
notifyDocCreated(rootComponent.std);
|
||||
})
|
||||
.catch(console.error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user