mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-07 21:47:02 +09:00
feat(shortcut): add Cmd+Shift+C shortcut to copy current page link
This commit is contained in:
parent
e5e9a94100
commit
0592bfba96
1 changed files with 9 additions and 0 deletions
|
@ -315,6 +315,15 @@ class Keyboard {
|
|||
Action.createWidgetFromObject(rootId, rootId, first?.id, I.BlockPosition.Top, analytics.route.shortcut);
|
||||
});
|
||||
|
||||
// Copy page link
|
||||
this.shortcut(`${cmd}+shift+c`, e, () => {
|
||||
e.preventDefault();
|
||||
const rootId = this.getRootId();
|
||||
const object = S.Detail.get(rootId, rootId);
|
||||
const space = U.Space.getSpaceview();
|
||||
U.Object.copyLink(object, space, 'web', analytics.route.shortcut);
|
||||
});
|
||||
|
||||
// Lock/Unlock
|
||||
this.shortcut('pageLock', e, () => this.onToggleLock());
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue