]> source.dussan.org Git - nextcloud-server.git/commitdiff
Expose firstRun parameter to frontend
authorJulius Härtl <jus@bitgrid.net>
Fri, 31 Jul 2020 11:27:43 +0000 (13:27 +0200)
committerJulius Härtl <jus@bitgrid.net>
Wed, 5 Aug 2020 15:01:30 +0000 (17:01 +0200)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
apps/dashboard/lib/Controller/DashboardController.php
apps/dashboard/src/App.vue

index e796ae67ccd0697084db124ed61c69c81f7b7910..2da017497441bfe724eb55cca50e97c739de4223 100644 (file)
@@ -89,6 +89,8 @@ class DashboardController extends Controller {
                }, $this->dashboardManager->getPanels());
                $this->inititalStateService->provideInitialState('dashboard', 'panels', $panels);
                $this->inititalStateService->provideInitialState('dashboard', 'layout', $userLayout);
+               $this->inititalStateService->provideInitialState('dashboard', 'firstRun', $this->config->getUserValue($this->userId, 'dashboard', 'firstRun', '1') === '1');
+               $this->config->setUserValue($this->userId, 'dashboard', 'firstRun', '0');
 
                if (class_exists(LoadViewer::class)) {
                        $this->eventDispatcher->dispatchTyped(new LoadViewer());
index a87ce343706e878d650109183367aa64e1ebf5d0..f0a47ea535d86db5ab035696901aded46015fccd 100644 (file)
@@ -62,6 +62,7 @@ import axios from '@nextcloud/axios'
 import { generateUrl } from '@nextcloud/router'
 
 const panels = loadState('dashboard', 'panels')
+const firstRun = loadState('dashboard', 'firstRun')
 
 export default {
        name: 'App',
@@ -74,6 +75,7 @@ export default {
                        timer: new Date(),
                        callbacks: {},
                        panels,
+                       firstRun,
                        displayName: getCurrentUser()?.displayName,
                        uid: getCurrentUser()?.uid,
                        layout: loadState('dashboard', 'layout').filter((panelId) => panels[panelId]),