diff options
Diffstat (limited to 'apps/federatedfilesharing')
-rw-r--r-- | apps/federatedfilesharing/composer/composer/installed.php | 6 | ||||
-rw-r--r-- | apps/federatedfilesharing/l10n/de.js | 8 | ||||
-rw-r--r-- | apps/federatedfilesharing/l10n/de.json | 8 | ||||
-rw-r--r-- | apps/federatedfilesharing/l10n/es_SV.js | 2 | ||||
-rw-r--r-- | apps/federatedfilesharing/l10n/es_SV.json | 2 | ||||
-rw-r--r-- | apps/federatedfilesharing/l10n/fi.js | 1 | ||||
-rw-r--r-- | apps/federatedfilesharing/l10n/fi.json | 1 | ||||
-rw-r--r-- | apps/federatedfilesharing/l10n/mk.js | 8 | ||||
-rw-r--r-- | apps/federatedfilesharing/l10n/mk.json | 8 | ||||
-rw-r--r-- | apps/federatedfilesharing/l10n/nl.js | 2 | ||||
-rw-r--r-- | apps/federatedfilesharing/l10n/nl.json | 2 | ||||
-rw-r--r-- | apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php | 36 | ||||
-rw-r--r-- | apps/federatedfilesharing/lib/Controller/RequestHandlerController.php | 3 | ||||
-rw-r--r-- | apps/federatedfilesharing/src/components/AdminSettings.vue | 36 | ||||
-rw-r--r-- | apps/federatedfilesharing/src/components/PersonalSettings.vue | 32 |
15 files changed, 84 insertions, 71 deletions
diff --git a/apps/federatedfilesharing/composer/composer/installed.php b/apps/federatedfilesharing/composer/composer/installed.php index 5440719fa40..c54b7ff5437 100644 --- a/apps/federatedfilesharing/composer/composer/installed.php +++ b/apps/federatedfilesharing/composer/composer/installed.php @@ -1,22 +1,22 @@ <?php return array( 'root' => array( + 'name' => '__root__', 'pretty_version' => 'dev-master', 'version' => 'dev-master', + 'reference' => '7669331be09dd3cb848182ae8edc2408802a4fb4', 'type' => 'library', 'install_path' => __DIR__ . '/../', 'aliases' => array(), - 'reference' => 'c6429e6cd19c57582364338362e543580821cf99', - 'name' => '__root__', 'dev' => false, ), 'versions' => array( '__root__' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', + 'reference' => '7669331be09dd3cb848182ae8edc2408802a4fb4', 'type' => 'library', 'install_path' => __DIR__ . '/../', 'aliases' => array(), - 'reference' => 'c6429e6cd19c57582364338362e543580821cf99', 'dev_requirement' => false, ), ), diff --git a/apps/federatedfilesharing/l10n/de.js b/apps/federatedfilesharing/l10n/de.js index c8276429489..c079e190a03 100644 --- a/apps/federatedfilesharing/l10n/de.js +++ b/apps/federatedfilesharing/l10n/de.js @@ -10,7 +10,7 @@ OC.L10N.register( "Server to server sharing is not enabled on this server" : "Das Server-zu-Server-Teilen ist auf diesem Server nicht aktiviert", "Couldn't establish a federated share." : "Federated-Share konnte nicht aufgebaut werden", "Couldn't establish a federated share, maybe the password was wrong." : "Federated-Share konnte nicht aufgebaut werden, da eventuell das Passwort falsch ist.", - "Federated Share request sent, you will receive an invitation. Check your notifications." : "Anfrage zum Federated-Share war erfolgreich. Du erhälst eine Einladung. Bitte prüfe Deine Benachrichtigungen. ", + "Federated Share request sent, you will receive an invitation. Check your notifications." : "Anfrage zum Federated-Share war erfolgreich. Du erhälst eine Einladung. Bitte prüfe deine Benachrichtigungen. ", "Couldn't establish a federated share, it looks like the server to federate with is too old (Nextcloud <= 9)." : "Federated-Share konnte nicht aufgebaut werden, da der Zielserver eine zu alte Version verwendet (Nextcloud <=9).", "It is not allowed to send federated group shares from this server." : "Das Erstellen einer Federated Cloud Freigabe ist von diesem Server aus nicht erlaubt.", "Sharing %1$s failed, because this item is already shared with user %2$s" : "Das Teilen von %1$s ist fehlgeschlagen, da dieses Objekt bereits mit Benutzer %2$s geteilt wird", @@ -42,11 +42,13 @@ OC.L10N.register( "Federated Cloud" : "Federated Cloud", "You can share with anyone who uses a Nextcloud server or other Open Cloud Mesh (OCM) compatible servers and services! Just put their Federated Cloud ID in the share dialog. It looks like person@cloud.example.com" : "Du kannst mit jedem teilen, der einen Nextcloud-Server oder andere Open Cloud Mesh (OCM) kompatible Server und Dienste verwendet! Gebe einfach deren Federated-Cloud-ID in den Teilen-Dialog ein. Diese sieht wie folgt aus: person@cloud.example.com", "Your Federated Cloud ID:" : "Deine Federated-Cloud-ID:", - "Share it so your friends can share files with you:" : "Teile es, so dass Deine Freunde Dateien mit Dir teilen können:", + "Share it so your friends can share files with you:" : "Teile es, so dass deine Freunde Dateien mit dir teilen können:", + "Facebook" : "Facebook", "Twitter" : "Twitter", - "Add to your website" : "Zu Deiner Webseite hinzufügen", + "Add to your website" : "Zu deiner Webseite hinzufügen", "Share with me via Nextcloud" : "Teile mit mir über Nextcloud", "HTML Code:" : "HTML-Code:", + "Cloud ID copied to the clipboard" : "Cloud-ID in die Zwischenablage kopiert", "Copy to clipboard" : "In die Zwischenablage kopieren", "Copy" : "Kopieren", "Copied!" : "Kopiert!", diff --git a/apps/federatedfilesharing/l10n/de.json b/apps/federatedfilesharing/l10n/de.json index c3186826509..bf0f52d88ad 100644 --- a/apps/federatedfilesharing/l10n/de.json +++ b/apps/federatedfilesharing/l10n/de.json @@ -8,7 +8,7 @@ "Server to server sharing is not enabled on this server" : "Das Server-zu-Server-Teilen ist auf diesem Server nicht aktiviert", "Couldn't establish a federated share." : "Federated-Share konnte nicht aufgebaut werden", "Couldn't establish a federated share, maybe the password was wrong." : "Federated-Share konnte nicht aufgebaut werden, da eventuell das Passwort falsch ist.", - "Federated Share request sent, you will receive an invitation. Check your notifications." : "Anfrage zum Federated-Share war erfolgreich. Du erhälst eine Einladung. Bitte prüfe Deine Benachrichtigungen. ", + "Federated Share request sent, you will receive an invitation. Check your notifications." : "Anfrage zum Federated-Share war erfolgreich. Du erhälst eine Einladung. Bitte prüfe deine Benachrichtigungen. ", "Couldn't establish a federated share, it looks like the server to federate with is too old (Nextcloud <= 9)." : "Federated-Share konnte nicht aufgebaut werden, da der Zielserver eine zu alte Version verwendet (Nextcloud <=9).", "It is not allowed to send federated group shares from this server." : "Das Erstellen einer Federated Cloud Freigabe ist von diesem Server aus nicht erlaubt.", "Sharing %1$s failed, because this item is already shared with user %2$s" : "Das Teilen von %1$s ist fehlgeschlagen, da dieses Objekt bereits mit Benutzer %2$s geteilt wird", @@ -40,11 +40,13 @@ "Federated Cloud" : "Federated Cloud", "You can share with anyone who uses a Nextcloud server or other Open Cloud Mesh (OCM) compatible servers and services! Just put their Federated Cloud ID in the share dialog. It looks like person@cloud.example.com" : "Du kannst mit jedem teilen, der einen Nextcloud-Server oder andere Open Cloud Mesh (OCM) kompatible Server und Dienste verwendet! Gebe einfach deren Federated-Cloud-ID in den Teilen-Dialog ein. Diese sieht wie folgt aus: person@cloud.example.com", "Your Federated Cloud ID:" : "Deine Federated-Cloud-ID:", - "Share it so your friends can share files with you:" : "Teile es, so dass Deine Freunde Dateien mit Dir teilen können:", + "Share it so your friends can share files with you:" : "Teile es, so dass deine Freunde Dateien mit dir teilen können:", + "Facebook" : "Facebook", "Twitter" : "Twitter", - "Add to your website" : "Zu Deiner Webseite hinzufügen", + "Add to your website" : "Zu deiner Webseite hinzufügen", "Share with me via Nextcloud" : "Teile mit mir über Nextcloud", "HTML Code:" : "HTML-Code:", + "Cloud ID copied to the clipboard" : "Cloud-ID in die Zwischenablage kopiert", "Copy to clipboard" : "In die Zwischenablage kopieren", "Copy" : "Kopieren", "Copied!" : "Kopiert!", diff --git a/apps/federatedfilesharing/l10n/es_SV.js b/apps/federatedfilesharing/l10n/es_SV.js index 1b487261660..3856402d6bf 100644 --- a/apps/federatedfilesharing/l10n/es_SV.js +++ b/apps/federatedfilesharing/l10n/es_SV.js @@ -44,4 +44,4 @@ OC.L10N.register( "Open documentation" : "Abrir documentación", "Adjust how people can share between servers." : "Ajustar cómo las personas pueden compartir entre servidores. " }, -"nplurals=2; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); +"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); diff --git a/apps/federatedfilesharing/l10n/es_SV.json b/apps/federatedfilesharing/l10n/es_SV.json index c12b88eaea4..2c1cb71309a 100644 --- a/apps/federatedfilesharing/l10n/es_SV.json +++ b/apps/federatedfilesharing/l10n/es_SV.json @@ -41,5 +41,5 @@ "Press Ctrl-C to copy." : "Presiona Ctrl-C para copiar.", "Open documentation" : "Abrir documentación", "Adjust how people can share between servers." : "Ajustar cómo las personas pueden compartir entre servidores. " -},"pluralForm" :"nplurals=2; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" +},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" }
\ No newline at end of file diff --git a/apps/federatedfilesharing/l10n/fi.js b/apps/federatedfilesharing/l10n/fi.js index dc163068be2..0cdf732f3f9 100644 --- a/apps/federatedfilesharing/l10n/fi.js +++ b/apps/federatedfilesharing/l10n/fi.js @@ -13,6 +13,7 @@ OC.L10N.register( "Federated Share request sent, you will receive an invitation. Check your notifications." : "Federoidun jakamisen pyyntö lähetetty, saat kutsun. Tarkista ilmoitukset.", "Couldn't establish a federated share, it looks like the server to federate with is too old (Nextcloud <= 9)." : "Federoitua jakoa ei voitu muodostaa. Vaikuttaa siltä, että palvelin jonka kanssa federointia yritetään, on versioltaan liian vanha (Nextcloud <= 9).", "It is not allowed to send federated group shares from this server." : "Federoitujen ryhmäjakojen lähettäminen tältä palvelimelta ei ole sallittu.", + "Sharing %1$s failed, because this item is already shared with user %2$s" : "Kohteen %1$s jakaminen epäonnistui, koska tämä kohde on jo jaettu käyttäjän %2$s kanssa", "Not allowed to create a federated share with the same user" : "Saman käyttäjän kanssa ei ole sallittua luoda federoitua jakoa", "Federated shares require read permissions" : "Federoidut jaot vaativat lukuoikeuksia", "File is already shared with %s" : "Tiedosto on jo jaettu kohteen %s kanssa", diff --git a/apps/federatedfilesharing/l10n/fi.json b/apps/federatedfilesharing/l10n/fi.json index a627009b843..78f327dba5f 100644 --- a/apps/federatedfilesharing/l10n/fi.json +++ b/apps/federatedfilesharing/l10n/fi.json @@ -11,6 +11,7 @@ "Federated Share request sent, you will receive an invitation. Check your notifications." : "Federoidun jakamisen pyyntö lähetetty, saat kutsun. Tarkista ilmoitukset.", "Couldn't establish a federated share, it looks like the server to federate with is too old (Nextcloud <= 9)." : "Federoitua jakoa ei voitu muodostaa. Vaikuttaa siltä, että palvelin jonka kanssa federointia yritetään, on versioltaan liian vanha (Nextcloud <= 9).", "It is not allowed to send federated group shares from this server." : "Federoitujen ryhmäjakojen lähettäminen tältä palvelimelta ei ole sallittu.", + "Sharing %1$s failed, because this item is already shared with user %2$s" : "Kohteen %1$s jakaminen epäonnistui, koska tämä kohde on jo jaettu käyttäjän %2$s kanssa", "Not allowed to create a federated share with the same user" : "Saman käyttäjän kanssa ei ole sallittua luoda federoitua jakoa", "Federated shares require read permissions" : "Federoidut jaot vaativat lukuoikeuksia", "File is already shared with %s" : "Tiedosto on jo jaettu kohteen %s kanssa", diff --git a/apps/federatedfilesharing/l10n/mk.js b/apps/federatedfilesharing/l10n/mk.js index 735c4d3c947..ff1077f9d40 100644 --- a/apps/federatedfilesharing/l10n/mk.js +++ b/apps/federatedfilesharing/l10n/mk.js @@ -15,6 +15,7 @@ OC.L10N.register( "It is not allowed to send federated group shares from this server." : "Не е овозможено да испратите федерално групно споделување од овој сервер.", "Sharing %1$s failed, because this item is already shared with user %2$s" : "Споделувањето на %1$s е неуспешно, бидејќи истото веќе е споделено со корисникот %2$s", "Not allowed to create a federated share with the same user" : "Не е овозможено да креирате федерално споделување со ист корисник", + "Federated shares require read permissions" : "Федералното споделување бара дозволи за читање", "File is already shared with %s" : "Датотеката е веќе споделена со %s", "Sharing %1$s failed, could not find %2$s, maybe the server is currently unreachable or uses a self-signed certificate." : "Споделувањето на %1$s е неуспешно, неможе да се пронајде %2$s, можеби серверот моментално не е достапен или користи недоверлив сертификат.", "Could not find share" : "Неможе да се пронајде споделувањето", @@ -31,21 +32,28 @@ OC.L10N.register( "Sharing" : "Споделување", "Federated file sharing" : "Федерално споделување на датотеки", "Provide federated file sharing across servers" : "Обезбедете федерално споделување на датотеки помеѓу сервери", + "Adjust how people can share between servers. This includes shares between users on this server as well if they are using federated sharing." : "Прилагодете како луѓето можат да споделуваат помеѓу серверите. Ова ги вклучува споделувањата помеѓу корисниците на овој сервер, како и доколку користат федерално споделување.", "Allow users on this server to send shares to other servers (this option also allows WebDAV access to public shares)" : "Дозволи им на корисниците на овој сервер да испраќаат споделувања со други сервери (оваа можност истотака дозволува WebDAV пристап до јавни споделувања)", "Allow users on this server to receive shares from other servers" : "Дозволи им на корисниците на овој сервер да примаат споделувања од други сервери", "Allow users on this server to send shares to groups on other servers" : "Дозволи им на корисниците на овој сервер да испраќаат споделувања со групи на други сервери", "Allow users on this server to receive group shares from other servers" : "Дозволи им на корисниците на овој сервер да примаат споделувања од групи од други сервери", "Search global and public address book for users" : "Пребарајте го глобалниот и јавниот именик на корисници", "Allow users to publish their data to a global and public address book" : "Дозволи им на корисниците да објавуваат информации во глобалниот и јавниот именик ", + "Unable to update federated files sharing config" : "Неможе да се ажурираат параметрите за федерално споделување", "Federated Cloud" : "Федерален клауд", "You can share with anyone who uses a Nextcloud server or other Open Cloud Mesh (OCM) compatible servers and services! Just put their Federated Cloud ID in the share dialog. It looks like person@cloud.example.com" : "Можете да споделувате со секој што користи Nextcloud сервер или друг вид на Open Cloud Mesh (OCM) компатибилен сервер или сервис! Само внесете го федералниот ID во полето за споделување. Треба да изгледа korisnik@cloud.primer.com", "Your Federated Cloud ID:" : "Вашиот федерален ID:", "Share it so your friends can share files with you:" : "Споделете и вашите пријатели ќе можат да споделуваат со вас:", + "Facebook" : "Facebook", "Twitter" : "Twitter", + "Diaspora" : "Diaspora", "Add to your website" : "Додади на твојот веб сајт", "Share with me via Nextcloud" : "Сподели со мене", "HTML Code:" : "HTML код:", + "Share with me through my #Nextcloud Federated Cloud ID, see {url}" : "Споделете со мене преку мојот Федерален Cloud ID, види {url}", + "Cloud ID copied to the clipboard" : "Cloud ID е копиран во клипборд", "Copy to clipboard" : "Копирај во клипборд", + "Clipboard is not available" : "Клипбордот не е достапен", "Copy" : "Копирај", "Copied!" : "Копирано!", "Not supported!" : "Не е поддржано!", diff --git a/apps/federatedfilesharing/l10n/mk.json b/apps/federatedfilesharing/l10n/mk.json index dd0ddd44957..6f142e328de 100644 --- a/apps/federatedfilesharing/l10n/mk.json +++ b/apps/federatedfilesharing/l10n/mk.json @@ -13,6 +13,7 @@ "It is not allowed to send federated group shares from this server." : "Не е овозможено да испратите федерално групно споделување од овој сервер.", "Sharing %1$s failed, because this item is already shared with user %2$s" : "Споделувањето на %1$s е неуспешно, бидејќи истото веќе е споделено со корисникот %2$s", "Not allowed to create a federated share with the same user" : "Не е овозможено да креирате федерално споделување со ист корисник", + "Federated shares require read permissions" : "Федералното споделување бара дозволи за читање", "File is already shared with %s" : "Датотеката е веќе споделена со %s", "Sharing %1$s failed, could not find %2$s, maybe the server is currently unreachable or uses a self-signed certificate." : "Споделувањето на %1$s е неуспешно, неможе да се пронајде %2$s, можеби серверот моментално не е достапен или користи недоверлив сертификат.", "Could not find share" : "Неможе да се пронајде споделувањето", @@ -29,21 +30,28 @@ "Sharing" : "Споделување", "Federated file sharing" : "Федерално споделување на датотеки", "Provide federated file sharing across servers" : "Обезбедете федерално споделување на датотеки помеѓу сервери", + "Adjust how people can share between servers. This includes shares between users on this server as well if they are using federated sharing." : "Прилагодете како луѓето можат да споделуваат помеѓу серверите. Ова ги вклучува споделувањата помеѓу корисниците на овој сервер, како и доколку користат федерално споделување.", "Allow users on this server to send shares to other servers (this option also allows WebDAV access to public shares)" : "Дозволи им на корисниците на овој сервер да испраќаат споделувања со други сервери (оваа можност истотака дозволува WebDAV пристап до јавни споделувања)", "Allow users on this server to receive shares from other servers" : "Дозволи им на корисниците на овој сервер да примаат споделувања од други сервери", "Allow users on this server to send shares to groups on other servers" : "Дозволи им на корисниците на овој сервер да испраќаат споделувања со групи на други сервери", "Allow users on this server to receive group shares from other servers" : "Дозволи им на корисниците на овој сервер да примаат споделувања од групи од други сервери", "Search global and public address book for users" : "Пребарајте го глобалниот и јавниот именик на корисници", "Allow users to publish their data to a global and public address book" : "Дозволи им на корисниците да објавуваат информации во глобалниот и јавниот именик ", + "Unable to update federated files sharing config" : "Неможе да се ажурираат параметрите за федерално споделување", "Federated Cloud" : "Федерален клауд", "You can share with anyone who uses a Nextcloud server or other Open Cloud Mesh (OCM) compatible servers and services! Just put their Federated Cloud ID in the share dialog. It looks like person@cloud.example.com" : "Можете да споделувате со секој што користи Nextcloud сервер или друг вид на Open Cloud Mesh (OCM) компатибилен сервер или сервис! Само внесете го федералниот ID во полето за споделување. Треба да изгледа korisnik@cloud.primer.com", "Your Federated Cloud ID:" : "Вашиот федерален ID:", "Share it so your friends can share files with you:" : "Споделете и вашите пријатели ќе можат да споделуваат со вас:", + "Facebook" : "Facebook", "Twitter" : "Twitter", + "Diaspora" : "Diaspora", "Add to your website" : "Додади на твојот веб сајт", "Share with me via Nextcloud" : "Сподели со мене", "HTML Code:" : "HTML код:", + "Share with me through my #Nextcloud Federated Cloud ID, see {url}" : "Споделете со мене преку мојот Федерален Cloud ID, види {url}", + "Cloud ID copied to the clipboard" : "Cloud ID е копиран во клипборд", "Copy to clipboard" : "Копирај во клипборд", + "Clipboard is not available" : "Клипбордот не е достапен", "Copy" : "Копирај", "Copied!" : "Копирано!", "Not supported!" : "Не е поддржано!", diff --git a/apps/federatedfilesharing/l10n/nl.js b/apps/federatedfilesharing/l10n/nl.js index e320bc3232f..69db08b7a49 100644 --- a/apps/federatedfilesharing/l10n/nl.js +++ b/apps/federatedfilesharing/l10n/nl.js @@ -43,7 +43,9 @@ OC.L10N.register( "You can share with anyone who uses a Nextcloud server or other Open Cloud Mesh (OCM) compatible servers and services! Just put their Federated Cloud ID in the share dialog. It looks like person@cloud.example.com" : "Je kunt met iedereen delen die Nextcloud, ownCloud of een ander Open Cloud Mesh (OCM) compatible server of services gebruikt! Gebruik simpelweg hun gefedereerde Cloud ID in de deel-dialoog. Het ziet eruit als iemand@cloud.voorbeeld.com", "Your Federated Cloud ID:" : "Je gefedereerde Cloud ID:", "Share it so your friends can share files with you:" : "Deel het, zodat anderen bestanden met jou kunnen delen:", + "Facebook" : "Facebook", "Twitter" : "Twitter", + "Diaspora" : "Diaspora", "Add to your website" : "Toevoegen aan je website", "Share with me via Nextcloud" : "Deel met mij via Nextcloud", "HTML Code:" : "HTML Code:", diff --git a/apps/federatedfilesharing/l10n/nl.json b/apps/federatedfilesharing/l10n/nl.json index f47d5cac3a2..44f702a35e7 100644 --- a/apps/federatedfilesharing/l10n/nl.json +++ b/apps/federatedfilesharing/l10n/nl.json @@ -41,7 +41,9 @@ "You can share with anyone who uses a Nextcloud server or other Open Cloud Mesh (OCM) compatible servers and services! Just put their Federated Cloud ID in the share dialog. It looks like person@cloud.example.com" : "Je kunt met iedereen delen die Nextcloud, ownCloud of een ander Open Cloud Mesh (OCM) compatible server of services gebruikt! Gebruik simpelweg hun gefedereerde Cloud ID in de deel-dialoog. Het ziet eruit als iemand@cloud.voorbeeld.com", "Your Federated Cloud ID:" : "Je gefedereerde Cloud ID:", "Share it so your friends can share files with you:" : "Deel het, zodat anderen bestanden met jou kunnen delen:", + "Facebook" : "Facebook", "Twitter" : "Twitter", + "Diaspora" : "Diaspora", "Add to your website" : "Toevoegen aan je website", "Share with me via Nextcloud" : "Deel met mij via Nextcloud", "HTML Code:" : "HTML Code:", diff --git a/apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php b/apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php index cf0691de3ac..f785f4fc528 100644 --- a/apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php +++ b/apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php @@ -41,19 +41,14 @@ use OCP\ILogger; * @package OCA\FederatedFileSharing\BackgroundJob */ class RetryJob extends Job { - - /** @var bool */ - private $retainJob = true; - - /** @var Notifications */ - private $notifications; + private bool $retainJob = true; + private Notifications $notifications; /** @var int max number of attempts to send the request */ - private $maxTry = 20; + private int $maxTry = 20; /** @var int how much time should be between two tries (10 minutes) */ - private $interval = 600; - + private int $interval = 600; public function __construct(Notifications $notifications, ITimeFactory $time) { @@ -62,14 +57,11 @@ class RetryJob extends Job { } /** - * run the job, then remove it from the jobList - * - * @param IJobList $jobList - * @param ILogger|null $logger + * Run the job, then remove it from the jobList */ - public function execute(IJobList $jobList, ILogger $logger = null) { + public function start(IJobList $jobList): void { if ($this->shouldRun($this->argument)) { - parent::execute($jobList, $logger); + parent::start($jobList); $jobList->remove($this, $this->argument); if ($this->retainJob) { $this->reAddJob($jobList, $this->argument); @@ -93,12 +85,9 @@ class RetryJob extends Job { } /** - * re-add background job with new arguments - * - * @param IJobList $jobList - * @param array $argument + * Re-add background job with new arguments */ - protected function reAddJob(IJobList $jobList, array $argument) { + protected function reAddJob(IJobList $jobList, array $argument): void { $jobList->add(RetryJob::class, [ 'remote' => $argument['remote'], @@ -113,12 +102,9 @@ class RetryJob extends Job { } /** - * test if it is time for the next run - * - * @param array $argument - * @return bool + * Test if it is time for the next run */ - protected function shouldRun(array $argument) { + protected function shouldRun(array $argument): bool { $lastRun = (int)$argument['lastRun']; return (($this->time->getTime() - $lastRun) > $this->interval); } diff --git a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php index fe0c7a11ab7..c5e1a8b4e7e 100644 --- a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php +++ b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php @@ -35,6 +35,7 @@ use OCP\AppFramework\OCS\OCSBadRequestException; use OCP\AppFramework\OCS\OCSException; use OCP\AppFramework\OCS\OCSForbiddenException; use OCP\AppFramework\OCSController; +use OCP\App\IAppManager; use OCP\Constants; use OCP\EventDispatcher\IEventDispatcher; use OCP\Federation\Exceptions\ProviderCouldNotAddShareException; @@ -366,7 +367,7 @@ class RequestHandlerController extends OCSController { * @return bool */ private function isS2SEnabled($incoming = false) { - $result = \OCP\App::isEnabled('files_sharing'); + $result = \OCP\Server::get(IAppManager::class)->isEnabledForUser('files_sharing'); if ($incoming) { $result = $result && $this->federatedShareProvider->isIncomingServer2serverShareEnabled(); diff --git a/apps/federatedfilesharing/src/components/AdminSettings.vue b/apps/federatedfilesharing/src/components/AdminSettings.vue index b3fb2a7675b..e3b9d4186a7 100644 --- a/apps/federatedfilesharing/src/components/AdminSettings.vue +++ b/apps/federatedfilesharing/src/components/AdminSettings.vue @@ -21,52 +21,52 @@ --> <template> - <SettingsSection :title="t('federatedfilesharing', 'Federated Cloud Sharing')" + <NcSettingsSection :title="t('federatedfilesharing', 'Federated Cloud Sharing')" :description="t('federatedfilesharing', 'Adjust how people can share between servers. This includes shares between users on this server as well if they are using federated sharing.')" :doc-url="sharingFederatedDocUrl"> - <CheckboxRadioSwitch type="switch" + <NcCheckboxRadioSwitch type="switch" :checked.sync="outgoingServer2serverShareEnabled" @update:checked="update('outgoing_server2server_share_enabled', outgoingServer2serverShareEnabled)"> {{ t('federatedfilesharing', 'Allow users on this server to send shares to other servers (this option also allows WebDAV access to public shares)') }} - </CheckboxRadioSwitch> + </NcCheckboxRadioSwitch> - <CheckboxRadioSwitch type="switch" + <NcCheckboxRadioSwitch type="switch" :checked.sync="incomingServer2serverShareEnabled" @update:checked="update('incoming_server2server_share_enabled', incomingServer2serverShareEnabled)"> {{ t('federatedfilesharing', 'Allow users on this server to receive shares from other servers') }} - </CheckboxRadioSwitch> + </NcCheckboxRadioSwitch> - <CheckboxRadioSwitch v-if="federatedGroupSharingSupported" + <NcCheckboxRadioSwitch v-if="federatedGroupSharingSupported" type="switch" :checked.sync="outgoingServer2serverGroupShareEnabled" @update:checked="update('outgoing_server2server_group_share_enabled', outgoingServer2serverGroupShareEnabled)"> {{ t('federatedfilesharing', 'Allow users on this server to send shares to groups on other servers') }} - </CheckboxRadioSwitch> + </NcCheckboxRadioSwitch> - <CheckboxRadioSwitch v-if="federatedGroupSharingSupported" + <NcCheckboxRadioSwitch v-if="federatedGroupSharingSupported" type="switch" :checked.sync="incomingServer2serverGroupShareEnabled" @update:checked="update('incoming_server2server_group_share_enabled', incomingServer2serverGroupShareEnabled)"> {{ t('federatedfilesharing', 'Allow users on this server to receive group shares from other servers') }} - </CheckboxRadioSwitch> + </NcCheckboxRadioSwitch> - <CheckboxRadioSwitch type="switch" + <NcCheckboxRadioSwitch type="switch" :checked.sync="lookupServerEnabled" @update:checked="update('lookupServerEnabled', lookupServerEnabled)"> {{ t('federatedfilesharing', 'Search global and public address book for users') }} - </CheckboxRadioSwitch> + </NcCheckboxRadioSwitch> - <CheckboxRadioSwitch type="switch" + <NcCheckboxRadioSwitch type="switch" :checked.sync="lookupServerUploadEnabled" @update:checked="update('lookupServerUploadEnabled', lookupServerUploadEnabled)"> {{ t('federatedfilesharing', 'Allow users to publish their data to a global and public address book') }} - </CheckboxRadioSwitch> - </SettingsSection> + </NcCheckboxRadioSwitch> + </NcSettingsSection> </template> <script> -import CheckboxRadioSwitch from '@nextcloud/vue/dist/Components/CheckboxRadioSwitch' -import SettingsSection from '@nextcloud/vue/dist/Components/SettingsSection' +import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch' +import NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection' import { loadState } from '@nextcloud/initial-state' import { showError } from '@nextcloud/dialogs' import axios from '@nextcloud/axios' @@ -77,8 +77,8 @@ export default { name: 'AdminSettings', components: { - CheckboxRadioSwitch, - SettingsSection, + NcCheckboxRadioSwitch, + NcSettingsSection, }, data() { diff --git a/apps/federatedfilesharing/src/components/PersonalSettings.vue b/apps/federatedfilesharing/src/components/PersonalSettings.vue index 896860cf3e9..640f2c68e0c 100644 --- a/apps/federatedfilesharing/src/components/PersonalSettings.vue +++ b/apps/federatedfilesharing/src/components/PersonalSettings.vue @@ -17,13 +17,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. --> <template> - <SettingsSection :title="t('federatedfilesharing', 'Federated Cloud')" + <NcSettingsSection :title="t('federatedfilesharing', 'Federated Cloud')" :description="t('federatedfilesharing', 'You can share with anyone who uses a Nextcloud server or other Open Cloud Mesh (OCM) compatible servers and services! Just put their Federated Cloud ID in the share dialog. It looks like person@cloud.example.com')" :doc-url="docUrlFederated"> <p class="cloud-id-text"> {{ t('federatedfilesharing', 'Your Federated Cloud ID:') }} <strong id="cloudid">{{ cloudId }}</strong> - <Button ref="clipboard" + <NcButton ref="clipboard" v-tooltip="copyLinkTooltip" class="clipboard" type="tertiary-no-background" @@ -31,24 +31,24 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. <template #icon> <Clipboard :size="20" /> </template> - </Button> + </NcButton> </p> <p class="social-button"> {{ t('federatedfilesharing', 'Share it so your friends can share files with you:') }}<br> - <Button @click="goTo(shareFacebookUrl)"> + <NcButton @click="goTo(shareFacebookUrl)"> {{ t('federatedfilesharing', 'Facebook') }} <template #icon> <Facebook :size="20" /> </template> - </Button> - <Button @click="goTo(shareTwitterUrl)"> + </NcButton> + <NcButton @click="goTo(shareTwitterUrl)"> {{ t('federatedfilesharing', 'Twitter') }} <template #icon> <Twitter :size="20" /> </template> - </Button> - <Button @click="goTo(shareDiasporaUrl)"> + </NcButton> + <NcButton @click="goTo(shareDiasporaUrl)"> {{ t('federatedfilesharing', 'Diaspora') }} <template #icon> <svg width="20" @@ -56,13 +56,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. viewBox="-10 -5 1034 1034" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M502 197q-96 0-96.5 1.5t-1.5 137-1.5 138-2 2.5T266 432.5 132.5 390t-30 94T74 578l232 77q21 8 21 10t-79.5 117.5T168 899t79.5 56.5T328 1011t81-110 82-110 41 55l83 115q43 60 44 60t79.5-58 79-59-76-112.5-76-113.5T795 632.5t129.5-44-28-94T867 400t-128 42-128.5 43-2.5-7.5-1-38.5l-3-108q-4-133-5-133.5t-97-.5z" /></svg> </template> - </Button> - <Button @click="showHtml = !showHtml"> + </NcButton> + <NcButton @click="showHtml = !showHtml"> <template #icon> <Web :size="20" /> </template> {{ t('federatedfilesharing', 'Add to your website') }} - </Button> + </NcButton> </p> <template v-if="showHtml"> @@ -82,14 +82,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. <pre>{{ htmlCode }}</pre> </p> </template> - </SettingsSection> + </NcSettingsSection> </template> <script> import { showError } from '@nextcloud/dialogs' import { loadState } from '@nextcloud/initial-state' -import SettingsSection from '@nextcloud/vue/dist/Components/SettingsSection' -import Button from '@nextcloud/vue/dist/Components/Button' +import NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection' +import NcButton from '@nextcloud/vue/dist/Components/NcButton' import Twitter from 'vue-material-design-icons/Twitter' import Facebook from 'vue-material-design-icons/Facebook' import Web from 'vue-material-design-icons/Web' @@ -99,8 +99,8 @@ import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip' export default { name: 'PersonalSettings', components: { - Button, - SettingsSection, + NcButton, + NcSettingsSection, Twitter, Facebook, Web, |