Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ONLYOFFICE/onlyoffice-nextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Linnik <sergey.linnik@onlyoffice.com>2021-06-02 15:54:52 +0300
committerSergey Linnik <sergey.linnik@onlyoffice.com>2021-06-02 15:54:52 +0300
commit18898faa8c4be5750fe371dc2cceb78b926063e7 (patch)
treebf4e024b559d4dc5aae6d7c76f1d68556b8dd9ef /appinfo/application.php
parentd69024f3edb7566d5f34fce04eaa5de8c93b81c3 (diff)
redirect from dashboard on desktop ( Fix #481 )
Diffstat (limited to 'appinfo/application.php')
-rw-r--r--appinfo/application.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/appinfo/application.php b/appinfo/application.php
index 087eb2c..06bdf8b 100644
--- a/appinfo/application.php
+++ b/appinfo/application.php
@@ -21,6 +21,7 @@ namespace OCA\Onlyoffice\AppInfo;
use OCP\AppFramework\App;
use OCP\AppFramework\Http\ContentSecurityPolicy;
+use OCP\Dashboard\RegisterWidgetEvent;
use OCP\DirectEditing\RegisterDirectEditorEvent;
use OCP\Files\IMimeTypeDetector;
use OCP\Util;
@@ -115,6 +116,17 @@ class Application extends App {
}
});
+ if (class_exists(RegisterWidgetEvent::class)) {
+ $eventDispatcher->addListener(RegisterWidgetEvent::class,
+ function () {
+ if (!empty($this->appConfig->GetDocumentServerUrl())
+ && $this->appConfig->SettingsAreSuccessful()
+ && $this->appConfig->isUserAllowedToUse()) {
+ Util::addScript("onlyoffice", "desktop");
+ }
+ });
+ }
+
require_once __DIR__ . "/../3rdparty/jwt/BeforeValidException.php";
require_once __DIR__ . "/../3rdparty/jwt/ExpiredException.php";
require_once __DIR__ . "/../3rdparty/jwt/SignatureInvalidException.php";