kopia lustrzana https://github.com/nextcloud/social
👌 IMPROVE: correctly display all keys in summary (like account/s etc)
Signed-off-by: Jonas Sulzer <jonas@violoncello.ch>pull/625/head
rodzic
a727183fe2
commit
24a2e12b17
src/components
|
@ -62,7 +62,16 @@ export default {
|
|||
let summary = this.item.summary
|
||||
for (var key in this.item.details) {
|
||||
let keyword = '{' + key + '}'
|
||||
summary = summary.replace(keyword, JSON.stringify(this.item.details[key]))
|
||||
if (typeof this.item.details[key] !== 'string' && this.item.details[key].length > 1) {
|
||||
let concatination = ''
|
||||
for (var stringkey in this.item.details[key]) {
|
||||
concatination += this.item.details[key][stringkey] + ', '
|
||||
}
|
||||
concatination = concatination.substring(0, concatination.length - 2)
|
||||
summary = summary.replace(keyword, concatination)
|
||||
} else {
|
||||
summary = summary.replace(keyword, this.item.details[key])
|
||||
}
|
||||
}
|
||||
return summary
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue