$widget->getId(), 'title' => $widget->getTitle(), 'iconClass' => $widget->getIconClass(), 'url' => $widget->getUrl() ]; }, $this->dashboardManager->getWidgets()); $this->initialState->provideInitialState('panels', $widgets); $this->initialState->provideInitialState('statuses', $this->service->getStatuses()); $this->initialState->provideInitialState('layout', $this->service->getLayout()); $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'); $response = new TemplateResponse('dashboard', 'index', [ 'id-app-content' => '#app-dashboard', 'id-app-navigation' => null, 'pageTitle' => $this->l10n->t('Dashboard'), ]); // For the weather widget we should allow the geolocation $featurePolicy = new Http\FeaturePolicy(); $featurePolicy->addAllowedGeoLocationDomain('\'self\''); $response->setFeaturePolicy($featurePolicy); return $response; } }