Skip to content

Commit

Permalink
Updated fleet combat log card (minmatarfleet#949)
Browse files Browse the repository at this point in the history
  • Loading branch information
beautifulmim authored Dec 9, 2024
1 parent 4be3bff commit 30c1812
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
9 changes: 7 additions & 2 deletions frontend/app/src/components/blocks/FleetCombatLogCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,14 @@ import ClipboardButton from '@components/blocks/ClipboardButton.astro';
{translatePath(`${get_app_url(`/intel/combatlog/${log.id}`)}`)}
</ClipboardButton>

<Flexblock gap='0'>
<Flexblock gap='var(--space-3xs)'>
<h4>{log.logger.character_name}</h4>
<small>{format_date_time(lang, log.uploaded_at)}</small>
<Flexblock gap='0'>
<small>{format_date_time(lang, log.uploaded_at)}</small>
{log.character_name &&
<small>On {`${log.character_name} @ ${log.system_name}`}</small>
}
</Flexblock>
</Flexblock>
</Card>
</StylessButton>
Expand Down
2 changes: 2 additions & 0 deletions frontend/app/src/helpers/fetching/combatlog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ export async function get_fleet_combatlogs(access_token:string, fleet_id:number)
id: log.id,
uploaded_at: log.uploaded_at,
user_id: log.user_id,
character_name: log.character_name,
system_name: log.system_name,
logger: logger !== undefined ? {
character_id: logger.character_id,
character_name: logger.character_name,
Expand Down
1 change: 1 addition & 0 deletions frontend/app/src/pages/intel/combatlog.astro
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ try {
})
fleets = await get_fleets(false)
fleets = fleets.sort( (a, b) => { return b - a })
fleets_options = fleets.map(fleet => {
return {
label: `${t('fleet')} ${fleet}`,
Expand Down
2 changes: 2 additions & 0 deletions frontend/app/src/types/api.minmatar.org.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,8 @@ export interface SavedCombatLog {
user_id: number;
fleet_id: number;
fitting_id: number;
character_name: string;
system_name: string;
}

export interface CombatLogMax {
Expand Down
2 changes: 2 additions & 0 deletions frontend/app/src/types/layout_components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,8 @@ export interface FleetCombatLog {
uploaded_at: Date;
user_id: number;
logger: CharacterBasic;
character_name: string;
system_name: string;
}

export interface Damage {
Expand Down

0 comments on commit 30c1812

Please sign in to comment.