fix: NCWF-2 bugs and desing fixes (#7)
Co-authored-by: Lala, Shahd <Shahd.Lala@sybit.de> Reviewed-on: #7
This commit was merged in pull request #7.
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
.board-actions {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
padding: 8px;
|
||||
background: var(--nc-surface);
|
||||
border: 1px solid var(--nc-border);
|
||||
}
|
||||
|
||||
.board-actions.disabled {
|
||||
opacity: 0.5;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.btn {
|
||||
flex: 1;
|
||||
font-family: var(--nc-sans);
|
||||
font-size: 10px;
|
||||
letter-spacing: 0.16em;
|
||||
text-transform: uppercase;
|
||||
font-weight: 600;
|
||||
padding: 8px 10px;
|
||||
cursor: pointer;
|
||||
border: 1px solid var(--nc-border-strong);
|
||||
background: var(--nc-btn-bg, rgba(255, 255, 255, 0.03));
|
||||
color: var(--nc-text);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
transition: background 0.15s, border-color 0.15s, color 0.15s;
|
||||
}
|
||||
|
||||
.btn:hover:not(:disabled) {
|
||||
background: var(--nc-btn-hover-bg, rgba(255, 255, 255, 0.07));
|
||||
border-color: var(--nc-text-muted);
|
||||
}
|
||||
|
||||
.btn:disabled {
|
||||
opacity: 0.4;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
color: var(--nc-danger);
|
||||
border-color: var(--nc-danger-soft, rgba(255, 122, 122, 0.3));
|
||||
}
|
||||
|
||||
.btn-danger:hover:not(:disabled) {
|
||||
background: var(--nc-danger-bg, rgba(255, 122, 122, 0.08));
|
||||
border-color: var(--nc-danger);
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<div class="board-actions" [class.disabled]="isGameFinished">
|
||||
<button class="btn" type="button" [disabled]="isGameFinished" (click)="takeback.emit()">
|
||||
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M21 7v6h-6"/>
|
||||
<path d="M3 17a9 9 0 0 0 15.5-6"/>
|
||||
<path d="M3 7a9 9 0 0 1 15.5 6"/>
|
||||
</svg>
|
||||
Takeback
|
||||
</button>
|
||||
|
||||
<button class="btn" type="button" [disabled]="isGameFinished" (click)="offerDraw.emit()">
|
||||
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M5 12h14"/>
|
||||
<polyline points="12 5 19 12 12 19"/>
|
||||
<polyline points="12 19 5 12 12 5"/>
|
||||
</svg>
|
||||
Offer Draw
|
||||
</button>
|
||||
|
||||
<button class="btn btn-danger" type="button" [disabled]="isGameFinished" (click)="resign.emit()">
|
||||
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M4 4l16 16"/>
|
||||
<path d="M4 20l16-16"/>
|
||||
</svg>
|
||||
Resign
|
||||
</button>
|
||||
</div>
|
||||
@@ -0,0 +1,16 @@
|
||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-board-actions-bar',
|
||||
standalone: true,
|
||||
imports: [],
|
||||
templateUrl: './board-actions-bar.component.html',
|
||||
styleUrl: './board-actions-bar.component.css'
|
||||
})
|
||||
export class BoardActionsBarComponent {
|
||||
@Input() undoAvailable = false;
|
||||
@Input() isGameFinished = false;
|
||||
@Output() takeback = new EventEmitter<void>();
|
||||
@Output() offerDraw = new EventEmitter<void>();
|
||||
@Output() resign = new EventEmitter<void>();
|
||||
}
|
||||
Reference in New Issue
Block a user