Fix: fix hotkey arrows (#8583)

This commit is contained in:
shamoon 2025-01-01 21:10:56 -08:00 committed by GitHub
parent 51b0f6e325
commit b0dd77bfd8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 4 deletions

View file

@ -29,7 +29,7 @@ describe('HotkeyDialogComponent', () => {
})
it('should format keys', () => {
expect(component.formatKey('control.a')).toEqual('⌃ + a') // ⌃ + a
expect(component.formatKey('control.a', true)).toEqual('⌘ + a') // ⌘ + a
expect(component.formatKey('control.a')).toEqual('⌃ a') // ⌃ + a
expect(component.formatKey('control.a', true)).toEqual('⌘ a') // ⌘ + a
})
})

View file

@ -9,6 +9,8 @@ const SYMBOLS = {
right: '→', // →
up: '↑', // ↑
down: '↓', // ↓
arrowleft: '←', // ←
arrowright: '→', // →
}
@Component({
@ -33,6 +35,6 @@ export class HotkeyDialogComponent {
return key
.split('.')
.map((k) => SYMBOLS[k] || k)
.join(' + ')
.join(' ')
}
}