mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
dont hard code alpha and beta, use substring detection instead (#2135)
This commit is contained in:
committed by
Aiden McClelland
parent
cf70933e21
commit
c16404bb2d
@@ -9,9 +9,7 @@
|
||||
},
|
||||
"marketplace": {
|
||||
"start9": "https://registry.start9.com/",
|
||||
"community": "https://community-registry.start9.com/",
|
||||
"beta": "https://beta-registry.start9.com/",
|
||||
"alpha": "https://alpha-registry-x.start9.com/"
|
||||
"community": "https://community-registry.start9.com/"
|
||||
},
|
||||
"mocks": {
|
||||
"maskAs": "tor",
|
||||
|
||||
@@ -12,8 +12,6 @@ export type WorkspaceConfig = {
|
||||
marketplace: {
|
||||
start9: 'https://registry.start9.com/'
|
||||
community: 'https://community-registry.start9.com/'
|
||||
beta: 'https://beta-registry.start9.com/'
|
||||
alpha: 'https://alpha-registry-x.start9.com/'
|
||||
}
|
||||
mocks: {
|
||||
maskAs: 'tor' | 'lan'
|
||||
|
||||
@@ -33,30 +33,31 @@ export class MarketplaceListPage {
|
||||
|
||||
readonly details$ = this.marketplaceService.getSelectedHost$().pipe(
|
||||
map(({ url, name }) => {
|
||||
const { start9, community, beta } = this.config.marketplace
|
||||
const { start9, community } = this.config.marketplace
|
||||
let color: string
|
||||
let description: string
|
||||
switch (url) {
|
||||
case start9:
|
||||
color = 'success'
|
||||
description =
|
||||
'Services from this registry are packaged and maintained by the Start9 team. If you experience an issue or have a questions related to a service from this registry, one of our dedicated support staff will be happy to assist you.'
|
||||
break
|
||||
case community:
|
||||
color = 'tertiary'
|
||||
description =
|
||||
'Services from this registry are packaged and maintained by members of the Start9 community. <b>Install at your own risk</b>. If you experience an issue or have a question related to a service in this marketplace, please reach out to the package developer for assistance.'
|
||||
break
|
||||
case beta:
|
||||
color = 'primary'
|
||||
description =
|
||||
'Services from this registry are undergoing active testing and may contain bugs. <b>Install at your own risk</b>. If you discover a bug or have a suggestion for improvement, please report it to the Start9 team in our community testing channel on Matrix.'
|
||||
break
|
||||
default:
|
||||
// alt marketplace
|
||||
color = 'warning'
|
||||
description =
|
||||
'This is a Custom Registry. Start9 cannot verify the integrity or functionality of services from this registry, and they may cause harm to your system. <b>Install at your own risk</b>.'
|
||||
|
||||
if (url === start9) {
|
||||
color = 'success'
|
||||
description =
|
||||
'Services from this registry are packaged and maintained by the Start9 team. If you experience an issue or have a questions related to a service from this registry, one of our dedicated support staff will be happy to assist you.'
|
||||
} else if (url === community) {
|
||||
color = 'tertiary'
|
||||
description =
|
||||
'Services from this registry are packaged and maintained by members of the Start9 community. <b>Install at your own risk</b>. If you experience an issue or have a question related to a service in this marketplace, please reach out to the package developer for assistance.'
|
||||
} else if (url.includes('beta')) {
|
||||
color = 'warning'
|
||||
description =
|
||||
'Services from this registry are undergoing <b>beta</b> testing and may contain bugs. <b>Install at your own risk</b>.'
|
||||
} else if (url.includes('alpha')) {
|
||||
color = 'danger'
|
||||
description =
|
||||
'Services from this registry are undergoing <b>alpha</b> testing. They are expected to contain bugs and could damage your system. <b>Install at your own risk</b>.'
|
||||
} else {
|
||||
// alt marketplace
|
||||
color = 'warning'
|
||||
description =
|
||||
'This is a Custom Registry. Start9 cannot verify the integrity or functionality of services from this registry, and they could damage your system. <b>Install at your own risk</b>.'
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
@@ -47,10 +47,9 @@ export class UpdatesPage {
|
||||
]).pipe(
|
||||
map(([devMode, knownHosts]) => {
|
||||
if (devMode) return knownHosts
|
||||
return knownHosts.filter(h => {
|
||||
const { alpha, beta } = this.config.marketplace
|
||||
return ![alpha, beta].includes(h.url as any)
|
||||
})
|
||||
return knownHosts.filter(
|
||||
({ url }) => url.includes('alpha') || url.includes('beta'),
|
||||
)
|
||||
}),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user