Skip to content
Merged

Next #304

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
00307c6
fixed double toast
exeea Aug 13, 2026
e24d3bb
center
exeea Aug 13, 2026
12770f6
spectator mode
exeea Aug 14, 2026
4c48833
print enlarged as cards
exeea Aug 14, 2026
58d715c
.
exeea Aug 14, 2026
ec48c37
as print summary with formations/abilities
exeea Aug 14, 2026
407e16b
stand attempts count
exeea Aug 14, 2026
8345aab
stand up!
exeea Aug 14, 2026
bf60a91
reset confirmation
exeea Aug 14, 2026
50295a6
test fix
exeea Aug 14, 2026
c7564a8
cover
exeea Aug 14, 2026
58e6547
remove pills in manual mode
exeea Aug 14, 2026
9764b94
water and building
exeea Aug 15, 2026
069d024
IF ammo dependant (fixed MML with SRM ammo)
exeea Aug 15, 2026
7d6736c
.
exeea Aug 15, 2026
3a33206
tooltip locking
exeea Aug 15, 2026
7886eb0
bright primary
exeea Aug 15, 2026
dd5f023
.
exeea Aug 15, 2026
fbf350c
attempts counter
exeea Aug 15, 2026
0f3271c
stand
exeea Aug 15, 2026
b624c38
.
exeea Aug 15, 2026
deab955
allow building to building indirect fire via spotter in TW (distance 1)
exeea Aug 15, 2026
7b62134
test fix (virtual clock)
exeea Aug 15, 2026
07ab624
fixed indirect fire + command console
exeea Aug 15, 2026
8d442dc
better reference tables
exeea Aug 15, 2026
e9d051c
label
exeea Aug 15, 2026
8807056
more corner cases of NARC and target and ECM shielding
exeea Aug 15, 2026
15f7fc4
removed obsolete playtest filter
exeea Aug 15, 2026
12e7f6e
custom TN modifier
exeea Aug 15, 2026
d5b7034
test
exeea Aug 15, 2026
fcc17f7
new flags
exeea Aug 15, 2026
3ca7469
TW Flamers, TW Bombast Laser, Thunder missile targeting terrain only
exeea Aug 15, 2026
90bd3df
cleanup
exeea Aug 15, 2026
bd51345
.
exeea Aug 15, 2026
adab0b8
overview supports table mode
exeea Aug 15, 2026
f0fd8f5
escalating failure
exeea Aug 15, 2026
aec302a
crew/location condition badge
exeea Aug 15, 2026
9495ece
F_SHIELD
exeea Aug 15, 2026
24df117
isShield removed
exeea Aug 15, 2026
17e48e6
shield
exeea Aug 15, 2026
d232b1a
.
exeea Aug 15, 2026
e4fbdd1
shield
exeea Aug 15, 2026
1506785
core shields, fixed claw, critical rolls, critical hits, explosions
exeea Aug 16, 2026
2e84caa
charge
exeea Aug 16, 2026
79fee34
charge fixes
exeea Aug 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Thumbs.db
.env
/src/app/build-meta.ts
/plans
/rules

# Test fixtures (large data files)
/scripts/fixtures/
32 changes: 31 additions & 1 deletion src/app/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,28 @@
</div>
<span>Options</span>
</button>
<hr class="divider home-actions-divider" />
@if (lobbyService.hasLobby()) {
<button type="button" class="home-panel-action" (click)="closeHomeActionsPanel(); manageLobby()">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
<path d="M1.5 6.5C1.5 3.462 3.962 1 7 1s5.5 2.462 5.5 5.5S10.038 12 7 12 1.5 9.538 1.5 6.5Zm13 0c0 1.5-.441 2.898-1.2 4.07A5.5 5.5 0 1 0 13.3 2.43a7.466 7.466 0 0 1 1.2 4.07ZM0 18a4 4 0 0 1 4-4h6a4 4 0 0 1 4 4v4a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1v-4Zm16 0v5h7a1 1 0 0 0 1-1v-4a4 4 0 0 0-4-4h-5.528A5.98 5.98 0 0 1 16 18Z" />
</svg>
<span>Manage Lobby</span>
</button>
<button type="button" class="home-panel-action" (click)="closeHomeActionsPanel(); leaveLobby()">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
<path d="M5 2h9v2H5v16h9v2H5a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Zm12.6 5.6L22 12l-4.4 4.4-1.4-1.4 2-2H9v-2h9.2l-2-2 1.4-1.4Z" />
</svg>
<span>Leave Lobby</span>
</button>
} @else {
<button type="button" class="home-panel-action" (click)="closeHomeActionsPanel(); joinLobby()">
<svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
<path d="M13 5 20 12l-7 7-1.4-1.4 4.6-4.6H4v-2h12.2l-4.6-4.6L13 5Z" />
</svg>
<span>Join Lobby</span>
</button>
}
</div>
</aside>
}
Expand Down Expand Up @@ -173,6 +195,14 @@
</button>
</div>
}
<div class="lobby-footer-actions screen-only">
@if (lobbyService.hasLobby()) {
<button type="button" class="lobby-footer-link" (click)="manageLobby()">Manage Lobby</button>
<button type="button" class="lobby-footer-link" (click)="leaveLobby()">Leave Lobby</button>
} @else {
<button type="button" class="lobby-footer-link" (click)="joinLobby()">Join Lobby</button>
}
</div>
<div class="build-info screen-only" (click)="showBetaDialog();">{{ buildInfo }}</div>
<div class="footer-legal-links">
<a class="footer-link" href="/privacy.html" target="_blank" rel="noopener noreferrer">Privacy Policy</a>
Expand All @@ -192,4 +222,4 @@
</div>
</main>
<app-toasts></app-toasts>
<router-outlet></router-outlet>
<router-outlet></router-outlet>
31 changes: 31 additions & 0 deletions src/app/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,32 @@
cursor: pointer;
}

.lobby-footer-actions {
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
}

.lobby-footer-link {
appearance: none;
border: 0;
background: none;
padding: 0;
color: var(--text-color-secondary);
font: inherit;
font-size: 0.8em;
text-decoration: underline;
text-underline-offset: 2px;
cursor: pointer;
transition: color 0.2s;

&:hover,
&:focus-visible {
color: var(--text-color);
}
}

.footer-legal-links {
display: flex;
flex-wrap: wrap;
Expand Down Expand Up @@ -407,6 +433,11 @@ svg-viewer {
gap: 6px;
}

.home-actions-divider {
margin-top: 8px;
margin-bottom: 8px;
}

.home-panel-action {
position: relative;
width: 100%;
Expand Down
22 changes: 22 additions & 0 deletions src/app/app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { SavedSearchesService } from './services/saved-searches.service';
import { LoggerService } from './services/logger.service';
import { GameSystem } from './models/common.model';
import { AppUpdateService } from './services/app-update.service';
import { LobbyService } from './services/lobby.service';

describe('App', () => {
const reloadHashStorageKey = 'mekbay:sw-update-reload-hash';
Expand All @@ -48,6 +49,7 @@ describe('App', () => {
let urlServiceMock: any;
let savedSearchesServiceMock: any;
let loggerServiceMock: any;
let lobbyServiceMock: any;

beforeEach(async () => {
versionUpdates = new Subject();
Expand Down Expand Up @@ -132,6 +134,12 @@ describe('App', () => {
error: jasmine.createSpy('error'),
handleError: jasmine.createSpy('handleError'),
};
lobbyServiceMock = {
hasLobby: jasmine.createSpy('hasLobby').and.returnValue(false),
promptAndJoin: jasmine.createSpy('promptAndJoin').and.resolveTo(undefined),
showLobbyDialog: jasmine.createSpy('showLobbyDialog').and.resolveTo(undefined),
confirmAndLeave: jasmine.createSpy('confirmAndLeave').and.resolveTo(false),
};

await TestBed.configureTestingModule({
imports: [App],
Expand All @@ -155,6 +163,7 @@ describe('App', () => {
{ provide: UrlService, useValue: urlServiceMock },
{ provide: SavedSearchesService, useValue: savedSearchesServiceMock },
{ provide: LoggerService, useValue: loggerServiceMock },
{ provide: LobbyService, useValue: lobbyServiceMock },
]
}).compileComponents();
});
Expand All @@ -173,6 +182,19 @@ describe('App', () => {
expect(app).toBeTruthy();
});

it('delegates join, manage, and leave lobby actions', () => {
fixture = TestBed.createComponent(App);
const app = fixture.componentInstance;

app.joinLobby();
app.manageLobby();
app.leaveLobby();

expect(lobbyServiceMock.promptAndJoin).toHaveBeenCalled();
expect(lobbyServiceMock.showLobbyDialog).toHaveBeenCalled();
expect(lobbyServiceMock.confirmAndLeave).toHaveBeenCalled();
});

it('does not check for service worker updates immediately after full app startup', () => {
swUpdateMock.isEnabled = true;

Expand Down
16 changes: 15 additions & 1 deletion src/app/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import { AccountAuthService } from './services/account-auth.service';
import { AccountProtectionService } from './services/account-protection.service';
import { AppUpdateService } from './services/app-update.service';
import { LoadingSpinnerComponent } from './components/loading-spinner/loading-spinner.component';
import { LobbyService } from './services/lobby.service';

import { GameSystem } from './models/common.model';
import { Router, RouterOutlet } from '@angular/router';
Expand Down Expand Up @@ -77,6 +78,7 @@ export class App {
forceBuilderService = inject(ForceBuilderService);
protected layoutService = inject(LayoutService);
protected appUpdateService = inject(AppUpdateService);
protected lobbyService = inject(LobbyService);
private wsService = inject(WsService);
private dialogService = inject(DialogsService);
private toastService = inject(ToastService);
Expand Down Expand Up @@ -583,6 +585,18 @@ export class App {
void this.forceBuilderService.showForceGeneratorDialog();
}

joinLobby(): void {
void this.lobbyService.promptAndJoin();
}

manageLobby(): void {
void this.lobbyService.showLobbyDialog();
}

leaveLobby(): void {
void this.lobbyService.confirmAndLeave();
}

openHomeActionsPanel(): void {
this.homeActionsPanelOpen.set(true);
}
Expand Down Expand Up @@ -637,4 +651,4 @@ export class App {
'ignore'
);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,8 @@ export class AlphaStrikeCardComponent {
inputType: 'number',
minimumValue: - (isArmor ? state.armor() + state.pendingArmor() : state.internal() + state.pendingInternal()),
maximumValue: isArmor ? unit.getUnit().as.Arm : unit.getUnit().as.Str,
defaultValue: 0
defaultValue: 0,
centerInput: true,
} as InputDialogData
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
background: var(--text-color);
opacity: 0.3;

&:last-child {
display: none;
}

@media print {
display: none;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ <h2>Network Configuration</h2>
<feDropShadow dx="0" dy="0" stdDeviation="4" flood-color="rgba(255,0,0,0.8)" />
</filter>
<filter id="pin-hover-glow" x="-100%" y="-100%" width="300%" height="300%">
<feDropShadow dx="0" dy="0" stdDeviation="6" flood-color="rgb(154, 154, 255)" />
<feDropShadow dx="0" dy="0" stdDeviation="6" flood-color="rgb(174, 174, 253)" />
</filter>
<filter id="pin-hover-glow-danger" x="-100%" y="-100%" width="300%" height="300%">
<feDropShadow dx="0" dy="0" stdDeviation="6" flood-color="rgba(255,0,0,1)" />
Expand Down
Loading
Loading