Skip to content

Commit

Permalink
feat: use symbol to represent space key
Browse files Browse the repository at this point in the history
  • Loading branch information
andy23512 committed May 11, 2024
1 parent 5a85057 commit a865e2a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/app/pages/home-page/home-page.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ <h1 class="mb-0 text-4xl text-alnitak-500">Alnitak</h1>
<span>An unofficial CharaChorder One Practice Tool</span>
</header>
<span
>Use <kbd>Space</kbd> key to enter the first lesson, or select a lesson from
the side menu.</span
>Use <kbd [innerHTML]="'space' | hotkeysShortcut"></kbd> key to enter the
first lesson, or select a lesson from the side menu.</span
>
<div>
<a
Expand Down
11 changes: 9 additions & 2 deletions src/app/pages/home-page/home-page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,22 @@ import {
import { MatButton } from '@angular/material/button';
import { MatIcon } from '@angular/material/icon';
import { Router, RouterLink } from '@angular/router';
import { HotkeysService } from '@ngneat/hotkeys';
import { HotkeysService, HotkeysShortcutPipe } from '@ngneat/hotkeys';
import { SwitchComponent } from 'src/app/components/switch/switch.component';
import { CharaChorderOneLayer } from 'src/app/models/device-layout.models';
import { pickRandomItem } from 'src/app/utils/random.utils';

@Component({
selector: 'app-home-page',
standalone: true,
imports: [CommonModule, MatButton, MatIcon, RouterLink, SwitchComponent],
imports: [
CommonModule,
MatButton,
MatIcon,
RouterLink,
SwitchComponent,
HotkeysShortcutPipe,
],
templateUrl: './home-page.component.html',
styleUrl: './home-page.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/lesson-page/lesson-page.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
(click)="startLesson()"
>
<mat-icon class="scale-125 text-white">play_arrow</mat-icon> Start /
Resume <kbd>Space</kbd>
Resume <kbd [innerHTML]="'space' | hotkeysShortcut"></kbd>
</div>
</div>
<a
Expand Down

0 comments on commit a865e2a

Please sign in to comment.