mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 17:52:02 -04:00
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
This commit is contained in:
commit
cc5e54d6e8
4 changed files with 6 additions and 4 deletions
|
|
@ -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: {},
|
||||
|
|
|
|||
4
dist/dashboard-main.js
vendored
4
dist/dashboard-main.js
vendored
File diff suppressed because one or more lines are too long
2
dist/dashboard-main.js.map
vendored
2
dist/dashboard-main.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue