Add link to developer docs and fix view if appstore is disabled

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2018-05-25 13:24:51 +02:00
parent c7f145cce1
commit 492b76935c
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
4 changed files with 23 additions and 5 deletions

View File

@ -145,6 +145,7 @@ class AppSettingsController extends Controller {
$params['appstoreEnabled'] = $this->config->getSystemValue('appstoreenabled', true) === true;
$params['urlGenerator'] = $this->urlGenerator;
$params['updateCount'] = count($this->getAppsWithUpdates());
$params['developerDocumentation'] = $this->urlGenerator->linkToDocs('developer-manual');
$this->navigationManager->setActiveEntry('core_apps');
$templateResponse = new TemplateResponse('settings', 'settings', ['serverData' => $params]);
@ -255,6 +256,7 @@ class AppSettingsController extends Controller {
'id' => $app['id'],
'name' => isset($app['translations'][$currentLanguage]['name']) ? $app['translations'][$currentLanguage]['name'] : $app['translations']['en']['name'],
'description' => isset($app['translations'][$currentLanguage]['description']) ? $app['translations'][$currentLanguage]['description'] : $app['translations']['en']['description'],
'summary' => isset($app['translations'][$currentLanguage]['summary']) ? $app['translations'][$currentLanguage]['summary'] : $app['translations']['en']['summary'],
'license' => $app['releases'][0]['licenses'],
'author' => $authors,
'shipped' => false,

View File

@ -41,9 +41,9 @@
<a class="appslink" v-if="app.website" :href="app.website" target="_blank" rel="noreferrer noopener">{{ t('settings', 'Visit website') }} </a>
<a class="appslink" v-if="app.bugs" :href="app.bugs" target="_blank" rel="noreferrer noopener">{{ t('settings', 'Report a bug') }} </a>
<a class="appslink" v-if="app.documentation.user" :href="app.documentation.user" target="_blank" rel="noreferrer noopener">{{ t('settings', 'User documentation') }} </a>
<a class="appslink" v-if="app.documentation.admin" :href="app.documentation.admin" target="_blank" rel="noreferrer noopener">{{ t('settings', 'Admin documentation') }} </a>
<a class="appslink" v-if="app.documentation.developer" :href="app.documentation.developer" target="_blank" rel="noreferrer noopener">{{ t('settings', 'Developer documentation') }} </a>
<a class="appslink" v-if="app.documentation && app.documentation.user" :href="app.documentation.user" target="_blank" rel="noreferrer noopener">{{ t('settings', 'User documentation') }} </a>
<a class="appslink" v-if="app.documentation && app.documentation.admin" :href="app.documentation.admin" target="_blank" rel="noreferrer noopener">{{ t('settings', 'Admin documentation') }} </a>
<a class="appslink" v-if="app.documentation && app.documentation.developer" :href="app.documentation.developer" target="_blank" rel="noreferrer noopener">{{ t('settings', 'Developer documentation') }} </a>
</p>
<ul class="app-dependencies">

View File

@ -23,8 +23,9 @@
<template>
<div class="section">
<div class="app-image app-image-icon" v-on:click="showAppDetails">
<img :src="app.preview" v-if="!app.previewAsIcon" width="100%" />
<svg v-else width="32" height="32" viewBox="0 0 32 32" v-if="app.previewAsIcon">
<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">
<defs><filter id="invertIconApps-606"><feColorMatrix in="SourceGraphic" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"></feColorMatrix></filter></defs>
<image x="0" y="0" width="32" height="32" preserveAspectRatio="xMinYMin meet" filter="url(#invertIconApps-606)" :xlink:href="app.preview" class="app-icon"></image>
</svg>

View File

@ -158,6 +158,14 @@ export default {
text: t('settings', 'Disabled apps'),
}
];
if (!this.settings.appstoreEnabled) {
return {
id: 'appscategories',
items: defaultCategories
}
}
if (this.$store.getters.getUpdateCount > 0) {
defaultCategories.push({
id: 'app-category-updates',
@ -187,6 +195,13 @@ export default {
categories[0].classes.push('active');
}
categories.push({
id: 'app-developer-docs',
classes: [],
href: this.settings.developerDocumentation,
text: t('settings', 'Developer documentation') + ' ↗',
});
// Return
return {
id: 'appscategories',