Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 src/features/XIT/FLT/FLEET.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ xit.add({
name: 'FLEET',
description: 'Enhanced fleet table with detailed status, cargo, fuel, and quick actions.',
component: () => FLT,
bufferSize: [500, 300],
});
29 changes: 22 additions & 7 deletions src/features/XIT/FLT/FuelHeaderButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ const emit = defineEmits<{ refuel: [] }>();

<template>
<span :class="$style.container">
<PrunButton
dark
inline
:class="[$style.button, C.fonts.fontRegular, C.type.typeRegular]"
@click.stop="emit('refuel')">
<PrunButton :class="$style.button" @click.stop="emit('refuel')">
{{ FLT_FUEL_HEADER_LABEL }}
</PrunButton>
<slot />
Expand All @@ -27,7 +23,26 @@ const emit = defineEmits<{ refuel: [] }>();
gap: 6px;
}

.button {
font-size: 12px;
/* Beat Button__btn so the label inherits Name / Cargo / Repair header text. */
.container .button,
.container .button:hover,
.container .button:focus,
.container .button:active {
appearance: none;
background: none;
border: none;
box-shadow: none;
padding: 0;
margin: 0;
min-height: 0;
min-width: 0;
font: inherit;
font-size: inherit;
font-weight: inherit;
color: inherit;
line-height: inherit;
letter-spacing: inherit;
text-transform: none;
cursor: pointer;
}
</style>
15 changes: 12 additions & 3 deletions src/features/XIT/FLT/defaults.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,19 @@ describe('XIT FLT fuel header', () => {

expect(FLT_FUEL_HEADER_LABEL).toBe('Fuel');
expect(header).toContain('{{ FLT_FUEL_HEADER_LABEL }}');
expect(header).toContain('C.fonts.fontRegular');
expect(header).toContain('C.type.typeRegular');
expect(header).toContain('font-size: 12px');
expect(header).toContain('font: inherit');
expect(header).toContain('font-size: inherit');
expect(header).toContain('color: inherit');
expect(header).toContain('text-transform: none');
expect(header).not.toContain('C.type.typeRegular');
expect(header).not.toContain('font-size: 12px');
expect(header).toMatch(/<PrunButton[^>]*@click\.stop="emit\('refuel'\)"/);
expect(header).not.toMatch(/>\s*REFUEL\s*</);
});
});

describe('XIT FLT undocked buffer size', () => {
it('defaults undocked width to 500 and keeps height at the generic 300', () => {
expect(productSource('FLEET.ts')).toContain('bufferSize: [500, 300]');
});
});
Loading