misc type and style fixes
This commit is contained in:
parent
4f1b8872c0
commit
da7299625c
8 changed files with 16 additions and 11 deletions
|
|
@ -336,7 +336,7 @@
|
||||||
</DetailRow>
|
</DetailRow>
|
||||||
{:else}
|
{:else}
|
||||||
<DetailRow label="Proficiency" noHover>
|
<DetailRow label="Proficiency" noHover>
|
||||||
<ProficiencyLabel proficiency={artifactData.proficiency} size="medium" />
|
<ProficiencyLabel proficiency={artifactData.proficiency ?? undefined} size="medium" />
|
||||||
</DetailRow>
|
</DetailRow>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@
|
||||||
.header-info {
|
.header-info {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: spacing.$unit-half;
|
gap: spacing.$unit;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-row {
|
.title-row {
|
||||||
|
|
|
||||||
|
|
@ -207,8 +207,12 @@
|
||||||
const allItems = pages.flatMap((page) => page.results)
|
const allItems = pages.flatMap((page) => page.results)
|
||||||
const ids = new Set<string>()
|
const ids = new Set<string>()
|
||||||
for (const item of allItems) {
|
for (const item of allItems) {
|
||||||
const entity = 'character' in item ? item.character : 'weapon' in item ? item.weapon : item.summon
|
// Type assertion needed because the query result type doesn't capture all variants
|
||||||
if (entity.granblueId) {
|
const anyItem = item as unknown as Record<string, unknown>
|
||||||
|
const entity = (anyItem.character ?? anyItem.weapon ?? anyItem.summon) as
|
||||||
|
| { granblueId?: string }
|
||||||
|
| undefined
|
||||||
|
if (entity?.granblueId) {
|
||||||
ids.add(String(entity.granblueId))
|
ids.add(String(entity.granblueId))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
.modal-body {
|
.modal-body {
|
||||||
padding: spacing.$unit-2x;
|
padding: spacing.$unit-2x;
|
||||||
|
padding-bottom: spacing.$unit-3x;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,6 @@
|
||||||
{flb}
|
{flb}
|
||||||
{ulb}
|
{ulb}
|
||||||
{transcendence}
|
{transcendence}
|
||||||
{subaura}
|
|
||||||
editable={false}
|
editable={false}
|
||||||
/>
|
/>
|
||||||
</DetailItem>
|
</DetailItem>
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ export const CHARACTER_SERIES_NAMES: Record<number, string> = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getSeriesNames(series: number[]): string[] {
|
export function getSeriesNames(series: number[]): string[] {
|
||||||
return series.map(s => CHARACTER_SERIES_NAMES[s]).filter(Boolean)
|
return series.map(s => CHARACTER_SERIES_NAMES[s]).filter((name): name is string => Boolean(name))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Weapon/Summon promotions (gacha pool membership)
|
// Weapon/Summon promotions (gacha pool membership)
|
||||||
|
|
@ -121,5 +121,5 @@ export const PROMOTION_NAMES: Record<number, string> = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getPromotionNames(promotions: number[]): string[] {
|
export function getPromotionNames(promotions: number[]): string[] {
|
||||||
return promotions.map(p => PROMOTION_NAMES[p]).filter(Boolean)
|
return promotions.map(p => PROMOTION_NAMES[p]).filter((name): name is string => Boolean(name))
|
||||||
}
|
}
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
import { partyAdapter } from '$lib/api/adapters/party.adapter'
|
import { partyAdapter } from '$lib/api/adapters/party.adapter'
|
||||||
import { transformSkillsToArray } from '$lib/utils/jobSkills'
|
import { transformSkillsToArray } from '$lib/utils/jobSkills'
|
||||||
import { setContext } from 'svelte'
|
import { setContext } from 'svelte'
|
||||||
import type { SearchResult } from '$lib/api/adapters'
|
import type { AddItemResult } from '$lib/types/api/search'
|
||||||
import { gridAdapter } from '$lib/api/adapters'
|
import { gridAdapter } from '$lib/api/adapters'
|
||||||
import { getLocalId } from '$lib/utils/localId'
|
import { getLocalId } from '$lib/utils/localId'
|
||||||
import { storeEditKey } from '$lib/utils/editKeys'
|
import { storeEditKey } from '$lib/utils/editKeys'
|
||||||
|
|
@ -288,7 +288,7 @@
|
||||||
)
|
)
|
||||||
|
|
||||||
// Handle adding items from search
|
// Handle adding items from search
|
||||||
async function handleAddItems(items: SearchResult[]) {
|
async function handleAddItems(items: AddItemResult[]) {
|
||||||
console.log('Adding items:', items, 'to tab:', activeTab)
|
console.log('Adding items:', items, 'to tab:', activeTab)
|
||||||
|
|
||||||
// Create party on first item if not already created
|
// Create party on first item if not already created
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,9 @@ export default defineConfig({
|
||||||
css: {
|
css: {
|
||||||
preprocessorOptions: {
|
preprocessorOptions: {
|
||||||
scss: {
|
scss: {
|
||||||
api: 'modern-compiler',
|
// Modern compiler API for better Sass compatibility
|
||||||
loadPaths: [fileURLToPath(new URL('./src', import.meta.url))]
|
// Type assertion needed as Vite types haven't been updated yet
|
||||||
|
...(({ api: 'modern-compiler', loadPaths: [fileURLToPath(new URL('./src', import.meta.url))] }) as object)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue