feat: add age attribute to character history and localization support
All checks were successful
Build Docker Image / build (push) Successful in 1m13s
All checks were successful
Build Docker Image / build (push) Successful in 1m13s
This commit is contained in:
@@ -23,7 +23,8 @@ const columns = [
|
|||||||
'origin',
|
'origin',
|
||||||
'devilFruitType',
|
'devilFruitType',
|
||||||
'arc',
|
'arc',
|
||||||
'status'
|
'status',
|
||||||
|
'age'
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
async function initColumnConfig(): Promise<void> {
|
async function initColumnConfig(): Promise<void> {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { formatBounty } from '$lib';
|
import { formatBounty } from '$lib';
|
||||||
import { resolve } from '$app/paths';
|
|
||||||
import type { CharacterWithRelations } from '$lib/server/daily-character';
|
import type { CharacterWithRelations } from '$lib/server/daily-character';
|
||||||
import { language, t } from '$lib/i18n';
|
import { language, t } from '$lib/i18n';
|
||||||
|
|
||||||
@@ -14,6 +13,7 @@
|
|||||||
haki?: boolean;
|
haki?: boolean;
|
||||||
bounty?: boolean;
|
bounty?: boolean;
|
||||||
height?: boolean;
|
height?: boolean;
|
||||||
|
age?: boolean;
|
||||||
origin?: boolean;
|
origin?: boolean;
|
||||||
arc?: boolean;
|
arc?: boolean;
|
||||||
};
|
};
|
||||||
@@ -451,6 +451,41 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
<!-- Age -->
|
||||||
|
{#if columnVisibility.age !== false}
|
||||||
|
<div
|
||||||
|
class="h-16 w-16 shrink-0 rounded-lg border border-white/10 sm:h-20 sm:w-20 md:h-24 md:w-24 {character.age ===
|
||||||
|
dailyCharacter.age
|
||||||
|
? 'bg-emerald-600/90'
|
||||||
|
: 'bg-red-900/60'} relative flex items-center justify-center overflow-hidden p-1 sm:p-2"
|
||||||
|
>
|
||||||
|
{#if character.age != null && dailyCharacter.age != null && character.age !== dailyCharacter.age}
|
||||||
|
<div
|
||||||
|
class="pointer-events-none absolute h-full w-full opacity-30"
|
||||||
|
style="
|
||||||
|
background-color: rgb(203, 213, 225);
|
||||||
|
clip-path: {character.age > dailyCharacter.age
|
||||||
|
? 'polygon(97% 60%,80% 60%,80% 5%,20% 5%,20% 60%,3% 60%,50% 95%)'
|
||||||
|
: 'polygon(97% 40%,80% 40%,80% 95%,20% 95%,20% 40%,3% 40%,50% 5%)'};
|
||||||
|
"
|
||||||
|
></div>
|
||||||
|
{/if}
|
||||||
|
{#if character.age != null}
|
||||||
|
<p
|
||||||
|
class="relative z-10 text-center text-[10px] font-bold text-white sm:text-xs md:text-sm"
|
||||||
|
>
|
||||||
|
{character.age}
|
||||||
|
</p>
|
||||||
|
{:else}
|
||||||
|
<p
|
||||||
|
class="relative z-10 text-center text-[10px] font-bold text-white sm:text-xs md:text-sm"
|
||||||
|
>
|
||||||
|
{$t.game.components.guessHistory.unknown}
|
||||||
|
</p>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
<!-- Origine -->
|
<!-- Origine -->
|
||||||
{#if columnVisibility.origin !== false}
|
{#if columnVisibility.origin !== false}
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -175,6 +175,7 @@
|
|||||||
"haki": "Haki",
|
"haki": "Haki",
|
||||||
"bounty": "Bounty",
|
"bounty": "Bounty",
|
||||||
"height": "Height",
|
"height": "Height",
|
||||||
|
"age": "Age",
|
||||||
"origin": "Origin",
|
"origin": "Origin",
|
||||||
"arc": "Arc",
|
"arc": "Arc",
|
||||||
"alive": "Alive",
|
"alive": "Alive",
|
||||||
|
|||||||
@@ -175,6 +175,7 @@
|
|||||||
"haki": "Haki",
|
"haki": "Haki",
|
||||||
"bounty": "Prime",
|
"bounty": "Prime",
|
||||||
"height": "Taille",
|
"height": "Taille",
|
||||||
|
"age": "Age",
|
||||||
"origin": "Origine",
|
"origin": "Origine",
|
||||||
"arc": "Arc",
|
"arc": "Arc",
|
||||||
"alive": "Vivant",
|
"alive": "Vivant",
|
||||||
|
|||||||
Reference in New Issue
Block a user