fix(dashboard): do not suggest to install new widgets if appstore is disabled

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
pull/44506/head
Thomas Citharel 2 months ago committed by nextcloud-command
parent e317ebdbad
commit 79476682af

@ -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: {},

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save