Browse Source
Merge pull request #44506 from nextcloud/dashboard-no-widgets-if-no-appstore
fix(dashboard): do not suggest to install new widgets if appstore is disabled
pull/44562/head
Pytal
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with
6 additions and
4 deletions
-
apps/dashboard/lib/Controller/DashboardController.php
-
apps/dashboard/src/DashboardApp.vue
-
dist/dashboard-main.js
-
dist/dashboard-main.js.map
|
|
|
@ -87,6 +87,7 @@ class DashboardController extends Controller { |
|
|
|
$this->initialState->provideInitialState('panels', $widgets); |
|
|
|
$this->initialState->provideInitialState('statuses', $statuses); |
|
|
|
$this->initialState->provideInitialState('layout', $userLayout); |
|
|
|
$this->initialState->provideInitialState('appStoreEnabled', $this->config->getSystemValueBool('appstoreenabled', true)); |
|
|
|
$this->initialState->provideInitialState('firstRun', $this->config->getUserValue($this->userId, 'dashboard', 'firstRun', '1') === '1'); |
|
|
|
$this->config->setUserValue($this->userId, 'dashboard', 'firstRun', '0'); |
|
|
|
|
|
|
|
|
|
|
|
@ -99,7 +99,7 @@ |
|
|
|
</li> |
|
|
|
</Draggable> |
|
|
|
|
|
|
|
<a v-if="isAdmin" :href="appStoreUrl" class="button">{{ t('dashboard', 'Get more widgets from the App Store') }}</a> |
|
|
|
<a v-if="isAdmin && appStoreEnabled" :href="appStoreUrl" class="button">{{ t('dashboard', 'Get more widgets from the App Store') }}</a> |
|
|
|
|
|
|
|
<div v-if="statuses.weather && isStatusActive('weather')"> |
|
|
|
<h2>{{ t('dashboard', 'Weather service') }}</h2> |
|
|
|
@ -176,6 +176,7 @@ export default { |
|
|
|
layout: loadState('dashboard', 'layout').filter((panelId) => panels[panelId]), |
|
|
|
modal: false, |
|
|
|
appStoreUrl: generateUrl('/settings/apps/dashboard'), |
|
|
|
appStoreEnabled: loadState('dashboard', 'appStoreEnabled', true), |
|
|
|
statuses: {}, |
|
|
|
apiWidgets: [], |
|
|
|
apiWidgetItems: {}, |
|
|
|
|