Merge pull request #15593 from nextcloud/backport/15498/stable16
[stable16] Show supported apps in app management
This commit is contained in:
commit
00595a35c3
|
@ -71,6 +71,7 @@ class OC_App {
|
|||
static private $altLogin = [];
|
||||
static private $alreadyRegistered = [];
|
||||
static public $autoDisabledApps = [];
|
||||
const supportedApp = 300;
|
||||
const officialApp = 200;
|
||||
|
||||
/**
|
||||
|
@ -704,6 +705,9 @@ class OC_App {
|
|||
$appList = [];
|
||||
$langCode = \OC::$server->getL10N('core')->getLanguageCode();
|
||||
$urlGenerator = \OC::$server->getURLGenerator();
|
||||
/** @var \OCP\Support\Subscription\IRegistry $subscriptionRegistry */
|
||||
$subscriptionRegistry = \OC::$server->query(\OCP\Support\Subscription\IRegistry::class);
|
||||
$supportedApps = $subscriptionRegistry->delegateGetSupportedApps();
|
||||
|
||||
foreach ($installedApps as $app) {
|
||||
if (array_search($app, $blacklist) === false) {
|
||||
|
@ -741,6 +745,10 @@ class OC_App {
|
|||
$info['removable'] = true;
|
||||
}
|
||||
|
||||
if (in_array($app, $supportedApps)) {
|
||||
$info['level'] = self::supportedApp;
|
||||
}
|
||||
|
||||
$appPath = self::getAppPath($app);
|
||||
if($appPath !== false) {
|
||||
$appIcon = $appPath . '/img/' . $app . '.svg';
|
||||
|
|
|
@ -682,11 +682,17 @@ span.version {
|
|||
white-space: nowrap;
|
||||
}
|
||||
.official {
|
||||
border-color: #37ce02;
|
||||
background-position: left center;
|
||||
background-position: 5px center;
|
||||
padding-left: 25px;
|
||||
}
|
||||
.supported {
|
||||
border-color: var(--color-success);
|
||||
background-position: left center;
|
||||
background-position: 5px center;
|
||||
padding-left: 25px;
|
||||
color: var(--color-success) ;
|
||||
}
|
||||
}
|
||||
|
||||
.app-score {
|
||||
|
@ -742,6 +748,7 @@ span.version {
|
|||
.app-level {
|
||||
clear: right;
|
||||
width: 100%;
|
||||
.supported,
|
||||
.official {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -31,7 +31,10 @@
|
|||
</svg>
|
||||
{{ app.name }}</h2>
|
||||
<img v-if="app.screenshot" :src="app.screenshot" width="100%" />
|
||||
<div class="app-level" v-if="app.level === 200 || hasRating">
|
||||
<div class="app-level" v-if="app.level === 300 || app.level === 200 || hasRating">
|
||||
<span class="supported icon-checkmark-color" v-if="app.level === 300"
|
||||
v-tooltip.auto="t('settings', 'This app is supported via your current Nextcloud subscription.')">
|
||||
{{ t('settings', 'Supported') }}</span>
|
||||
<span class="official icon-checkmark" v-if="app.level === 200"
|
||||
v-tooltip.auto="t('settings', 'Official apps are developed by and within the community. They offer central functionality and are ready for production use.')">
|
||||
{{ t('settings', 'Official') }}</span>
|
||||
|
|
|
@ -42,6 +42,9 @@
|
|||
</div>
|
||||
|
||||
<div class="app-level">
|
||||
<span class="supported icon-checkmark-color" v-if="app.level === 300"
|
||||
v-tooltip.auto="t('settings', 'This app is supported via your current Nextcloud subscription.')">
|
||||
{{ t('settings', 'Supported') }}</span>
|
||||
<span class="official icon-checkmark" v-if="app.level === 200"
|
||||
v-tooltip.auto="t('settings', 'Official apps are developed by and within the community. They offer central functionality and are ready for production use.')">
|
||||
{{ t('settings', 'Official') }}</span>
|
||||
|
|
Loading…
Reference in New Issue