Update to 0.7.0-unstable7

This commit is contained in:
Yann Stepienik 2023-06-13 23:41:29 +01:00
parent 9e5305eff5
commit 320b0fbbb4
4 changed files with 12 additions and 17 deletions

View file

@ -216,7 +216,7 @@ const MarketPage = () => {
size={100}
/>
</Box>}
{showcase && showcase.length && <Showcases showcase={showcase} isDark={isDark}/>}
{showcase && showcase.length > 0 && <Showcases showcase={showcase} isDark={isDark}/>}
</Stack>
<Stack spacing={1} style={{
@ -241,6 +241,7 @@ const MarketPage = () => {
/>
</Box>}
<h2>Applications</h2>
{apps && Object.keys(apps).length > 0 && <Grid2 container spacing={{ xs: 1, sm: 1, md: 2 }}>
{apps[Object.keys(apps)[0]].map((app) => {
return <Grid2 style={{

View file

@ -1,6 +1,6 @@
{
"name": "cosmos-server",
"version": "0.7.0-unstable6",
"version": "0.7.0-unstable7",
"description": "",
"main": "test-server.js",
"bugs": {

View file

@ -7,8 +7,16 @@ import (
func Init() {
config := utils.GetMainConfig()
currentMarketcache = []marketCacheObject{}
sources := config.MarketConfig.Sources
for _, marketDef := range config.MarketConfig.Sources {
// prepend the default market
defaultMarket := utils.MarketSource{
Url: "https://cosmos-cloud.io/repository",
Name: "cosmos-cloud",
}
sources = append([]utils.MarketSource{defaultMarket}, sources...)
for _, marketDef := range sources {
market := marketCacheObject{
Url: marketDef.Url,
Name: marketDef.Name,

View file

@ -80,10 +80,6 @@ var DefaultConfig = Config{
},
MarketConfig: MarketConfig{
Sources: []MarketSource{
MarketSource{
Url: "https://cosmos-cloud.io/repository",
Name: "Cosmos Cloud",
},
},
},
}
@ -174,16 +170,6 @@ func ReadConfigFromFile() Config {
Fatal("Reading Config File: " + errString, err)
}
// check if outdated
if len(config.MarketConfig.Sources) == 0 {
config.MarketConfig.Sources = []MarketSource{
MarketSource{
Url: "https://cosmos-cloud.io/repository",
Name: "Cosmos Cloud",
},
}
}
return config
}