frontend: fix strict production build typing
This commit is contained in:
@@ -224,7 +224,7 @@ import { useMarketplaceApp } from '@/composables/useMarketplaceApp'
|
||||
import { useAppLauncherStore } from '@/stores/appLauncher'
|
||||
import { useToast } from '@/composables/useToast'
|
||||
import { useCollapsingHeaderTabs } from '@/composables/useCollapsingHeaderTabs'
|
||||
import { APP_STORE_CATEGORIES, APP_STORE_SECTIONS } from './appStoreCategories'
|
||||
import { APP_STORE_SECTIONS } from './appStoreCategories'
|
||||
import DiscoverHero from './discover/DiscoverHero.vue'
|
||||
import FeaturedApps from './discover/FeaturedApps.vue'
|
||||
import AppGrid from './discover/AppGrid.vue'
|
||||
@@ -253,7 +253,6 @@ const { collapsed: collapseCategories } = useCollapsingHeaderTabs(
|
||||
144
|
||||
)
|
||||
|
||||
const categories = computed(() => APP_STORE_CATEGORIES)
|
||||
const appStoreSections = computed(() => APP_STORE_SECTIONS)
|
||||
|
||||
// Installation state — uses global store so it persists across navigation.
|
||||
|
||||
@@ -35,6 +35,7 @@ function makePeer() {
|
||||
onion: 'peer.onion',
|
||||
name: 'Peer Alpha',
|
||||
trust_level: 'trusted',
|
||||
added_at: '2026-06-10T10:00:00Z',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -172,7 +172,29 @@ const actionItems = computed(() => {
|
||||
})
|
||||
|
||||
function emitAction(action: ActionEmit) {
|
||||
emit(action)
|
||||
switch (action) {
|
||||
case 'launch':
|
||||
emit('launch')
|
||||
break
|
||||
case 'start':
|
||||
emit('start')
|
||||
break
|
||||
case 'stop':
|
||||
emit('stop')
|
||||
break
|
||||
case 'restart':
|
||||
emit('restart')
|
||||
break
|
||||
case 'uninstall':
|
||||
emit('uninstall')
|
||||
break
|
||||
case 'update':
|
||||
emit('update')
|
||||
break
|
||||
case 'channels':
|
||||
emit('channels')
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
function handleImageError(e: Event) {
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
</div>
|
||||
<p class="text-xs text-white/50">Loading credentials...</p>
|
||||
</div>
|
||||
<div v-else class="space-y-3">
|
||||
<div v-else-if="credentials" class="space-y-3">
|
||||
<div v-for="cred in credentials.credentials" :key="cred.label" class="rounded-lg border border-white/10 bg-white/[0.04] p-3">
|
||||
<div class="flex items-center justify-between gap-3 mb-1">
|
||||
<span class="text-white/60 text-xs uppercase tracking-wide">{{ cred.label }}</span>
|
||||
|
||||
@@ -82,9 +82,9 @@ describe('AppContentSection', () => {
|
||||
|
||||
expect(wrapper.text()).toContain('Screenshots')
|
||||
expect(images).toHaveLength(2)
|
||||
expect(images[0].attributes('src')).toBe('/assets/screenshots/example-dashboard.png')
|
||||
expect(images[0].attributes('alt')).toBe('Example screenshot 1')
|
||||
expect(images[1].attributes('src')).toBe('/assets/screenshots/example-settings.png')
|
||||
expect(images[1].attributes('alt')).toBe('Settings screen')
|
||||
expect(images[0]?.attributes('src')).toBe('/assets/screenshots/example-dashboard.png')
|
||||
expect(images[0]?.attributes('alt')).toBe('Example screenshot 1')
|
||||
expect(images[1]?.attributes('src')).toBe('/assets/screenshots/example-settings.png')
|
||||
expect(images[1]?.attributes('alt')).toBe('Settings screen')
|
||||
})
|
||||
})
|
||||
|
||||
@@ -6,7 +6,7 @@ describe('resolveAppCredentials', () => {
|
||||
expect(resolveAppCredentials('filebrowser', {
|
||||
title: 'Backend credentials',
|
||||
credentials: [{ label: 'Password', value: 'secret' }],
|
||||
})?.credentials[0].value).toBe('secret')
|
||||
})?.credentials[0]?.value).toBe('secret')
|
||||
})
|
||||
|
||||
it('falls back to File Browser default credentials when backend data is not available', () => {
|
||||
|
||||
@@ -73,7 +73,7 @@ describe('Web5ConnectedNodes', () => {
|
||||
messageState.loadingMessages.value = true
|
||||
|
||||
const wrapper = mount(Web5ConnectedNodes)
|
||||
wrapper.vm.nodesContainerTab = 'messages'
|
||||
;(wrapper.vm as unknown as { nodesContainerTab: string }).nodesContainerTab = 'messages'
|
||||
await wrapper.vm.$nextTick()
|
||||
|
||||
expect(wrapper.text()).toContain('Existing message')
|
||||
|
||||
@@ -49,7 +49,7 @@ describe('Web5Federation', () => {
|
||||
nodes: [{ status: 'online' }, { status: 'offline' }],
|
||||
pending_requests: [{}],
|
||||
})
|
||||
vi.mocked(rpcClient.getNodeDid).mockResolvedValueOnce({ did: 'did:key:node' })
|
||||
vi.mocked(rpcClient.getNodeDid).mockResolvedValueOnce({ did: 'did:key:node', pubkey: 'node-pubkey' })
|
||||
|
||||
const wrapper = mountFederation()
|
||||
await flushPromises()
|
||||
@@ -60,7 +60,7 @@ describe('Web5Federation', () => {
|
||||
|
||||
const pending = deferred<{ nodes: []; pending_requests: [] }>()
|
||||
vi.mocked(rpcClient.call).mockReturnValueOnce(pending.promise)
|
||||
vi.mocked(rpcClient.getNodeDid).mockResolvedValueOnce({ did: 'did:key:node' })
|
||||
vi.mocked(rpcClient.getNodeDid).mockResolvedValueOnce({ did: 'did:key:node', pubkey: 'node-pubkey' })
|
||||
|
||||
const refresh = (wrapper.vm as unknown as { loadFederationSummary: () => Promise<void> }).loadFederationSummary()
|
||||
await wrapper.vm.$nextTick()
|
||||
|
||||
Reference in New Issue
Block a user