fix(store): defer multi-version app version choice (#129)
Demo images / Build & push demo images (push) Failing after 39s
Demo images / Build & push demo images (push) Failing after 39s
This commit is contained in:
@@ -26,7 +26,8 @@
|
|||||||
:class="tierLabel === 'core' ? 'tier-badge-core' : 'tier-badge-recommended'"
|
:class="tierLabel === 'core' ? 'tier-badge-core' : 'tier-badge-recommended'"
|
||||||
>{{ tierLabel }}</span>
|
>{{ tierLabel }}</span>
|
||||||
</h3>
|
</h3>
|
||||||
<p class="text-sm text-white/60">{{ app.version ? $ver(app.version) : 'latest' }}</p>
|
<p v-if="!isMultiVersion" class="text-sm text-white/60">{{ app.version ? $ver(app.version) : 'latest' }}</p>
|
||||||
|
<p v-else class="text-sm text-white/60">Choose version when installing</p>
|
||||||
<p v-if="app.author" class="text-xs text-white/50 mt-1">by {{ app.author }}</p>
|
<p v-if="app.author" class="text-xs text-white/50 mt-1">by {{ app.author }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -175,7 +176,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import type { MarketplaceApp, InstallProgress } from './marketplaceData'
|
import { MULTI_VERSION_APP_IDS, type MarketplaceApp, type InstallProgress } from './marketplaceData'
|
||||||
import { DEFAULT_APP_ICON } from '@/views/apps/appsConfig'
|
import { DEFAULT_APP_ICON } from '@/views/apps/appsConfig'
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
@@ -200,6 +201,8 @@ defineEmits<{
|
|||||||
launch: [app: MarketplaceApp]
|
launch: [app: MarketplaceApp]
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
|
const isMultiVersion = computed(() => MULTI_VERSION_APP_IDS.has(props.app.id))
|
||||||
|
|
||||||
const signatureLabel = computed(() => {
|
const signatureLabel = computed(() => {
|
||||||
switch (props.app.signature?.status) {
|
switch (props.app.signature?.status) {
|
||||||
case 'valid': return 'signed'
|
case 'valid': return 'signed'
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ const app: MarketplaceApp = {
|
|||||||
source: 'community',
|
source: 'community',
|
||||||
}
|
}
|
||||||
|
|
||||||
function mountCard(installed: boolean, installBlockedReason?: string) {
|
function mountCard(installed: boolean, installBlockedReason?: string, appOverride: MarketplaceApp = app) {
|
||||||
const i18n = createI18n({
|
const i18n = createI18n({
|
||||||
legacy: false,
|
legacy: false,
|
||||||
locale: 'en',
|
locale: 'en',
|
||||||
@@ -29,7 +29,7 @@ function mountCard(installed: boolean, installBlockedReason?: string) {
|
|||||||
|
|
||||||
return mount(MarketplaceAppCard, {
|
return mount(MarketplaceAppCard, {
|
||||||
props: {
|
props: {
|
||||||
app,
|
app: appOverride,
|
||||||
index: 0,
|
index: 0,
|
||||||
stagger: false,
|
stagger: false,
|
||||||
installed,
|
installed,
|
||||||
@@ -65,4 +65,16 @@ describe('MarketplaceAppCard', () => {
|
|||||||
expect(wrapper.text()).toContain('Requires a full archive Bitcoin node before install.')
|
expect(wrapper.text()).toContain('Requires a full archive Bitcoin node before install.')
|
||||||
expect(wrapper.text()).toContain('Bitcoin Pruned')
|
expect(wrapper.text()).toContain('Bitcoin Pruned')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('does not present one catalog version as definitive for multi-version apps (#129)', () => {
|
||||||
|
const wrapper = mountCard(false, undefined, {
|
||||||
|
...app,
|
||||||
|
id: 'bitcoin-core',
|
||||||
|
title: 'Bitcoin Core',
|
||||||
|
version: '28.4.0',
|
||||||
|
})
|
||||||
|
|
||||||
|
expect(wrapper.text()).toContain('Choose version when installing')
|
||||||
|
expect(wrapper.text()).not.toContain('28.4')
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -57,6 +57,12 @@ export interface InstallProgress {
|
|||||||
attempt: number
|
attempt: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Apps that ask for their concrete version in InstallVersionModal. Their
|
||||||
|
* store tiles deliberately omit a single catalog version: showing “v28.4”
|
||||||
|
* there implies that is the only version immediately before asking the user
|
||||||
|
* to choose a different one. */
|
||||||
|
export const MULTI_VERSION_APP_IDS = new Set(['bitcoin-knots', 'bitcoin-core'])
|
||||||
|
|
||||||
/** Archipelago app registry — all app images are mirrored here */
|
/** Archipelago app registry — all app images are mirrored here */
|
||||||
const REGISTRY = 'source.archipelago-foundation.org/lfg2025'
|
const REGISTRY = 'source.archipelago-foundation.org/lfg2025'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user