mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-08 05:57:02 +09:00
JS-6295: open space settings shortcut
This commit is contained in:
parent
9bc401302f
commit
902b4d0efd
3 changed files with 19 additions and 10 deletions
|
@ -54,6 +54,7 @@ const getSections = () => {
|
|||
{
|
||||
name: translate('popupShortcutNavigation'), children: [
|
||||
{ id: 'settings', name: translate('popupShortcutNavigationBasics1'), keys: [ cmdKey, 'comma' ] },
|
||||
{ id: 'settingsSpace', name: translate('popupShortcutNavigationBasics12'), keys: [] },
|
||||
{ id: 'navigation', name: translate('popupShortcutNavigationBasics2'), keys: [ cmdKey, 'o' ] },
|
||||
{ id: 'graph', name: translate('popupShortcutNavigationBasics3'), keys: [ cmdKey, 'alt', 'o' ] },
|
||||
{ id: 'search', name: translate('popupShortcutNavigationBasics4'), keys: [ cmdKey, 'k' ] },
|
||||
|
|
|
@ -1354,6 +1354,7 @@
|
|||
"popupShortcutNavigationBasics9": "Open in a modal window",
|
||||
"popupShortcutNavigationBasics10": "Open in a new window",
|
||||
"popupShortcutNavigationBasics11": "Open Bin",
|
||||
"popupShortcutNavigationBasics12": "Space Settings",
|
||||
"popupShortcutNavigationPage9": "Open Properties",
|
||||
|
||||
"popupShortcutEditorTurn0": "Turn block into a text block",
|
||||
|
|
|
@ -307,18 +307,11 @@ class Keyboard {
|
|||
U.Object.copyLink(object, space, 'web', analytics.route.shortcut);
|
||||
});
|
||||
|
||||
// Move to bin
|
||||
this.shortcut('moveToBin', e, () => {
|
||||
// Settings
|
||||
this.shortcut('settingsSpace', e, () => {
|
||||
e.preventDefault();
|
||||
|
||||
Action[object.isArchived ? 'restore' : 'archive']([ rootId ], analytics.route.shortcut);
|
||||
});
|
||||
|
||||
// Add to favorites
|
||||
this.shortcut('addFavorite', e, () => {
|
||||
e.preventDefault();
|
||||
|
||||
Action.setIsFavorite([ rootId ], !object.isFavorite, analytics.route.shortcut);
|
||||
U.Object.openRoute({ id: 'spaceIndex', layout: I.ObjectLayout.Settings });
|
||||
});
|
||||
|
||||
if (canWrite) {
|
||||
|
@ -341,6 +334,20 @@ class Keyboard {
|
|||
|
||||
// Lock/Unlock
|
||||
this.shortcut('pageLock', e, () => this.onToggleLock());
|
||||
|
||||
// Move to bin
|
||||
this.shortcut('moveToBin', e, () => {
|
||||
e.preventDefault();
|
||||
|
||||
Action[object.isArchived ? 'restore' : 'archive']([ rootId ], analytics.route.shortcut);
|
||||
});
|
||||
|
||||
// Add to favorites
|
||||
this.shortcut('addFavorite', e, () => {
|
||||
e.preventDefault();
|
||||
|
||||
Action.setIsFavorite([ rootId ], !object.isFavorite, analytics.route.shortcut);
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue