Merge pull request #550 from YunoHost/enh-app-package-license

add package license link in AppInfo + AppInstall
This commit is contained in:
Alexandre Aubin 2024-03-01 21:06:27 +01:00 committed by GitHub
commit 51c9f1a03f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 10 additions and 4 deletions

View file

@ -130,6 +130,7 @@
"forum": "Topics about this app on YunoHost's forum", "forum": "Topics about this app on YunoHost's forum",
"license": "App license", "license": "App license",
"package": "YunoHost package repository", "package": "YunoHost package repository",
"package_license": "YunoHost package license",
"title": "Links", "title": "Links",
"userdoc": "Official User documentation", "userdoc": "Official User documentation",
"website": "Official Website" "website": "Official Website"

View file

@ -593,6 +593,7 @@
"admindoc": "Documentation officielle de l'administrateur", "admindoc": "Documentation officielle de l'administrateur",
"forum": "Sujets concernant cette application sur le forum de YunoHost", "forum": "Sujets concernant cette application sur le forum de YunoHost",
"package": "Dépôt du paquet YunoHost", "package": "Dépôt du paquet YunoHost",
"package_license": "Licence du paquet YunoHost",
"title": "Liens", "title": "Liens",
"userdoc": "Documentation officielle de l'utilisateur", "userdoc": "Documentation officielle de l'utilisateur",
"website": "Site officiel", "website": "Site officiel",

View file

@ -255,7 +255,7 @@
<b-list-group flush> <b-list-group flush>
<yuno-list-group-item v-for="[key, link] in app.links" :key="key" no-status> <yuno-list-group-item v-for="[key, link] in app.links" :key="key" no-status>
<b-link :href="link" target="_blank"> <b-link :href="link" target="_blank">
<icon :iname="appLinksIcons(key)" /> <icon :iname="appLinksIcons(key)" class="mr-1" />
{{ $t('app.links.' + key) }} {{ $t('app.links.' + key) }}
</b-link> </b-link>
</yuno-list-group-item> </yuno-list-group-item>
@ -369,6 +369,7 @@ export default {
userdoc: 'book', userdoc: 'book',
code: 'code', code: 'code',
package: 'code', package: 'code',
package_license: 'institution',
forum: 'comments' forum: 'comments'
} }
return linksIcons[linkType] return linksIcons[linkType]
@ -423,6 +424,7 @@ export default {
['license', `https://spdx.org/licenses/${app.manifest.upstream.license}`], ['license', `https://spdx.org/licenses/${app.manifest.upstream.license}`],
...['website', 'admindoc', 'userdoc', 'code'].map((key) => ([key, app.manifest.upstream[key]])), ...['website', 'admindoc', 'userdoc', 'code'].map((key) => ([key, app.manifest.upstream[key]])),
['package', app.from_catalog.git?.url], ['package', app.from_catalog.git?.url],
['package_license', app.from_catalog.git?.url + '/blob/master/LICENSE'],
['forum', `https://forum.yunohost.org/tag/${app.manifest.id}`] ['forum', `https://forum.yunohost.org/tag/${app.manifest.id}`]
].filter(([key, val]) => !!val), ].filter(([key, val]) => !!val),
doc: { doc: {

View file

@ -69,7 +69,7 @@
<b-list-group flush> <b-list-group flush>
<yuno-list-group-item v-for="[key, link] in app.links" :key="key" no-status> <yuno-list-group-item v-for="[key, link] in app.links" :key="key" no-status>
<b-link :href="link" target="_blank"> <b-link :href="link" target="_blank">
<icon :iname="appLinksIcons(key)" /> <icon :iname="appLinksIcons(key)" class="mr-1" />
{{ $t('app.links.' + key) }} {{ $t('app.links.' + key) }}
</b-link> </b-link>
</yuno-list-group-item> </yuno-list-group-item>
@ -209,6 +209,7 @@ export default {
userdoc: 'book', userdoc: 'book',
code: 'code', code: 'code',
package: 'code', package: 'code',
package_license: 'institution',
forum: 'comments' forum: 'comments'
} }
return linksIcons[linkType] return linksIcons[linkType]
@ -267,6 +268,7 @@ export default {
['license', `https://spdx.org/licenses/${_app.upstream.license}`], ['license', `https://spdx.org/licenses/${_app.upstream.license}`],
...['website', 'admindoc', 'userdoc', 'code'].map((key) => ([key, _app.upstream[key]])), ...['website', 'admindoc', 'userdoc', 'code'].map((key) => ([key, _app.upstream[key]])),
['package', _app.remote.url], ['package', _app.remote.url],
['package_license', _app.remote.url + '/blob/master/LICENSE'],
['forum', `https://forum.yunohost.org/tag/${id}`] ['forum', `https://forum.yunohost.org/tag/${id}`]
].filter(([key, val]) => !!val), ].filter(([key, val]) => !!val),
preInstall, preInstall,