mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-07 21:47:02 +09:00
JS-6300: Copy link
This commit is contained in:
parent
1a99c94cae
commit
600a3b19b4
3 changed files with 6 additions and 5 deletions
|
@ -33,8 +33,8 @@ const getSections = () => {
|
|||
{ id: 'lock', name: translate('popupShortcutMainBasics22'), keys: [ cmdKey, 'alt', 'l' ] },
|
||||
{ id: 'undo', name: translate('popupShortcutMainBasics6'), keys: [ cmdKey, 'z' ] },
|
||||
{ id: 'redo', name: translate('popupShortcutMainBasics7'), keys: [ cmdKey, 'shift', 'z' ] },
|
||||
{ id: 'createWidget', name: translate('popupShortcutMainBasics25'), keys: [ cmdKey, 'shift', 'w' ] },
|
||||
{ id: 'copyPageLink', name: translate('popupShortcutCopyPageLink'), keys: [ cmdKey, 'shift', 'c' ] },
|
||||
{ id: 'createWidget', name: translate('menuObjectCreateWidget'), keys: [] },
|
||||
{ id: 'copyPageLink', name: translate('commonCopyLink'), keys: [] },
|
||||
]
|
||||
},
|
||||
|
||||
|
|
|
@ -1303,7 +1303,6 @@
|
|||
"popupShortcutMainBasics22": "Lock Anytype",
|
||||
"popupShortcutMainBasics23": "Previous Space",
|
||||
"popupShortcutMainBasics24": "Lock / Unlock Object",
|
||||
"popupShortcutMainBasics25": "Create widget",
|
||||
|
||||
"popupShortcutMainTextStyle": "Text style",
|
||||
"popupShortcutMainTextStyle1": "Bold",
|
||||
|
|
|
@ -152,9 +152,11 @@ class Keyboard {
|
|||
const isMain = this.isMain();
|
||||
const canWrite = U.Space.canMyParticipantWrite();
|
||||
const selection = S.Common.getRef('selectionProvider');
|
||||
const rootId = this.getRootId();
|
||||
|
||||
this.shortcut('toggleSidebar', e, () => {
|
||||
e.preventDefault();
|
||||
|
||||
sidebar.toggleOpenClose();
|
||||
});
|
||||
|
||||
|
@ -309,7 +311,6 @@ class Keyboard {
|
|||
this.shortcut('createWidget', e, () => {
|
||||
e.preventDefault();
|
||||
|
||||
const rootId = this.getRootId();
|
||||
const first = S.Block.getFirstBlock(S.Block.widgets, 1, it => it.isWidget());
|
||||
|
||||
Action.createWidgetFromObject(rootId, rootId, first?.id, I.BlockPosition.Top, analytics.route.shortcut);
|
||||
|
@ -318,9 +319,10 @@ class Keyboard {
|
|||
// Copy page link
|
||||
this.shortcut('copyPageLink', 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);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue