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>
|
||||
{:else}
|
||||
<DetailRow label="Proficiency" noHover>
|
||||
<ProficiencyLabel proficiency={artifactData.proficiency} size="medium" />
|
||||
<ProficiencyLabel proficiency={artifactData.proficiency ?? undefined} size="medium" />
|
||||
</DetailRow>
|
||||
{/if}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
.header-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: spacing.$unit-half;
|
||||
gap: spacing.$unit;
|
||||
}
|
||||
|
||||
.title-row {
|
||||
|
|
|
|||
|
|
@ -207,8 +207,12 @@
|
|||
const allItems = pages.flatMap((page) => page.results)
|
||||
const ids = new Set<string>()
|
||||
for (const item of allItems) {
|
||||
const entity = 'character' in item ? item.character : 'weapon' in item ? item.weapon : item.summon
|
||||
if (entity.granblueId) {
|
||||
// Type assertion needed because the query result type doesn't capture all variants
|
||||
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))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
.modal-body {
|
||||
padding: spacing.$unit-2x;
|
||||
padding-bottom: spacing.$unit-3x;
|
||||
overflow-y: auto;
|
||||
flex: 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,7 +89,6 @@
|
|||
{flb}
|
||||
{ulb}
|
||||
{transcendence}
|
||||
{subaura}
|
||||
editable={false}
|
||||
/>
|
||||
</DetailItem>
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ export const CHARACTER_SERIES_NAMES: Record<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)
|
||||
|
|
@ -121,5 +121,5 @@ export const PROMOTION_NAMES: Record<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 { transformSkillsToArray } from '$lib/utils/jobSkills'
|
||||
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 { getLocalId } from '$lib/utils/localId'
|
||||
import { storeEditKey } from '$lib/utils/editKeys'
|
||||
|
|
@ -288,7 +288,7 @@
|
|||
)
|
||||
|
||||
// Handle adding items from search
|
||||
async function handleAddItems(items: SearchResult[]) {
|
||||
async function handleAddItems(items: AddItemResult[]) {
|
||||
console.log('Adding items:', items, 'to tab:', activeTab)
|
||||
|
||||
// Create party on first item if not already created
|
||||
|
|
|
|||
|
|
@ -13,8 +13,9 @@ export default defineConfig({
|
|||
css: {
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
api: 'modern-compiler',
|
||||
loadPaths: [fileURLToPath(new URL('./src', import.meta.url))]
|
||||
// Modern compiler API for better Sass compatibility
|
||||
// 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