diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index 7248821804d5aeb90140d7a37161d4070e1eeb07..42818473af5ffce9ac057b0d8155b93bb2eff925 100755 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -43,6 +43,9 @@ class PageController extends Controller { $this->initialState->provideInitialState('increaseStorageUrl', $storageUrl); $this->initialState->provideInitialState('entries', $entries); $this->initialState->provideInitialState('displayName', $displayName); + + $documentsBaseDirectory = $this->appsService->getDocumentsFolder(); + $this->initialState->provideInitialState('documentsBaseDirectory', $documentsBaseDirectory); return new TemplateResponse($this->appName, 'dashboard'); } } diff --git a/lib/Service/AppsService.php b/lib/Service/AppsService.php index 1ea1f2a015dbb3a04bb223263a86244dcb83fef2..50d3649e79655f0092a4457bab151b1aa98b2051 100644 --- a/lib/Service/AppsService.php +++ b/lib/Service/AppsService.php @@ -50,9 +50,6 @@ class AppsService { public function getOnlyOfficeEntries() { $l = $this->l10nFac->get("onlyoffice"); - $l10nDashboard = $this->l10nFac->get("murena-dashboard"); - $untitled = $l10nDashboard->t("untitled"); - $baseDirectory = $this->getDocumentsFolder(); $onlyOfficeEntries = array( array( "id" => "onlyoffice_docx", @@ -60,7 +57,7 @@ class AppsService { "name" => $l->t("Document"), "type" => "link", "active" => false, - "href" => "/apps/onlyoffice/new?id=onlyoffice_docx&name=" . $untitled.".docx&dir=" . $baseDirectory + "href" => "/apps/onlyoffice/new?id=onlyoffice_docx" ), array( "id" => "onlyoffice_xlsx", @@ -68,7 +65,7 @@ class AppsService { "name" => $l->t("Spreadsheet"), "type" => "link", "active" => false, - "href" => "/apps/onlyoffice/new?id=onlyoffice_xlsx&name=" . $untitled.".xlsx&dir=" . $baseDirectory + "href" => "/apps/onlyoffice/new?id=onlyoffice_xlsx" ), array( "id" => "onlyoffice_pptx", @@ -76,7 +73,7 @@ class AppsService { "name" => $l->t("Presentation"), "type" => "link", "active" => false, - "href" => "/apps/onlyoffice/new?id=onlyoffice_pptx&name=" . $untitled.".pptx&dir=" . $baseDirectory + "href" => "/apps/onlyoffice/new?id=onlyoffice_pptx" ), ); return $onlyOfficeEntries; diff --git a/src/components/AllApps.vue b/src/components/AllApps.vue index 43ae78b28e95a91f54076f0edc9092f8830cd890..e100b1449f79e912ca017873ca107c38884d89d8 100755 --- a/src/components/AllApps.vue +++ b/src/components/AllApps.vue @@ -36,7 +36,7 @@