appinfo: use DescriptionRow & reflect appv2 changes

This commit is contained in:
axolotle 2022-10-18 18:08:12 +02:00
parent 967f9d8842
commit eff9389648
2 changed files with 17 additions and 27 deletions

View file

@ -54,6 +54,7 @@ export default {
.col { .col {
display: flex; display: flex;
align-self: start;
} }
} }
</style> </style>

View file

@ -2,33 +2,22 @@
<view-base :queries="queries" @queries-response="onQueriesResponse" ref="view"> <view-base :queries="queries" @queries-response="onQueriesResponse" ref="view">
<!-- BASIC INFOS --> <!-- BASIC INFOS -->
<card v-if="infos" :title="infos.label" icon="cube"> <card v-if="infos" :title="infos.label" icon="cube">
<b-row <description-row
v-for="(value, prop) in infos" :key="prop" v-for="(value, key) in infos" :key="key"
no-gutters class="row-line" :term="$t(key)"
> >
<b-col cols="auto" md="3"> <a v-if="key === 'url'" :href="value" target="_blank">{{ value }}</a>
<strong>{{ $t(prop) }}</strong> <template v-else>{{ value }}</template>
</b-col> </description-row>
<b-col> <description-row :term="$t('app_info_access_desc')">
<a v-if="prop === 'url'" :href="value" target="_blank">{{ value }}</a> {{ allowedGroups.length > 0 ? allowedGroups.join(', ') + '.' : $t('nobody') }}
<span v-else>{{ value }}</span> <b-button
</b-col> size="sm" :to="{ name: 'group-list'}" variant="info"
</b-row> class="ml-2"
<b-row no-gutters class="row-line"> >
<b-col cols="auto" md="3"> <icon iname="key-modern" /> {{ $t('groups_and_permissions_manage') }}
<strong>{{ $t('app_info_access_desc') }}</strong> </b-button>
<span class="sep" /> </description-row>
</b-col>
<b-col>
{{ allowedGroups.length > 0 ? allowedGroups.join(', ') + '.' : $t('nobody') }}
<b-button
size="sm" :to="{ name: 'group-list'}" variant="info"
class="ml-2"
>
<icon iname="key-modern" /> {{ $t('groups_and_permissions_manage') }}
</b-button>
</b-col>
</b-row>
</card> </card>
<!-- OPERATIONS --> <!-- OPERATIONS -->
@ -243,7 +232,7 @@ export default {
label: mainPermission.label, label: mainPermission.label,
description: app.description, description: app.description,
version: app.version, version: app.version,
multi_instance: this.$i18n.t(app.manifest.multi_instance ? 'yes' : 'no'), multi_instance: this.$i18n.t(app.manifest.integration.multi_instance ? 'yes' : 'no'),
install_time: readableDate(app.settings.install_time, true, true) install_time: readableDate(app.settings.install_time, true, true)
} }
if (app.settings.domain && app.settings.path) { if (app.settings.domain && app.settings.path) {