mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-02-11 17:55:51 +00:00
Fix metadata issue on q-apps page
This commit is contained in:
parent
d901a5d2da
commit
12d4daf3ee
@ -875,21 +875,27 @@ class QApps extends LitElement {
|
|||||||
this.appsArray.forEach(item => {
|
this.appsArray.forEach(item => {
|
||||||
const name = item.name
|
const name = item.name
|
||||||
let title
|
let title
|
||||||
if (item.metadata.title != null) {
|
if (item.metadata != null) {
|
||||||
title = item.metadata.title
|
if (item.metadata.title != null) {
|
||||||
|
title = item.metadata.title
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
title = item.name
|
title = item.name
|
||||||
}
|
}
|
||||||
let description
|
let description
|
||||||
if (item.metadata.description != null) {
|
if (item.metadata != null) {
|
||||||
description = item.metadata.description
|
if (item.metadata.description != null) {
|
||||||
|
description = item.metadata.description
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
description = item.name
|
description = item.name
|
||||||
}
|
}
|
||||||
const url = `${nodeUrl}/arbitrary/THUMBNAIL/${name}/qortal_avatar?async=true&apiKey=${this.getApiKey()}`
|
const url = `${nodeUrl}/arbitrary/THUMBNAIL/${name}/qortal_avatar?async=true&apiKey=${this.getApiKey()}`
|
||||||
let tags = 'No Tags'
|
let tags = 'No Tags'
|
||||||
if (item.metadata.tags != null && item.metadata.tags.length > 0) {
|
if (item.metadata != null) {
|
||||||
tags = item.metadata.tags.join(", ")
|
if (item.metadata.tags != null && item.metadata.tags.length > 0) {
|
||||||
|
tags = item.metadata.tags.join(", ")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const status1 = item.status.description
|
const status1 = item.status.description
|
||||||
const status2 = item.status.status
|
const status2 = item.status.status
|
||||||
@ -933,7 +939,7 @@ class QApps extends LitElement {
|
|||||||
|
|
||||||
const myAppTitle = document.createElement('div')
|
const myAppTitle = document.createElement('div')
|
||||||
myAppTitle.classList.add('myapptitle')
|
myAppTitle.classList.add('myapptitle')
|
||||||
myAppTitle.textContent = item.metadata.title
|
myAppTitle.textContent = title
|
||||||
|
|
||||||
widgetElement.appendChild(myContainer)
|
widgetElement.appendChild(myContainer)
|
||||||
widgetElement.appendChild(myAppTitle)
|
widgetElement.appendChild(myAppTitle)
|
||||||
@ -970,21 +976,27 @@ class QApps extends LitElement {
|
|||||||
this.followedResources.forEach(item => {
|
this.followedResources.forEach(item => {
|
||||||
const name = item.name
|
const name = item.name
|
||||||
let title
|
let title
|
||||||
if (item.metadata.title != null) {
|
if (item.metadata != null) {
|
||||||
title = item.metadata.title
|
if (item.metadata.title != null) {
|
||||||
|
title = item.metadata.title
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
title = item.name
|
title = item.name
|
||||||
}
|
}
|
||||||
let description
|
let description
|
||||||
if (item.metadata.description != null) {
|
if (item.metadata != null) {
|
||||||
description = item.metadata.description
|
if (item.metadata.description != null) {
|
||||||
|
description = item.metadata.description
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
description = item.name
|
description = item.name
|
||||||
}
|
}
|
||||||
const url = `${nodeUrl}/arbitrary/THUMBNAIL/${name}/qortal_avatar?async=true&apiKey=${this.getApiKey()}`
|
const url = `${nodeUrl}/arbitrary/THUMBNAIL/${name}/qortal_avatar?async=true&apiKey=${this.getApiKey()}`
|
||||||
let tags = 'No Tags'
|
let tags = 'No Tags'
|
||||||
if (item.metadata.tags != null && item.metadata.tags.length > 0) {
|
if (item.metadata != null) {
|
||||||
tags = item.metadata.tags.join(", ")
|
if (item.metadata.tags != null && item.metadata.tags.length > 0) {
|
||||||
|
tags = item.metadata.tags.join(", ")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const status1 = item.status.description
|
const status1 = item.status.description
|
||||||
const status2 = item.status.status
|
const status2 = item.status.status
|
||||||
@ -1028,7 +1040,7 @@ class QApps extends LitElement {
|
|||||||
|
|
||||||
const myAppTitle = document.createElement('div')
|
const myAppTitle = document.createElement('div')
|
||||||
myAppTitle.classList.add('myapptitle')
|
myAppTitle.classList.add('myapptitle')
|
||||||
myAppTitle.textContent = item.metadata.title
|
myAppTitle.textContent = title
|
||||||
|
|
||||||
widgetElement.appendChild(myContainer)
|
widgetElement.appendChild(myContainer)
|
||||||
widgetElement.appendChild(myAppTitle)
|
widgetElement.appendChild(myAppTitle)
|
||||||
@ -1066,21 +1078,27 @@ class QApps extends LitElement {
|
|||||||
this.blockedResources.forEach(item => {
|
this.blockedResources.forEach(item => {
|
||||||
const name = item.name
|
const name = item.name
|
||||||
let title
|
let title
|
||||||
if (item.metadata.title != null) {
|
if (item.metadata != null) {
|
||||||
title = item.metadata.title
|
if (item.metadata.title != null) {
|
||||||
|
title = item.metadata.title
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
title = item.name
|
title = item.name
|
||||||
}
|
}
|
||||||
let description
|
let description
|
||||||
if (item.metadata.description != null) {
|
if (item.metadata != null) {
|
||||||
description = item.metadata.description
|
if (item.metadata.description != null) {
|
||||||
|
description = item.metadata.description
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
description = item.name
|
description = item.name
|
||||||
}
|
}
|
||||||
const url = `${nodeUrl}/arbitrary/THUMBNAIL/${name}/qortal_avatar?async=true&apiKey=${this.getApiKey()}`
|
const url = `${nodeUrl}/arbitrary/THUMBNAIL/${name}/qortal_avatar?async=true&apiKey=${this.getApiKey()}`
|
||||||
let tags = 'No Tags'
|
let tags = 'No Tags'
|
||||||
if (item.metadata.tags != null && item.metadata.tags.length > 0) {
|
if (item.metadata != null) {
|
||||||
tags = item.metadata.tags.join(", ")
|
if (item.metadata.tags != null && item.metadata.tags.length > 0) {
|
||||||
|
tags = item.metadata.tags.join(", ")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const status1 = item.status.description
|
const status1 = item.status.description
|
||||||
const status2 = item.status.status
|
const status2 = item.status.status
|
||||||
@ -1123,7 +1141,7 @@ class QApps extends LitElement {
|
|||||||
|
|
||||||
const myAppTitle = document.createElement('div')
|
const myAppTitle = document.createElement('div')
|
||||||
myAppTitle.classList.add('myapptitle')
|
myAppTitle.classList.add('myapptitle')
|
||||||
myAppTitle.textContent = item.metadata.title
|
myAppTitle.textContent = title
|
||||||
|
|
||||||
widgetElement.appendChild(myContainer)
|
widgetElement.appendChild(myContainer)
|
||||||
widgetElement.appendChild(myAppTitle)
|
widgetElement.appendChild(myAppTitle)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user