mirror of
https://github.com/nextcloud/server.git
synced 2026-05-21 17:45:40 -04:00
Merge pull request #30432 from nextcloud/backport/30413/stable22
[stable22] Fix rendering app authors with homepage or email
This commit is contained in:
commit
42ce0bddea
6 changed files with 19 additions and 12 deletions
|
|
@ -8,6 +8,7 @@
|
|||
<version>1.3.0</version>
|
||||
<licence>agpl</licence>
|
||||
<author>Christoph Wurst</author>
|
||||
<author homepage="https://github.com/nextcloud/groupware">Nextcloud Groupware Team</author>
|
||||
<namespace>ContactsInteraction</namespace>
|
||||
<types>
|
||||
<dav/>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -229,13 +229,19 @@ export default {
|
|||
|
||||
// sidebar app binding
|
||||
appSidebar() {
|
||||
const authorName = (xmlNode) => {
|
||||
if (xmlNode['@value']) {
|
||||
// Complex node (with email or homepage attribute)
|
||||
return xmlNode['@value']
|
||||
}
|
||||
|
||||
// Simple text node
|
||||
return xmlNode
|
||||
}
|
||||
|
||||
const author = Array.isArray(this.app.author)
|
||||
? this.app.author[0]['@value']
|
||||
? this.app.author.map(author => author['@value']).join(', ')
|
||||
: this.app.author.join(', ')
|
||||
: this.app.author['@value']
|
||||
? this.app.author['@value']
|
||||
: this.app.author
|
||||
? this.app.author.map(authorName).join(', ')
|
||||
: authorName(this.app.author)
|
||||
const license = t('settings', '{license}-licensed', { license: ('' + this.app.licence).toUpperCase() })
|
||||
|
||||
const subtitle = t('settings', 'by {author}\n{license}', { author, license })
|
||||
|
|
|
|||
Loading…
Reference in a new issue