forked from minmatarfleet/minmatar.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated combat log and added fleet logs (minmatarfleet#938)
* Added stored combat logs * Remove categories on the log listing * Updated combat log and added fleet logs
- Loading branch information
1 parent
8f36796
commit 50eed00
Showing
24 changed files
with
846 additions
and
67 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
frontend/app/src/components/blocks/FittingCombatLogItem.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
--- | ||
import { i18n } from '@helpers/i18n' | ||
const { t, lang, translatePath } = i18n(Astro.url) | ||
import type { SavedCombatLog, Fitting } from '@dtypes/api.minmatar.org' | ||
interface Props { | ||
log: SavedCombatLog; | ||
fitting: Fitting | undefined; | ||
} | ||
const { | ||
log, | ||
fitting, | ||
} = Astro.props | ||
const CAPSULE_TYPE_ID = 670 | ||
import { format_date_short } from '@helpers/date' | ||
import Flexblock from "@components/compositions/Flexblock.astro"; | ||
import Wrapper from "@components/compositions/Wrapper.astro"; | ||
import ComponentBlock from '@components/blocks/ComponentBlock.astro'; | ||
import ItemPicture from "@components/blocks/ItemPicture.astro"; | ||
import ClipboardButton from "@components/blocks/ClipboardButton.astro"; | ||
--- | ||
|
||
<ComponentBlock class="[ fitting-combatlog-card card-animated ]" padding_block='0' padding_inline='0'> | ||
<Flexblock gap="0"> | ||
<ItemPicture | ||
item_id={fitting?.ship_id ? fitting?.ship_id : CAPSULE_TYPE_ID} | ||
size={256} | ||
icon_quality={512} | ||
mask={true} | ||
/> | ||
<Wrapper class="[ fitting-combatlog-card-body ]" padding_block="var(--space-2xs)" padding_inline="var(--space-2xs)"> | ||
<Flexblock gap='0'> | ||
<h4>{fitting?.name ?? t('unknown_fitting_name')}</h4> | ||
<small>{format_date_short(lang, log.uploaded_at)}</small> | ||
</Flexblock> | ||
</Wrapper> | ||
{fitting && | ||
<Wrapper class="[ fitting-combatlog-card-actions ]" padding_block="var(--space-2xs)" padding_inline="var(--space-2xs)"> | ||
<ClipboardButton text={t('share')} narrow={true} id={fitting.id.toString()}>{translatePath(`${Astro.url}/${log.id}`)}</ClipboardButton> | ||
</Wrapper> | ||
} | ||
</Flexblock> | ||
</ComponentBlock> | ||
|
||
<style lang="scss"> | ||
.fitting-combatlog-card { | ||
position: relative; | ||
|
||
&:hover { | ||
.fitting-combatlog-card-actions { | ||
opacity: 1; | ||
} | ||
} | ||
|
||
.fitting-combatlog-card-body { | ||
position: absolute; | ||
bottom: 0; | ||
left: 0; | ||
right: 0; | ||
} | ||
|
||
.fitting-combatlog-card-actions { | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
opacity: 0; | ||
} | ||
} | ||
|
||
h4 { | ||
font-weight: 400; | ||
} | ||
|
||
small { | ||
color: var(--fleet-yellow); | ||
} | ||
</style> |
98 changes: 98 additions & 0 deletions
98
frontend/app/src/components/blocks/FleetCombatLogItem.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
--- | ||
import { i18n } from '@helpers/i18n' | ||
const { t, lang, translatePath } = i18n(Astro.url) | ||
import type { SavedCombatLog } from '@dtypes/api.minmatar.org' | ||
interface Props { | ||
log: SavedCombatLog; | ||
} | ||
const { | ||
log, | ||
} = Astro.props | ||
import { format_date_short } from '@helpers/date' | ||
import Flexblock from "@components/compositions/Flexblock.astro"; | ||
import Wrapper from "@components/compositions/Wrapper.astro"; | ||
import ComponentBlock from '@components/blocks/ComponentBlock.astro'; | ||
import ClipboardButton from "@components/blocks/ClipboardButton.astro"; | ||
import FleetEvEIcon from '@components/icons/FleetEvEIcon.astro'; | ||
--- | ||
|
||
<ComponentBlock class="[ fleet-combatlog-card card-animated ]" padding_block='0' padding_inline='0'> | ||
<Flexblock gap="0"> | ||
<picture class="animated"> | ||
<img | ||
class="[ mask ]" | ||
loading="lazy" | ||
height="256" | ||
width="256" | ||
src="/images/combatlog-fleet-card.jpg" | ||
/> | ||
</picture> | ||
<div class="[ fleet-icon ]"><FleetEvEIcon /></div> | ||
<Wrapper class="[ fleet-combatlog-card-body ]" padding_block="var(--space-2xs)" padding_inline="var(--space-2xs)"> | ||
<Flexblock gap='0'> | ||
<h4>{t('fleet')} {log.fleet_id}</h4> | ||
<small>{format_date_short(lang, log.uploaded_at)}</small> | ||
</Flexblock> | ||
</Wrapper> | ||
<Wrapper class="[ fleet-combatlog-card-actions ]" padding_block="var(--space-2xs)" padding_inline="var(--space-2xs)"> | ||
<ClipboardButton text={t('share')} narrow={true} id={log.fleet_id.toString()}>{translatePath(`${Astro.url}/${log.id}`)}</ClipboardButton> | ||
</Wrapper> | ||
</Flexblock> | ||
</ComponentBlock> | ||
|
||
<style lang="scss"> | ||
.fleet-icon { | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%, -50%); | ||
} | ||
|
||
.fleet-combatlog-card { | ||
position: relative; | ||
|
||
&:hover { | ||
.fleet-combatlog-card-actions { | ||
opacity: 1; | ||
} | ||
} | ||
|
||
.fleet-combatlog-card-body { | ||
position: absolute; | ||
bottom: 0; | ||
left: 0; | ||
right: 0; | ||
} | ||
|
||
.fleet-combatlog-card-actions { | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
opacity: 0; | ||
} | ||
} | ||
|
||
h4 { | ||
font-weight: 400; | ||
} | ||
|
||
small { | ||
color: var(--fleet-yellow); | ||
} | ||
|
||
img { | ||
object-fit: cover; | ||
width: 100%; | ||
} | ||
|
||
.mask { | ||
-webkit-mask-image: linear-gradient(to bottom,rgb(0,0,0) 0%,rgba(0,0,0,.7) 50%,transparent 100%); | ||
mask-image: linear-gradient(to bottom,rgb(0,0,0) 0%,rgba(0,0,0,.7) 50%,transparent 100%); | ||
} | ||
</style> |
34 changes: 34 additions & 0 deletions
34
frontend/app/src/components/blocks/FleetCombatLogListItem.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
import { i18n } from '@helpers/i18n' | ||
const { lang, t, translatePath } = i18n(Astro.url) | ||
import type { FleetCombatLog } from '@dtypes/layout_components' | ||
import { format_date_time } from '@helpers/date' | ||
interface Props { | ||
log: FleetCombatLog; | ||
} | ||
const { | ||
log, | ||
} = Astro.props | ||
import PilotBadge from '@components/blocks/PilotBadge.astro'; | ||
import StylessButton from './StylessButton.astro'; | ||
--- | ||
|
||
<StylessButton class="[ w-full ]" href={translatePath(`/intel/combatlog/${log.id}`)}> | ||
<PilotBadge | ||
class="[ w-full ]" | ||
character_id={log.logger.character_id} | ||
character_name={log.logger.character_name} | ||
> | ||
<small>{format_date_time(lang, log.uploaded_at)}</small> | ||
</PilotBadge> | ||
</StylessButton> | ||
|
||
<style lang="scss"> | ||
small { | ||
color: var(--foreground); | ||
} | ||
</style> |
Oops, something went wrong.