1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-08 05:57:02 +09:00

JS-6316: fix

This commit is contained in:
Andrew Simachev 2025-01-27 18:14:14 +01:00
parent 032e73de38
commit 1cbefc3f13
No known key found for this signature in database
GPG key ID: 1DFE44B21443F0EF
2 changed files with 7 additions and 1 deletions

View file

@ -12,6 +12,7 @@ const WidgetSpace = observer(forwardRef<{}, I.WidgetComponent>((props, ref) => {
const isSpaceOwner = U.Space.isMyOwner();
const cn = [ 'body' ];
const cmd = keyboard.cmdSymbol();
const alt = keyboard.altSymbol();
const buttons = [
space.chatId && U.Object.isAllowedChat() ? { id: 'chat', name: translate('commonMainChat') } : null,
space.isShared ? { id: 'member', name: translate('commonMembers') } : null,
@ -269,7 +270,7 @@ const WidgetSpace = observer(forwardRef<{}, I.WidgetComponent>((props, ref) => {
<div className="side right">
<Icon className="search withBackground" onClick={onSearch} tooltip={translate('commonSearch')} tooltipCaption={`${cmd} + S`} />
<Icon className="plus withBackground" onClick={onCreate} tooltip={translate('commonCreateNewObject')} tooltipCaption={`${cmd} + N`} />
<Icon id={`widget-${parent.id}-arrow`} className="arrow withBackground" onClick={onArrow} tooltip={translate('commonSelectType')} />
<Icon id={`widget-${parent.id}-arrow`} className="arrow withBackground" onClick={onArrow} tooltip={translate('commonSelectType')} tooltipCaption={`${cmd} + ${alt} + N`} />
</div>
</div>

View file

@ -237,6 +237,11 @@ class Keyboard {
$('#button-header-relation').trigger('click');
});
// Select type
this.shortcut(`${cmd}+alt+n`, e, () => {
$('#widget-space #widget-space-arrow').trigger('click');
});
// Switch dark/light mode
this.shortcut(`${cmd}+shift+m`, e, () => {
Action.themeSet(!theme ? 'dark' : '');