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
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(' ')
}
}