summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--settings/Controller/AppSettingsController.php1
-rw-r--r--settings/src/components/appDetails.vue18
-rw-r--r--settings/src/components/appList.vue11
-rw-r--r--settings/src/components/appList/appItem.vue1
4 files changed, 22 insertions, 9 deletions
diff --git a/settings/Controller/AppSettingsController.php b/settings/Controller/AppSettingsController.php
index a44a252a747..6784a53aee9 100644
--- a/settings/Controller/AppSettingsController.php
+++ b/settings/Controller/AppSettingsController.php
@@ -485,6 +485,7 @@ class AppSettingsController extends Controller {
$apps = array_map(function($appData) use ($manager) {
$appStoreData = $manager->getApp($appData['id']);
$appData['appstoreData'] = $appStoreData;
+ $appData['license'] = $appStoreData['releases'][0]['licenses'];
$appData['preview'] = isset($appStoreData['screenshots'][0]['url']) ? 'https://usercontent.apps.nextcloud.com/'.base64_encode($appStoreData['screenshots'][0]['url']) : '';
return $appData;
}, $apps);
diff --git a/settings/src/components/appDetails.vue b/settings/src/components/appDetails.vue
index 1595be7ac13..3370ee055e4 100644
--- a/settings/src/components/appDetails.vue
+++ b/settings/src/components/appDetails.vue
@@ -28,11 +28,11 @@
<app-score v-if="app.appstoreData && app.appstoreData.ratingNumOverall > 5" :score="app.appstoreData.ratingOverall"></app-score>
<div class="app-author">
{{ t('settings', 'by') }}
- <span v-if="author.length > 0" v-for="a in author">
- <a v-if="a['@attributes']['homepage']" :href="a['@attributes']['homepage']">{{ a['@value'] }}</a> &nbsp;
+ <span v-for="a in author">
+ <a v-if="a['@attributes'] && a['@attributes']['homepage']" :href="a['@attributes']['homepage']">{{ a['@value'] }}</a>
<span v-else>{{ a['@value'] }}</span>
+ &nbsp;
</span>
- <span v-else>{{ author }}</span>
</div>
{{ licence }}
<div class="actions">
@@ -103,7 +103,6 @@ export default {
},
computed: {
groups() {
- console.log(this.$store.getters.getGroups);
return this.$store.getters.getGroups
.filter(group => group.id !== 'disabled')
.sort((a, b) => a.name.localeCompare(b.name));
@@ -112,8 +111,17 @@ export default {
return this.app.license + t('settings', '-licensed');
},
author() {
+ if (typeof this.app.author === 'string') {
+ return [
+ {
+ '@value': this.app.author
+ }
+ ]
+ }
+ if (this.app.author['@value']) {
+ return [this.app.author];
+ }
return this.app.author;
- return t('settings', 'by') + ' ' + this.app.author;
},
renderMarkdown() {
// TODO: bundle marked as well
diff --git a/settings/src/components/appList.vue b/settings/src/components/appList.vue
index 760bc8a66a1..56e169c7dde 100644
--- a/settings/src/components/appList.vue
+++ b/settings/src/components/appList.vue
@@ -45,7 +45,7 @@
</div>
<div id="apps-list" class="installed" v-if="search !== ''">
- <div>
+ <div class="section">
<div></div>
<h2>{{ t('settings', 'Results from other categories') }}</h2>
</div>
@@ -95,10 +95,15 @@ export default {
},
searchApps() {
return this.$store.getters.getAllApps
- .filter(app => app.name.toLowerCase().search(this.search.toLowerCase()) !== -1)
+ .filter(app => {
+ if (app.name.toLowerCase().search(this.search.toLowerCase()) !== -1) {
+ return (!this.apps.find(_app => _app.id === app.id));
+ }
+ return false;
+
+ });
},
groups() {
- console.log(this.$store.getters.getGroups);
return this.$store.getters.getGroups
.filter(group => group.id !== 'disabled')
.sort((a, b) => a.name.localeCompare(b.name));
diff --git a/settings/src/components/appList/appItem.vue b/settings/src/components/appList/appItem.vue
index 25e9a4602c2..35f06f76512 100644
--- a/settings/src/components/appList/appItem.vue
+++ b/settings/src/components/appList/appItem.vue
@@ -23,7 +23,6 @@
<template>
<div class="section" v-bind:class="{ selected: isSelected }">
<div class="app-image app-image-icon" v-on:click="showAppDetails">
- {{ isSelected }}
<div v-if="!app.preview" class="icon-settings-dark"></div>
<img v-if="!app.previewAsIcon && app.preview" :src="app.preview" width="100%" />
<svg v-if="app.previewAsIcon && app.preview" width="32" height="32" viewBox="0 0 32 32">