fix: Prettier
All checks were successful
CI / Get Changed Files (pull_request) Successful in 28s
CI / Checkstyle Main (pull_request) Has been skipped
CI / Docker backend validation (pull_request) Has been skipped
CI / Docker frontend validation (pull_request) Successful in 1m19s
CI / eslint (pull_request) Successful in 25s
CI / oxlint (pull_request) Successful in 23s
CI / prettier (pull_request) Successful in 21s
CI / test-build (pull_request) Successful in 32s
All checks were successful
CI / Get Changed Files (pull_request) Successful in 28s
CI / Checkstyle Main (pull_request) Has been skipped
CI / Docker backend validation (pull_request) Has been skipped
CI / Docker frontend validation (pull_request) Successful in 1m19s
CI / eslint (pull_request) Successful in 25s
CI / oxlint (pull_request) Successful in 23s
CI / prettier (pull_request) Successful in 21s
CI / test-build (pull_request) Successful in 32s
This commit is contained in:
parent
8b6e026e0a
commit
bb5f26ab60
3 changed files with 30 additions and 21 deletions
|
@ -98,9 +98,18 @@ button:not([disabled]):active {
|
|||
|
||||
/* Animation for results */
|
||||
@keyframes popIn {
|
||||
0% { transform: scale(0.8); opacity: 0; }
|
||||
70% { transform: scale(1.1); opacity: 1; }
|
||||
100% { transform: scale(1); opacity: 1; }
|
||||
0% {
|
||||
transform: scale(0.8);
|
||||
opacity: 0;
|
||||
}
|
||||
70% {
|
||||
transform: scale(1.1);
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.result-text {
|
||||
|
|
|
@ -20,14 +20,7 @@ import { CoinflipGame, CoinflipRequest } from './models/coinflip.model';
|
|||
@Component({
|
||||
selector: 'app-coinflip',
|
||||
standalone: true,
|
||||
imports: [
|
||||
AnimatedNumberComponent,
|
||||
CurrencyPipe,
|
||||
FormsModule,
|
||||
CommonModule,
|
||||
NgIf,
|
||||
NgClass
|
||||
],
|
||||
imports: [AnimatedNumberComponent, CurrencyPipe, FormsModule, CommonModule, NgIf, NgClass],
|
||||
templateUrl: './coinflip.component.html',
|
||||
styleUrl: './coinflip.component.css',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
|
@ -231,7 +224,10 @@ export default class CoinflipComponent implements OnInit {
|
|||
const input = event.target as HTMLInputElement;
|
||||
const currentValue = input.value;
|
||||
const cursorPosition = input.selectionStart || 0;
|
||||
const newValue = currentValue.substring(0, cursorPosition) + event.key + currentValue.substring(input.selectionEnd || cursorPosition);
|
||||
const newValue =
|
||||
currentValue.substring(0, cursorPosition) +
|
||||
event.key +
|
||||
currentValue.substring(input.selectionEnd || cursorPosition);
|
||||
const numValue = Number(newValue);
|
||||
|
||||
// Prevent values greater than balance
|
||||
|
|
4
justfile
4
justfile
|
@ -21,3 +21,7 @@ build-be:
|
|||
# Builds the frontend docker image
|
||||
build-fe:
|
||||
docker buildx build -f frontend/.docker/Dockerfile -t git.kjan.de/szut/casino-frontend:latest frontend
|
||||
|
||||
# Formats the code duh
|
||||
format:
|
||||
cd frontend && bunx prettier --write "src/**/*.{ts,html,css,scss}"
|
||||
|
|
Reference in a new issue