feat: move history, export import fixed, timer added
This commit is contained in:
@@ -58,6 +58,11 @@
|
||||
<span>Join Game</span>
|
||||
<small>{{ joiningGame ? 'Joining...' : 'Enter game ID' }}</small>
|
||||
</button>
|
||||
|
||||
<button type="button" class="mode mode-active" (click)="toggleImportGameForm()" [disabled]="importing">
|
||||
<span>Import Game</span>
|
||||
<small>{{ importing ? 'Importing...' : 'FEN or PGN' }}</small>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@if (showJoinGameForm) {
|
||||
@@ -92,6 +97,49 @@
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (showImportGameForm) {
|
||||
<div class="import-game-form">
|
||||
<p>Import game</p>
|
||||
<div class="import-mode-group" role="radiogroup" aria-label="Import mode">
|
||||
<label class="import-mode-option">
|
||||
<input
|
||||
type="radio"
|
||||
name="importMode"
|
||||
[checked]="importMode === 'fen'"
|
||||
(change)="setImportMode('fen')"
|
||||
[disabled]="importing"
|
||||
/>
|
||||
<span>FEN</span>
|
||||
</label>
|
||||
<label class="import-mode-option">
|
||||
<input
|
||||
type="radio"
|
||||
name="importMode"
|
||||
[checked]="importMode === 'pgn'"
|
||||
(change)="setImportMode('pgn')"
|
||||
[disabled]="importing"
|
||||
/>
|
||||
<span>PGN</span>
|
||||
</label>
|
||||
</div>
|
||||
<textarea
|
||||
class="import-game-text"
|
||||
[(ngModel)]="importText"
|
||||
[placeholder]="importMode === 'fen' ? 'Paste FEN here' : 'Paste PGN here'"
|
||||
[disabled]="importing"
|
||||
rows="5"
|
||||
></textarea>
|
||||
<button
|
||||
type="button"
|
||||
class="join-game-btn join"
|
||||
(click)="submitImportedGame()"
|
||||
[disabled]="importing || !importText.trim()"
|
||||
>
|
||||
{{ importing ? 'Importing...' : 'Done' }}
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (errorMessage) {
|
||||
<p class="error">{{ errorMessage }}</p>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user