mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
appinstall: use DescriptionRow and reflect app v2 changes
This commit is contained in:
parent
adefa0d702
commit
967f9d8842
2 changed files with 8 additions and 16 deletions
|
@ -35,7 +35,7 @@ export default {
|
|||
<style lang="scss" scoped>
|
||||
.description-row {
|
||||
@include media-breakpoint-up(md) {
|
||||
margin: .5rem 0;
|
||||
margin: .25rem 0;
|
||||
&:hover {
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
border-radius: 0.2rem;
|
||||
|
|
|
@ -3,18 +3,10 @@
|
|||
<template v-if="infos">
|
||||
<!-- BASIC INFOS -->
|
||||
<card :title="name" icon="download">
|
||||
<b-row
|
||||
<description-row
|
||||
v-for="(info, key) in infos" :key="key"
|
||||
no-gutters class="row-line"
|
||||
>
|
||||
<b-col cols="5" md="3" xl="3">
|
||||
<strong>{{ $t(key) }}</strong>
|
||||
<span class="sep" />
|
||||
</b-col>
|
||||
<b-col>
|
||||
<span>{{ info }}</span>
|
||||
</b-col>
|
||||
</b-row>
|
||||
:term="$t(key)" :details="info"
|
||||
/>
|
||||
</card>
|
||||
|
||||
<!-- INSTALL FORM -->
|
||||
|
@ -70,7 +62,6 @@ export default {
|
|||
],
|
||||
name: undefined,
|
||||
infos: undefined,
|
||||
formDisclaimer: null,
|
||||
form: undefined,
|
||||
fields: undefined,
|
||||
validations: null,
|
||||
|
@ -87,15 +78,16 @@ export default {
|
|||
onQueriesResponse (manifest) {
|
||||
this.name = manifest.name
|
||||
const infosKeys = ['id', 'description', 'license', 'version', 'multi_instance']
|
||||
manifest.license = manifest.upstream.license
|
||||
if (manifest.license === undefined || manifest.license === 'free') {
|
||||
infosKeys.splice(2, 1)
|
||||
}
|
||||
manifest.description = formatI18nField(manifest.description)
|
||||
manifest.multi_instance = this.$i18n.t(manifest.multi_instance ? 'yes' : 'no')
|
||||
manifest.multi_instance = this.$i18n.t(manifest.integration.multi_instance ? 'yes' : 'no')
|
||||
this.infos = Object.fromEntries(infosKeys.map(key => [key, manifest[key]]))
|
||||
|
||||
// FIXME yunohost should add the label field by default
|
||||
manifest.arguments.install.unshift({
|
||||
manifest.install.unshift({
|
||||
ask: this.$t('label_for_manifestname', { name: manifest.name }),
|
||||
default: manifest.name,
|
||||
name: 'label'
|
||||
|
@ -106,7 +98,7 @@ export default {
|
|||
fields,
|
||||
validations,
|
||||
errors
|
||||
} = formatYunoHostArguments(manifest.arguments.install)
|
||||
} = formatYunoHostArguments(manifest.install)
|
||||
|
||||
this.fields = fields
|
||||
this.form = form
|
||||
|
|
Loading…
Add table
Reference in a new issue