diff --git a/appinfo/info.xml b/appinfo/info.xml
index 81ee266fa50255de23777ccb9ce96fa5a71f8346..eccc41ab3bdf7070a577e1ad83bf38f22a2a02de 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -5,7 +5,7 @@
Murena Dashboard
Murena Dashboard
- 2.0.5
+ 2.0.7
agpl
Murena
MurenaDashboard
diff --git a/l10n/de.js b/l10n/de.js
index f656e843ce960452a01f30b11f014fbd26d6d069..2caaea94659594a137864a53038d08146d1a5622 100644
--- a/l10n/de.js
+++ b/l10n/de.js
@@ -13,6 +13,7 @@ OC.L10N.register(
"Upgrade Storage" : "Speicherplatz erweitern",
"getCredits" : "Holen Sie sich bis zu 40 € Guthaben für Ihren Cloud-Speicher, indem Sie Ihre Freunde einladen!",
"openAnAccount" : "Für jeden Freund, der ein Konto eröffnet, erhalten Sie beide 2 €, die für Cloud-Speicher verwendet werden können.",
- "Invite Your Friends" : "Lade deine Freunde ein"
+ "Invite Your Friends" : "Lade deine Freunde ein",
+ "untitled": "unbetitelt"
},
"nplurals=2; plural=n != 1;");
diff --git a/l10n/de.json b/l10n/de.json
index 0745f5dd4dfb2c4609d6ea4de05d6c55eae4ad0f..27cd47dd2c5f01b13eb2f9c62ba5a076da23aa13 100644
--- a/l10n/de.json
+++ b/l10n/de.json
@@ -11,6 +11,7 @@
"Upgrade Storage" : "Speicherplatz erweitern",
"getCredits" : "Holen Sie sich bis zu 40 € Guthaben für Ihren Cloud-Speicher, indem Sie Ihre Freunde einladen!",
"openAnAccount" : "Für jeden Freund, der ein Konto eröffnet, erhalten Sie beide 2 €, die für Cloud-Speicher verwendet werden können.",
- "Invite Your Friends" : "Lade deine Freunde ein"
+ "Invite Your Friends" : "Lade deine Freunde ein",
+ "untitled": "unbetitelt"
},"pluralForm" :"nplurals=2; plural=n != 1;"
}
\ No newline at end of file
diff --git a/l10n/en.js b/l10n/en.js
index 59c95113f6dd7febad3d95f3b41e42dafd1ee73c..49e2ebb09270f78f689c8dbdc9ef470b6767d78d 100755
--- a/l10n/en.js
+++ b/l10n/en.js
@@ -10,6 +10,7 @@ OC.L10N.register(
"Upgrade Storage" : "Upgrade Storage",
"getCredits" : "Get up to 40€ of credits for your cloud storage by inviting your friends!",
"openAnAccount" : "For every friend who opens an account, you will earn 2€ to be used for cloud storage on Murena cloud.",
- "Invite Your Friends" : "Invite Your Friends"
+ "Invite Your Friends" : "Invite Your Friends",
+ "untitled" : "untitled"
},
"nplurals=2; plural=n != 1;");
diff --git a/l10n/en.json b/l10n/en.json
index 6a514ddbfca166d9bdf93729eef2e84cede67a5b..eab1a2342ed0b5a235065590f216175b001c7614 100755
--- a/l10n/en.json
+++ b/l10n/en.json
@@ -8,6 +8,7 @@
"Upgrade Storage" : "Upgrade Storage",
"getCredits" : "Get up to 40€ of credits for your cloud storage by inviting your friends!",
"openAnAccount" : "For every friend who opens an account, you will earn 2€ to be used for cloud storage on Murena cloud.",
- "Invite Your Friends" : "Invite Your Friends"
+ "Invite Your Friends" : "Invite Your Friends",
+ "untitled" : "untitled"
},"pluralForm" :"nplurals=2; plural=n != 1;"
}
\ No newline at end of file
diff --git a/l10n/es.js b/l10n/es.js
index ce2e185be9d48f314b1b26794fc245f2240757c5..c8d204ed333ea276b793e2e74450a0813faba1a5 100644
--- a/l10n/es.js
+++ b/l10n/es.js
@@ -8,6 +8,7 @@ OC.L10N.register(
"Upgrade Storage" : "Actualizar almacenamiento",
"getCredits" : "¡Obtenga hasta 40€ de créditos para su almacenamiento en la nube invitando a sus amigos!",
"openAnAccount" : "Por cada amigo que abra una cuenta, ambos ganarán 2 € que se utilizarán para el almacenamiento en la nube en Murena cloud.",
- "Invite Your Friends" : "Invita a tus amigos"
+ "Invite Your Friends" : "Invita a tus amigos",
+ "untitled": "sin título"
},
"");
diff --git a/l10n/es.json b/l10n/es.json
index 684e18db1dba38265f49834dfe25b7ab20f4ba49..09b1216cada4e013c26c888df8038d8580a3bc14 100644
--- a/l10n/es.json
+++ b/l10n/es.json
@@ -6,6 +6,7 @@
"Upgrade Storage" : "Actualizar almacenamiento",
"getCredits" : "¡Obtenga hasta 40€ de créditos para su almacenamiento en la nube invitando a sus amigos!",
"openAnAccount" : "Por cada amigo que abra una cuenta, ambos ganarán 2 € que se utilizarán para el almacenamiento en la nube en Murena cloud.",
- "Invite Your Friends" : "Invita a tus amigos"
+ "Invite Your Friends" : "Invita a tus amigos",
+ "untitled": "sin título"
},"pluralForm" :""
}
\ No newline at end of file
diff --git a/l10n/fr.js b/l10n/fr.js
index 51ef61262cf700d1cd603ba66c504ca394696575..c0a1be009c35fdbadfad9214886618fedc7266ea 100644
--- a/l10n/fr.js
+++ b/l10n/fr.js
@@ -13,6 +13,7 @@ OC.L10N.register(
"Upgrade Storage" : "Obtenez plus de stockage",
"getCredits" : "Obtenez jusqu'à 40€ de crédits pour votre stockage cloud en invitant vos amis !",
"openAnAccount" : "Pour chaque ami qui ouvre un compte, vous gagnerez tous les deux 2€ à utiliser pour le stockage cloud sur Murena cloud.",
- "Invite Your Friends" : "Parrainez vos amis"
+ "Invite Your Friends" : "Parrainez vos amis",
+ "untitled": "sans titre"
},
"nplurals=2; plural=n > 1;");
diff --git a/l10n/fr.json b/l10n/fr.json
index 224803a960cf584aed2c490d97c8adde4a30bd01..ed781e87799a99b9db1af65751db4f15a3b2c399 100644
--- a/l10n/fr.json
+++ b/l10n/fr.json
@@ -11,6 +11,7 @@
"Upgrade Storage" : "Obtenez plus de stockage",
"getCredits" : "Obtenez jusqu'à 40€ de crédits pour votre stockage cloud en invitant vos amis !",
"openAnAccount" : "Pour chaque ami qui ouvre un compte, vous gagnerez tous les deux 2€ à utiliser pour le stockage cloud sur Murena cloud.",
- "Invite Your Friends" : "Parrainez vos amis"
+ "Invite Your Friends" : "Parrainez vos amis",
+ "untitled": "sans titre"
},"pluralForm" :"nplurals=2; plural=n > 1;"
}
\ No newline at end of file
diff --git a/l10n/it.js b/l10n/it.js
index 01a0b06450d43fabbb8a943e6b51cdf4db2b1076..258496ea063a176f6069de1bcfbda45ff5c345b9 100644
--- a/l10n/it.js
+++ b/l10n/it.js
@@ -13,6 +13,7 @@ OC.L10N.register(
"Upgrade Storage" : "Ingrandisci lo Spazio Disco",
"getCredits" : "ottieni Crediti",
"openAnAccount" : "apri un Account",
- "Invite Your Friends" : "Invita gli Amici"
+ "Invite Your Friends" : "Invita gli Amici",
+ "untitled" : "senza titolo"
},
"nplurals=2; plural=n != 1;");
diff --git a/l10n/it.json b/l10n/it.json
index 21dc002c18f3c0e2a718c717ef559c75a2aa5026..74bd7382d423645d40c51d20b62029a8fd098b09 100644
--- a/l10n/it.json
+++ b/l10n/it.json
@@ -11,6 +11,7 @@
"Upgrade Storage" : "Ingrandisci lo Spazio Disco",
"getCredits" : "ottieni Crediti",
"openAnAccount" : "apri un Account",
- "Invite Your Friends" : "Invita gli Amici"
+ "Invite Your Friends" : "Invita gli Amici",
+ "untitled" : "senza titolo"
},"pluralForm" :"nplurals=2; plural=n != 1;"
}
\ No newline at end of file
diff --git a/lib/Service/AppsService.php b/lib/Service/AppsService.php
index 17f300ac498bf22d022e33e0cfeb761fbc818a6b..5142743c37a3f4c419d9629ed872014edb66f926 100644
--- a/lib/Service/AppsService.php
+++ b/lib/Service/AppsService.php
@@ -9,6 +9,7 @@ use OCP\IGroupManager;
use OCP\IUserSession;
use OCP\IURLGenerator;
use OCP\L10N\IFactory;
+use OCP\Files\IRootFolder;
class AppsService {
private string $appName;
@@ -20,7 +21,7 @@ class AppsService {
private IUserSession $userSession;
private IGroupManager $groupManager;
private IURLGenerator $urlGenerator;
-
+ private IRootFolder $rootFolder;
private const DEFAULT_ORDER = array("/apps/snappymail/", "/apps/calendar/", "/apps/files/" , "/apps/photos/", "/apps/memories/", "/apps/contacts/", "/apps/onlyoffice/ajax/new?id=onlyoffice_docx", "/apps/onlyoffice/ajax/new?id=onlyoffice_xlsx", "/apps/onlyoffice/ajax/new?id=onlyoffice_pptx", "/apps/notes/", "/apps/tasks/", "https://spot.murena.io" , "https://murena.com" );
public function __construct(
@@ -32,6 +33,7 @@ class AppsService {
IUserSession $userSession,
IGroupManager $groupManager,
IURLGenerator $urlGenerator,
+ IRootFolder $rootFolder,
$userId
) {
$this->appName = $appName;
@@ -43,34 +45,40 @@ class AppsService {
$this->userSession = $userSession;
$this->groupManager = $groupManager;
$this->urlGenerator = $urlGenerator;
+ $this->rootFolder = $rootFolder;
}
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",
"icon" => $this->urlGenerator->imagePath('onlyoffice', 'docx/app-color.svg'),
"name" => $l->t("Document"),
+ "type" => "link",
+ "active" => false,
+ "href" => "/apps/onlyoffice/new?id=onlyoffice_docx&name=" . $untitled.".docx&dir=" . $baseDirectory
),
array(
"id" => "onlyoffice_xlsx",
"icon" => $this->urlGenerator->imagePath('onlyoffice', 'xlsx/app-color.svg'),
"name" => $l->t("Spreadsheet"),
+ "type" => "link",
+ "active" => false,
+ "href" => "/apps/onlyoffice/new?id=onlyoffice_xlsx&name=" . $untitled.".xlsx&dir=" . $baseDirectory
),
array(
"id" => "onlyoffice_pptx",
"icon" => $this->urlGenerator->imagePath('onlyoffice', 'pptx/app-color.svg'),
"name" => $l->t("Presentation"),
+ "type" => "link",
+ "active" => false,
+ "href" => "/apps/onlyoffice/new?id=onlyoffice_pptx&name=" . $untitled.".pptx&dir=" . $baseDirectory
),
);
- $onlyOfficeEntries = array_map(function ($entry) {
- $entry["type"] = "link";
- $entry["active"] = false;
- $entry["href"] = "/apps/onlyoffice/ajax/new?id=".$entry["id"];
- return $entry;
- }, $onlyOfficeEntries);
-
return $onlyOfficeEntries;
}
@@ -148,4 +156,18 @@ class AppsService {
$gid = $this->config->getSystemValue("beta_group_name");
return $this->groupManager->isInGroup($uid, $gid);
}
+ public function getDocumentsFolder() {
+ $folderName = 'Documents';
+ $userId = $this->userSession->getUser()->getUID();
+ $userPath = $this->rootFolder->getUserFolder($userId)->getPath();
+ $filePath = $userPath . '/' . $folderName;
+
+ $folder = $this->rootFolder->get($userPath);
+ if ($this->rootFolder->nodeExists($filePath)) {
+ $folder = $this->rootFolder->get($filePath);
+ } else {
+ $filePath = $userPath;
+ }
+ return $filePath === $userPath ? '/' : $folder->getName();
+ }
}
diff --git a/src/components/AllApps.vue b/src/components/AllApps.vue
index 50de872745494c3533a9632adcfd69393d19ea8e..59bd1fbb8c54b8ada4bb996cb174f1f70a9432a3 100755
--- a/src/components/AllApps.vue
+++ b/src/components/AllApps.vue
@@ -38,7 +38,7 @@
:class="{ 'beta-app': entry.is_beta, 'item': true }"
:href="entry.href"
:target="entry.target"
- @click="handleOfficeClick(entry, $event)">
+ >
![]()
+ >