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>
|
<style lang="scss" scoped>
|
||||||
.description-row {
|
.description-row {
|
||||||
@include media-breakpoint-up(md) {
|
@include media-breakpoint-up(md) {
|
||||||
margin: .5rem 0;
|
margin: .25rem 0;
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: rgba(0, 0, 0, 0.05);
|
background-color: rgba(0, 0, 0, 0.05);
|
||||||
border-radius: 0.2rem;
|
border-radius: 0.2rem;
|
||||||
|
|
|
@ -3,18 +3,10 @@
|
||||||
<template v-if="infos">
|
<template v-if="infos">
|
||||||
<!-- BASIC INFOS -->
|
<!-- BASIC INFOS -->
|
||||||
<card :title="name" icon="download">
|
<card :title="name" icon="download">
|
||||||
<b-row
|
<description-row
|
||||||
v-for="(info, key) in infos" :key="key"
|
v-for="(info, key) in infos" :key="key"
|
||||||
no-gutters class="row-line"
|
:term="$t(key)" :details="info"
|
||||||
>
|
/>
|
||||||
<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>
|
|
||||||
</card>
|
</card>
|
||||||
|
|
||||||
<!-- INSTALL FORM -->
|
<!-- INSTALL FORM -->
|
||||||
|
@ -70,7 +62,6 @@ export default {
|
||||||
],
|
],
|
||||||
name: undefined,
|
name: undefined,
|
||||||
infos: undefined,
|
infos: undefined,
|
||||||
formDisclaimer: null,
|
|
||||||
form: undefined,
|
form: undefined,
|
||||||
fields: undefined,
|
fields: undefined,
|
||||||
validations: null,
|
validations: null,
|
||||||
|
@ -87,15 +78,16 @@ export default {
|
||||||
onQueriesResponse (manifest) {
|
onQueriesResponse (manifest) {
|
||||||
this.name = manifest.name
|
this.name = manifest.name
|
||||||
const infosKeys = ['id', 'description', 'license', 'version', 'multi_instance']
|
const infosKeys = ['id', 'description', 'license', 'version', 'multi_instance']
|
||||||
|
manifest.license = manifest.upstream.license
|
||||||
if (manifest.license === undefined || manifest.license === 'free') {
|
if (manifest.license === undefined || manifest.license === 'free') {
|
||||||
infosKeys.splice(2, 1)
|
infosKeys.splice(2, 1)
|
||||||
}
|
}
|
||||||
manifest.description = formatI18nField(manifest.description)
|
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]]))
|
this.infos = Object.fromEntries(infosKeys.map(key => [key, manifest[key]]))
|
||||||
|
|
||||||
// FIXME yunohost should add the label field by default
|
// 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 }),
|
ask: this.$t('label_for_manifestname', { name: manifest.name }),
|
||||||
default: manifest.name,
|
default: manifest.name,
|
||||||
name: 'label'
|
name: 'label'
|
||||||
|
@ -106,7 +98,7 @@ export default {
|
||||||
fields,
|
fields,
|
||||||
validations,
|
validations,
|
||||||
errors
|
errors
|
||||||
} = formatYunoHostArguments(manifest.arguments.install)
|
} = formatYunoHostArguments(manifest.install)
|
||||||
|
|
||||||
this.fields = fields
|
this.fields = fields
|
||||||
this.form = form
|
this.form = form
|
||||||
|
|
Loading…
Add table
Reference in a new issue