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 dialog with SRP (minmatarfleet#934)
- Loading branch information
1 parent
93b7964
commit 90883b4
Showing
3 changed files
with
61 additions
and
64 deletions.
There are no files selected for viewing
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,51 @@ | ||
--- | ||
import { i18n } from '@helpers/i18n' | ||
const { t, translatePath } = i18n(Astro.url) | ||
import type { SRPUI } from '@dtypes/layout_components' | ||
interface Props { | ||
srp: SRPUI; | ||
} | ||
const { | ||
srp, | ||
} = Astro.props | ||
import FlexInline from '@components/compositions/FlexInline.astro'; | ||
import Flexblock from '@components/compositions/Flexblock.astro'; | ||
import FixedFluid from '@components/compositions/FixedFluid.astro'; | ||
import CharacterPicture from '@components/blocks/CharacterPicture.astro'; | ||
import ItemPicture from '@components/blocks/ItemPicture.astro'; | ||
--- | ||
|
||
<FixedFluid | ||
width='64px' | ||
gap='var(--space-s)' | ||
class="[ basis-[250px] !items-center ]" | ||
> | ||
<CharacterPicture | ||
character_id={srp.character_id} | ||
character_name={srp.character_name} | ||
size={64} | ||
icon_quality={64} | ||
tooltip={srp.character_name} | ||
/> | ||
<Flexblock gap='var(--space-3xs)'> | ||
<h3>{srp.amount.toLocaleString()} {t('isk')}</h3> | ||
|
||
<Flexblock gap='0'> | ||
<FlexInline gap='var(--space-3xs)' class="[ grow ]"> | ||
{srp.character_id !== srp.primary_character_id && | ||
<CharacterPicture character_id={srp.primary_character_id} character_name={srp.primary_character_name} size={16} icon_quality={32} /> | ||
<small>{srp.primary_character_name}</small> | ||
} | ||
</FlexInline> | ||
<FlexInline gap='var(--space-3xs)' class="[ grow ]"> | ||
<ItemPicture item_id={srp.ship_type_id} item_name={srp.ship_name} size={16} icon_quality={32} /> | ||
<small>{srp.ship_name}</small> | ||
</FlexInline> | ||
</Flexblock> | ||
</Flexblock> | ||
</FixedFluid> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,18 @@ | ||
--- | ||
import { i18n } from '@helpers/i18n' | ||
const { t } = i18n(Astro.url) | ||
import type { SRPUI } from '@dtypes/layout_components' | ||
import Flexblock from '@components/compositions/Flexblock.astro'; | ||
import FlexInline from '@components/compositions/FlexInline.astro'; | ||
import CharacterPicture from '@components/blocks/CharacterPicture.astro'; | ||
import PilotBadge from '@components/blocks/PilotBadge.astro'; | ||
import SRPBadge from '@components/blocks/SRPBadge.astro'; | ||
const character_id = parseInt(Astro.url.searchParams.get('character_id') as string) | ||
const primary_character_id = parseInt(Astro.url.searchParams.get('primary_character_id') as string) | ||
const message = Astro.url.searchParams.get('message') | ||
const amount = parseInt(Astro.url.searchParams.get('amount') as string ?? '0') | ||
const srp = JSON.parse(Astro.url.searchParams.get('srp') as string) as SRPUI | ||
--- | ||
|
||
<Flexblock> | ||
<p set:html={message} /> | ||
<PilotBadge | ||
character_id={character_id} | ||
character_name="" | ||
class="[ grow ]" | ||
> | ||
<h3 slot="title">{amount.toLocaleString()} {t('isk')}</h3> | ||
<FlexInline gap='var(--space-3xs)'> | ||
{character_id === primary_character_id ? | ||
<small>{t('is_main_character')}</small> : | ||
<small>{t('main_character')}</small> | ||
<CharacterPicture | ||
character_id={primary_character_id} | ||
size={16} | ||
icon_quality={32} | ||
/> | ||
} | ||
</FlexInline> | ||
</PilotBadge> | ||
<FlexInline> | ||
<SRPBadge srp={srp} /> | ||
</FlexInline> | ||
</Flexblock> |