Compare commits

..

19 Commits

Author SHA1 Message Date
Julius Härtl
15ae74249b 1.1.0 is for 18-20
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-10-02 21:11:16 +02:00
Julius Härtl
aa069805c5 Merge pull request #2308 from nextcloud/release/1.1.0-beta3 2020-10-02 21:10:12 +02:00
Julius Härtl
e5338bf6d2 Update changelog
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-10-02 20:57:35 +02:00
Julius Härtl
65a3033403 Bump version to 1.1.0
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-10-02 20:57:32 +02:00
Julius Härtl
8eb5adfac8 Merge pull request #2117 from nextcloud/bugfix/noid/activity 2020-10-02 17:34:49 +02:00
Julius Härtl
c4672f04d2 Merge pull request #2334 from nextcloud/bugfixes 2020-10-02 15:34:40 +02:00
Julius Härtl
54536eff93 Strip down description if it does not fit the activity_mq table and remove non-working diff rendering
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-10-02 15:22:41 +02:00
Julius Härtl
62f6cfecc2 Fix undefined variable params
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-10-02 14:10:58 +02:00
Julius Härtl
d7d5365a67 Fallback to current user when triggering activities
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-10-02 14:10:57 +02:00
Julius Härtl
8380ae69c8 Emit activity on stack change
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-10-02 14:10:57 +02:00
Julius Härtl
6a409c508e Reduce the number of results in autocomplete
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-10-02 14:10:36 +02:00
Julius Härtl
31e42079d0 Bump @nextcloud/vue
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-10-02 14:10:24 +02:00
Julius Härtl
4c2346c66e Merge pull request #2255 from nextcloud/bugfix/noid/unified-search-filtering
Use unified search events to apply on board filtering
2020-10-02 14:09:36 +02:00
Julius Härtl
79b950e192 Quick fix for filtering out archived boards from calendar
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-10-02 13:50:10 +02:00
Julius Härtl
012e5b8ef9 Use unified search events to apply on board filtering
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-10-02 13:22:36 +02:00
Julius Härtl
3914127b39 Don't fail if boards have not been loaded (yet)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-10-02 13:12:32 +02:00
Nextcloud bot
be7357d110 [tx-robot] updated from transifex 2020-10-01 02:29:29 +00:00
Nextcloud bot
d61a08baf5 [tx-robot] updated from transifex 2020-09-30 02:28:49 +00:00
Nextcloud bot
f7209fbe5b [tx-robot] updated from transifex 2020-09-29 02:28:54 +00:00
21 changed files with 131 additions and 56 deletions

View File

@@ -1,31 +1,46 @@
# Changelog # Changelog
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## 1.1.0 - unreleased ## 1.1.0 - 2020-10-03
### Merged PRs ### Features
* [#2115](https://github.com/nextcloud/deck/pull/2115) Dashboard widget for Nextcloud 20
* [#1545](https://github.com/nextcloud/deck/pull/1545) Show cards in calendar/tasks app and make them available though CalDAV
* [#2200](https://github.com/nextcloud/deck/pull/2200) Unified search implementation for Nextcloud 20
* [#1934](https://github.com/nextcloud/deck/pull/1934) Upcoming cards overview @jakobroehrl
* [#2047](https://github.com/nextcloud/deck/pull/2047) Show card details in modal @jakobroehrl
* [#1853](https://github.com/nextcloud/deck/pull/1853) Archive all cards from stack @jakobroehrl * [#1853](https://github.com/nextcloud/deck/pull/1853) Archive all cards from stack @jakobroehrl
* [#1865](https://github.com/nextcloud/deck/pull/1865) Add stack button on empty board @jakobroehrl * [#1865](https://github.com/nextcloud/deck/pull/1865) Add stack button on empty board @jakobroehrl
* [#1926](https://github.com/nextcloud/deck/pull/1926) New filter: unassigned cards @jakobroehrl * [#1926](https://github.com/nextcloud/deck/pull/1926) New filter: unassigned cards @jakobroehrl
* [#1934](https://github.com/nextcloud/deck/pull/1934) Card dashboard @jakobroehrl
### Bugfixes
* [#2035](https://github.com/nextcloud/deck/pull/2035) Attach files in description @jakobroehrl * [#2035](https://github.com/nextcloud/deck/pull/2035) Attach files in description @jakobroehrl
* [#2047](https://github.com/nextcloud/deck/pull/2047) Show card details in modal @jakobroehrl
* [#2115](https://github.com/nextcloud/deck/pull/2115) Dashboard panel @juliushaertl
* [#2123](https://github.com/nextcloud/deck/pull/2123) Fix control tooltip @jakobroehrl * [#2123](https://github.com/nextcloud/deck/pull/2123) Fix control tooltip @jakobroehrl
* [#2144](https://github.com/nextcloud/deck/pull/2144) Fix nextcloud if install with dev dependencies @matchish * [#2144](https://github.com/nextcloud/deck/pull/2144) Fix nextcloud if install with dev dependencies @matchish
* [#2157](https://github.com/nextcloud/deck/pull/2157) Build/webpack shared config @juliushaertl * [#2158](https://github.com/nextcloud/deck/pull/2158) Fix description in dark mode
* [#2158](https://github.com/nextcloud/deck/pull/2158) Fix description in dark mode @juliushaertl
* [#2169](https://github.com/nextcloud/deck/pull/2169) Bump webpack-merge from 5.0.9 to 5.1.0 @dependabot
* [#2170](https://github.com/nextcloud/deck/pull/2170) Add lastModified date to boards API documentation @stefan-niedermann
* [#2188](https://github.com/nextcloud/deck/pull/2188) CardBadges: Count checkboxes started with "+ [ ]" @joreiff * [#2188](https://github.com/nextcloud/deck/pull/2188) CardBadges: Count checkboxes started with "+ [ ]" @joreiff
* [#2200](https://github.com/nextcloud/deck/pull/2200) Unified search implementation @juliushaertl * [#2206](https://github.com/nextcloud/deck/pull/2206) Fix read-only sidebar (fixes #2033)
* [#2206](https://github.com/nextcloud/deck/pull/2206) Fix read-only sidebar (fixes #2033) @juliushaertl * [#2208](https://github.com/nextcloud/deck/pull/2208) Fix design, dark mode and keyboard navigation of the board list
* [#2208](https://github.com/nextcloud/deck/pull/2208) Fix design, dark mode and keyboard navigation of the board list @juliushaertl
* [#2210](https://github.com/nextcloud/deck/pull/2210) Fix an incorrect/misleading message in lib/Service/BoardService.php @jordanbancino * [#2210](https://github.com/nextcloud/deck/pull/2210) Fix an incorrect/misleading message in lib/Service/BoardService.php @jordanbancino
* [#2211](https://github.com/nextcloud/deck/pull/2211) Update incorrect field in API documentation (docs/API.md) @jordanbancino * [#2243](https://github.com/nextcloud/deck/pull/2243) Various smaller styling fixes
* [#2243](https://github.com/nextcloud/deck/pull/2243) Various smaller styling fixes @juliushaertl * [#2244](https://github.com/nextcloud/deck/pull/2244) Toggle filter on clicking card labels
* [#2244](https://github.com/nextcloud/deck/pull/2244) Toggle filter on clicking card labels @juliushaertl * [#2117](https://github.com/nextcloud/deck/pull/2117) Activity fixes
* [#2255](https://github.com/nextcloud/deck/pull/2255) Use unified search events to apply on board filtering
* [#2271](https://github.com/nextcloud/deck/pull/2271) Sort tags in filter @jakobroehrl
* [#2318](https://github.com/nextcloud/deck/pull/2318) Card title: prevent space and no text @jakobroehrl
* [#2319](https://github.com/nextcloud/deck/pull/2319) Move style loading to BeforeTemplateRenderedEvent
* [#2320](https://github.com/nextcloud/deck/pull/2320) Consistent naming @jakobroehrl
* [#2252](https://github.com/nextcloud/deck/pull/2252) Fix double slash in the deck activity links @baraksoa
* [#2270](https://github.com/nextcloud/deck/pull/2270) Fix empty content view to align with other widgets
* [#2275](https://github.com/nextcloud/deck/pull/2275) Wait for services to be registered before performing further setup that requires services
* [#2278](https://github.com/nextcloud/deck/pull/2278) Fix wrong SQL queries @Chartman123
* [#2279](https://github.com/nextcloud/deck/pull/2279) L10n:add translation to card placeholder @mjanssens
* [#2282](https://github.com/nextcloud/deck/pull/2282) Duedate picker localization
* [#2283](https://github.com/nextcloud/deck/pull/2283) Do not handle exceptions from page controller in the ExceptionMiddleware
* [#2298](https://github.com/nextcloud/deck/pull/2298) Use absolute URLs for the search @nickvergessen
## 1.0.5 - 2020-07-15 ## 1.0.5 - 2020-07-15

View File

@@ -17,7 +17,7 @@
- 🚀 Get your project organized - 🚀 Get your project organized
</description> </description>
<version>1.1.0-beta2</version> <version>1.1.0</version>
<licence>agpl</licence> <licence>agpl</licence>
<author>Julius Härtl</author> <author>Julius Härtl</author>
<namespace>Deck</namespace> <namespace>Deck</namespace>
@@ -36,7 +36,7 @@
<database min-version="9.4">pgsql</database> <database min-version="9.4">pgsql</database>
<database>sqlite</database> <database>sqlite</database>
<database min-version="5.5">mysql</database> <database min-version="5.5">mysql</database>
<nextcloud min-version="18" max-version="21" /> <nextcloud min-version="18" max-version="20" />
</dependencies> </dependencies>
<background-jobs> <background-jobs>
<job>OCA\Deck\Cron\DeleteCron</job> <job>OCA\Deck\Cron\DeleteCron</job>

View File

@@ -191,6 +191,7 @@ OC.L10N.register(
"Select Date" : "Seleccione la fecha", "Select Date" : "Seleccione la fecha",
"Modified" : "Modificado", "Modified" : "Modificado",
"Created" : "Creado", "Created" : "Creado",
"The title cannot be empty." : "El título no puede estar vacío.",
"No comments yet. Begin the discussion!" : "Todavía no hay comentarios. ¡Comienza la discusión!", "No comments yet. Begin the discussion!" : "Todavía no hay comentarios. ¡Comienza la discusión!",
"Save" : "Guardar", "Save" : "Guardar",
"The comment cannot be empty." : "El comentario no puede estar vacío.", "The comment cannot be empty." : "El comentario no puede estar vacío.",
@@ -216,6 +217,7 @@ OC.L10N.register(
"Show boards in calendar/tasks" : "Mostrar tableros en calendario/tareas", "Show boards in calendar/tasks" : "Mostrar tableros en calendario/tareas",
"Limit deck usage of groups" : "Limitar el uso de Deck a grupos", "Limit deck usage of groups" : "Limitar el uso de Deck a grupos",
"Limiting Deck will block users not part of those groups from creating their own boards. Users will still be able to work on boards that have been shared with them." : "Limitar Deck impedirá que usuarios que no formen parte de esos grupos creen sus propios tableros. Los usuarios todavía podrán trabajar en tableros que hayan sido compartidos con ellos.", "Limiting Deck will block users not part of those groups from creating their own boards. Users will still be able to work on boards that have been shared with them." : "Limitar Deck impedirá que usuarios que no formen parte de esos grupos creen sus propios tableros. Los usuarios todavía podrán trabajar en tableros que hayan sido compartidos con ellos.",
"Board name" : "Nombre del tablero",
"Edit board" : "Editar tablero", "Edit board" : "Editar tablero",
"Clone board " : "Clonar tablero", "Clone board " : "Clonar tablero",
"Unarchive board " : "Desarchivar tablero", "Unarchive board " : "Desarchivar tablero",

View File

@@ -189,6 +189,7 @@
"Select Date" : "Seleccione la fecha", "Select Date" : "Seleccione la fecha",
"Modified" : "Modificado", "Modified" : "Modificado",
"Created" : "Creado", "Created" : "Creado",
"The title cannot be empty." : "El título no puede estar vacío.",
"No comments yet. Begin the discussion!" : "Todavía no hay comentarios. ¡Comienza la discusión!", "No comments yet. Begin the discussion!" : "Todavía no hay comentarios. ¡Comienza la discusión!",
"Save" : "Guardar", "Save" : "Guardar",
"The comment cannot be empty." : "El comentario no puede estar vacío.", "The comment cannot be empty." : "El comentario no puede estar vacío.",
@@ -214,6 +215,7 @@
"Show boards in calendar/tasks" : "Mostrar tableros en calendario/tareas", "Show boards in calendar/tasks" : "Mostrar tableros en calendario/tareas",
"Limit deck usage of groups" : "Limitar el uso de Deck a grupos", "Limit deck usage of groups" : "Limitar el uso de Deck a grupos",
"Limiting Deck will block users not part of those groups from creating their own boards. Users will still be able to work on boards that have been shared with them." : "Limitar Deck impedirá que usuarios que no formen parte de esos grupos creen sus propios tableros. Los usuarios todavía podrán trabajar en tableros que hayan sido compartidos con ellos.", "Limiting Deck will block users not part of those groups from creating their own boards. Users will still be able to work on boards that have been shared with them." : "Limitar Deck impedirá que usuarios que no formen parte de esos grupos creen sus propios tableros. Los usuarios todavía podrán trabajar en tableros que hayan sido compartidos con ellos.",
"Board name" : "Nombre del tablero",
"Edit board" : "Editar tablero", "Edit board" : "Editar tablero",
"Clone board " : "Clonar tablero", "Clone board " : "Clonar tablero",
"Unarchive board " : "Desarchivar tablero", "Unarchive board " : "Desarchivar tablero",

View File

@@ -121,6 +121,7 @@ OC.L10N.register(
"Apply filter" : "Primijeni filtar", "Apply filter" : "Primijeni filtar",
"Filter by tag" : "Filtriraj prema oznaci", "Filter by tag" : "Filtriraj prema oznaci",
"Filter by assigned user" : "Filtriraj prema dodijeljenom korisniku", "Filter by assigned user" : "Filtriraj prema dodijeljenom korisniku",
"Unassigned" : "Nedodijeljeno",
"Filter by due date" : "Filtriraj prema datumu dospijeća", "Filter by due date" : "Filtriraj prema datumu dospijeća",
"Overdue" : "Kasni", "Overdue" : "Kasni",
"Next 24 hours" : "Sljedeća 24 sata", "Next 24 hours" : "Sljedeća 24 sata",
@@ -133,6 +134,8 @@ OC.L10N.register(
"Toggle compact mode" : "Prebaci u kompaktni način rada", "Toggle compact mode" : "Prebaci u kompaktni način rada",
"Details" : "Pojedinosti", "Details" : "Pojedinosti",
"Loading board" : "Učitavanje ploče", "Loading board" : "Učitavanje ploče",
"No lists available" : "Nema dostupnih popisa",
"Create a new list to add cards to this board" : "Stvorite novi popis kako biste dodali kartice na ovu ploču",
"Board not found" : "Ploča nije pronađena", "Board not found" : "Ploča nije pronađena",
"Sharing" : "Dijeljenje", "Sharing" : "Dijeljenje",
"Tags" : "Oznake", "Tags" : "Oznake",

View File

@@ -119,6 +119,7 @@
"Apply filter" : "Primijeni filtar", "Apply filter" : "Primijeni filtar",
"Filter by tag" : "Filtriraj prema oznaci", "Filter by tag" : "Filtriraj prema oznaci",
"Filter by assigned user" : "Filtriraj prema dodijeljenom korisniku", "Filter by assigned user" : "Filtriraj prema dodijeljenom korisniku",
"Unassigned" : "Nedodijeljeno",
"Filter by due date" : "Filtriraj prema datumu dospijeća", "Filter by due date" : "Filtriraj prema datumu dospijeća",
"Overdue" : "Kasni", "Overdue" : "Kasni",
"Next 24 hours" : "Sljedeća 24 sata", "Next 24 hours" : "Sljedeća 24 sata",
@@ -131,6 +132,8 @@
"Toggle compact mode" : "Prebaci u kompaktni način rada", "Toggle compact mode" : "Prebaci u kompaktni način rada",
"Details" : "Pojedinosti", "Details" : "Pojedinosti",
"Loading board" : "Učitavanje ploče", "Loading board" : "Učitavanje ploče",
"No lists available" : "Nema dostupnih popisa",
"Create a new list to add cards to this board" : "Stvorite novi popis kako biste dodali kartice na ovu ploču",
"Board not found" : "Ploča nije pronađena", "Board not found" : "Ploča nije pronađena",
"Sharing" : "Dijeljenje", "Sharing" : "Dijeljenje",
"Tags" : "Oznake", "Tags" : "Oznake",

View File

@@ -191,6 +191,7 @@ OC.L10N.register(
"Select Date" : "Tarih Seçin", "Select Date" : "Tarih Seçin",
"Modified" : "Değiştirilme", "Modified" : "Değiştirilme",
"Created" : "Oluşturulma", "Created" : "Oluşturulma",
"The title cannot be empty." : "Başlık boş olamaz.",
"No comments yet. Begin the discussion!" : "Henüz bir yorum yapılmamış. Tartışmayı başlatın!", "No comments yet. Begin the discussion!" : "Henüz bir yorum yapılmamış. Tartışmayı başlatın!",
"Save" : "Kaydet", "Save" : "Kaydet",
"The comment cannot be empty." : "Yorum boş olamaz.", "The comment cannot be empty." : "Yorum boş olamaz.",
@@ -216,6 +217,7 @@ OC.L10N.register(
"Show boards in calendar/tasks" : "Takvimler ve görevlerde panolar görüntülensin", "Show boards in calendar/tasks" : "Takvimler ve görevlerde panolar görüntülensin",
"Limit deck usage of groups" : "Tahtayı şu gruplar kullanabilsin", "Limit deck usage of groups" : "Tahtayı şu gruplar kullanabilsin",
"Limiting Deck will block users not part of those groups from creating their own boards. Users will still be able to work on boards that have been shared with them." : "Tahta kullanımı gruplar ile sınırlandığında belirtilen grupların üyesi olmayan kişiler kendi tahtalarını oluşturamaz. Bu kullanıcılar ancak kendileri ile paylaşılan tahtalar üzerinde çalışabilir.", "Limiting Deck will block users not part of those groups from creating their own boards. Users will still be able to work on boards that have been shared with them." : "Tahta kullanımı gruplar ile sınırlandığında belirtilen grupların üyesi olmayan kişiler kendi tahtalarını oluşturamaz. Bu kullanıcılar ancak kendileri ile paylaşılan tahtalar üzerinde çalışabilir.",
"Board name" : "Pano adı",
"Edit board" : "Panoyu sil", "Edit board" : "Panoyu sil",
"Clone board " : "Panoyu kopyala", "Clone board " : "Panoyu kopyala",
"Unarchive board " : "Panoyu arşivden çıkar", "Unarchive board " : "Panoyu arşivden çıkar",

View File

@@ -189,6 +189,7 @@
"Select Date" : "Tarih Seçin", "Select Date" : "Tarih Seçin",
"Modified" : "Değiştirilme", "Modified" : "Değiştirilme",
"Created" : "Oluşturulma", "Created" : "Oluşturulma",
"The title cannot be empty." : "Başlık boş olamaz.",
"No comments yet. Begin the discussion!" : "Henüz bir yorum yapılmamış. Tartışmayı başlatın!", "No comments yet. Begin the discussion!" : "Henüz bir yorum yapılmamış. Tartışmayı başlatın!",
"Save" : "Kaydet", "Save" : "Kaydet",
"The comment cannot be empty." : "Yorum boş olamaz.", "The comment cannot be empty." : "Yorum boş olamaz.",
@@ -214,6 +215,7 @@
"Show boards in calendar/tasks" : "Takvimler ve görevlerde panolar görüntülensin", "Show boards in calendar/tasks" : "Takvimler ve görevlerde panolar görüntülensin",
"Limit deck usage of groups" : "Tahtayı şu gruplar kullanabilsin", "Limit deck usage of groups" : "Tahtayı şu gruplar kullanabilsin",
"Limiting Deck will block users not part of those groups from creating their own boards. Users will still be able to work on boards that have been shared with them." : "Tahta kullanımı gruplar ile sınırlandığında belirtilen grupların üyesi olmayan kişiler kendi tahtalarını oluşturamaz. Bu kullanıcılar ancak kendileri ile paylaşılan tahtalar üzerinde çalışabilir.", "Limiting Deck will block users not part of those groups from creating their own boards. Users will still be able to work on boards that have been shared with them." : "Tahta kullanımı gruplar ile sınırlandığında belirtilen grupların üyesi olmayan kişiler kendi tahtalarını oluşturamaz. Bu kullanıcılar ancak kendileri ile paylaşılan tahtalar üzerinde çalışabilir.",
"Board name" : "Pano adı",
"Edit board" : "Panoyu sil", "Edit board" : "Panoyu sil",
"Clone board " : "Panoyu kopyala", "Clone board " : "Panoyu kopyala",
"Unarchive board " : "Panoyu arşivden çıkar", "Unarchive board " : "Panoyu arşivden çıkar",

View File

@@ -240,9 +240,25 @@ class ActivityManager {
} }
public function triggerEvent($objectType, $entity, $subject, $additionalParams = [], $author = null) { public function triggerEvent($objectType, $entity, $subject, $additionalParams = [], $author = null) {
if ($author === null) {
$author = $this->userId;
}
try { try {
$event = $this->createEvent($objectType, $entity, $subject, $additionalParams, $author); $event = $this->createEvent($objectType, $entity, $subject, $additionalParams, $author);
if ($event !== null) { if ($event !== null) {
$json = json_encode($event->getSubjectParameters());
if (mb_strlen($json) > 4000) {
$params = json_decode(json_encode($event->getSubjectParameters()), true);
$newContent = $params['after'];
unset($params['before'], $params['after'], $params['card']['description']);
$params['after'] = mb_substr($newContent, 0, 2000);
if (mb_strlen($newContent) > 2000) {
$params['after'] .= '...';
}
$event->setSubject($event->getSubject(), $params);
}
$this->sendToUsers($event); $this->sendToUsers($event);
} }
} catch (\Exception $e) { } catch (\Exception $e) {

View File

@@ -96,6 +96,7 @@ class DeckProvider implements IProvider {
unset($subjectParams['author']); unset($subjectParams['author']);
} }
$user = $this->userManager->get($author); $user = $this->userManager->get($author);
$params = [];
if ($user !== null) { if ($user !== null) {
$params = [ $params = [
'user' => [ 'user' => [
@@ -328,8 +329,8 @@ class DeckProvider implements IProvider {
if (array_key_exists('diff', $subjectParams) && $subjectParams['diff']) { if (array_key_exists('diff', $subjectParams) && $subjectParams['diff']) {
$diff = new Diff(); $diff = new Diff();
// Don't add diff as message since we are limited to 255 chars here // Don't add diff as message since we are limited to 255 chars here
//$event->setMessage($subjectParams['after']); $event->setParsedMessage($subjectParams['after']);
$event->setParsedMessage('<pre class="visualdiff">' . $diff->render($subjectParams['before'], $subjectParams['after']) . '</pre>'); //$event->setParsedMessage('<pre class="visualdiff">' . $diff->render($subjectParams['before'], $subjectParams['after']) . '</pre>');
return $params; return $params;
} }
if (array_key_exists('before', $subjectParams)) { if (array_key_exists('before', $subjectParams)) {

View File

@@ -59,7 +59,7 @@ class DeckCalendarBackend {
} }
public function getBoards(): array { public function getBoards(): array {
return $this->boardService->findAll(); return $this->boardService->findAll(-1, null, false);
} }
public function getBoard(int $id): Board { public function getBoard(int $id): Board {

View File

@@ -93,10 +93,18 @@ class BoardMapper extends DeckMapper implements IPermissionMapper {
* @param null $offset * @param null $offset
* @return array * @return array
*/ */
public function findAllByUser($userId, $limit = null, $offset = null, $since = -1) { public function findAllByUser($userId, $limit = null, $offset = null, $since = -1, $includeArchived = true) {
$sql = 'SELECT id, title, owner, color, archived, deleted_at, 0 as shared, last_modified FROM `*PREFIX*deck_boards` WHERE owner = ? AND last_modified > ? UNION ' . // FIXME: One moving to QBMapper we should allow filtering the boards probably by method chaining for additional where clauses
$sql = 'SELECT id, title, owner, color, archived, deleted_at, 0 as shared, last_modified FROM `*PREFIX*deck_boards` WHERE owner = ? AND last_modified > ?';
if (!$includeArchived) {
$sql .= ' AND NOT archived';
}
$sql .= ' UNION ' .
'SELECT boards.id, title, owner, color, archived, deleted_at, 1 as shared, last_modified FROM `*PREFIX*deck_boards` as boards ' . 'SELECT boards.id, title, owner, color, archived, deleted_at, 1 as shared, last_modified FROM `*PREFIX*deck_boards` as boards ' .
'JOIN `*PREFIX*deck_board_acl` as acl ON boards.id=acl.board_id WHERE acl.participant=? AND acl.type=? AND boards.owner != ? AND last_modified > ?'; 'JOIN `*PREFIX*deck_board_acl` as acl ON boards.id=acl.board_id WHERE acl.participant=? AND acl.type=? AND boards.owner != ? AND last_modified > ?';
if (!$includeArchived) {
$sql .= ' AND NOT archived';
}
$entries = $this->findEntities($sql, [$userId, $since, $userId, Acl::PERMISSION_TYPE_USER, $userId, $since], $limit, $offset); $entries = $this->findEntities($sql, [$userId, $since, $userId, Acl::PERMISSION_TYPE_USER, $userId, $since], $limit, $offset);
/* @var Board $entry */ /* @var Board $entry */
foreach ($entries as $entry) { foreach ($entries as $entry) {
@@ -120,7 +128,7 @@ class BoardMapper extends DeckMapper implements IPermissionMapper {
* @param null $offset * @param null $offset
* @return array * @return array
*/ */
public function findAllByGroups($userId, $groups, $limit = null, $offset = null) { public function findAllByGroups($userId, $groups, $limit = null, $offset = null, $since = -1,$includeArchived = true) {
if (count($groups) <= 0) { if (count($groups) <= 0) {
return []; return [];
} }
@@ -132,7 +140,10 @@ class BoardMapper extends DeckMapper implements IPermissionMapper {
$sql .= ' OR '; $sql .= ' OR ';
} }
} }
$sql .= ');'; $sql .= ')';
if (!$includeArchived) {
$sql .= ' AND NOT archived';
}
$entries = $this->findEntities($sql, array_merge([$userId, Acl::PERMISSION_TYPE_GROUP], $groups), $limit, $offset); $entries = $this->findEntities($sql, array_merge([$userId, Acl::PERMISSION_TYPE_GROUP], $groups), $limit, $offset);
/* @var Board $entry */ /* @var Board $entry */
foreach ($entries as $entry) { foreach ($entries as $entry) {
@@ -142,7 +153,7 @@ class BoardMapper extends DeckMapper implements IPermissionMapper {
return $entries; return $entries;
} }
public function findAllByCircles($userId, $limit = null, $offset = null) { public function findAllByCircles($userId, $limit = null, $offset = null, $since = -1,$includeArchived = true) {
if (!$this->circlesEnabled) { if (!$this->circlesEnabled) {
return []; return [];
} }
@@ -161,7 +172,10 @@ class BoardMapper extends DeckMapper implements IPermissionMapper {
$sql .= ' OR '; $sql .= ' OR ';
} }
} }
$sql .= ');'; $sql .= ')';
if (!$includeArchived) {
$sql .= ' AND NOT archived';
}
$entries = $this->findEntities($sql, array_merge([$userId, Acl::PERMISSION_TYPE_CIRCLE], $circles), $limit, $offset); $entries = $this->findEntities($sql, array_merge([$userId, Acl::PERMISSION_TYPE_CIRCLE], $circles), $limit, $offset);
/* @var Board $entry */ /* @var Board $entry */
foreach ($entries as $entry) { foreach ($entries as $entry) {

View File

@@ -107,11 +107,11 @@ class BoardService {
$this->userId = $userId; $this->userId = $userId;
} }
public function getUserBoards(int $since = -1): array { public function getUserBoards(int $since = -1, $includeArchived = true): array {
$userInfo = $this->getBoardPrerequisites(); $userInfo = $this->getBoardPrerequisites();
$userBoards = $this->boardMapper->findAllByUser($userInfo['user'], null, null, $since); $userBoards = $this->boardMapper->findAllByUser($userInfo['user'], null, null, $since, $includeArchived);
$groupBoards = $this->boardMapper->findAllByGroups($userInfo['user'], $userInfo['groups'],null, null, $since); $groupBoards = $this->boardMapper->findAllByGroups($userInfo['user'], $userInfo['groups'],null, null, $since, $includeArchived);
$circleBoards = $this->boardMapper->findAllByCircles($userInfo['user'], null, null, $since); $circleBoards = $this->boardMapper->findAllByCircles($userInfo['user'], null, null, $since, $includeArchived);
$mergedBoards = array_merge($userBoards, $groupBoards, $circleBoards); $mergedBoards = array_merge($userBoards, $groupBoards, $circleBoards);
$result = []; $result = [];
/** @var Board $item */ /** @var Board $item */
@@ -125,11 +125,11 @@ class BoardService {
/** /**
* @return array * @return array
*/ */
public function findAll($since = -1, $details = null) { public function findAll($since = -1, $details = null, $includeArchived = true) {
if ($this->boardsCache) { if ($this->boardsCache) {
return $this->boardsCache; return $this->boardsCache;
} }
$complete = $this->getUserBoards($since); $complete = $this->getUserBoards($since, $includeArchived);
$result = []; $result = [];
/** @var Board $item */ /** @var Board $item */
foreach ($complete as &$item) { foreach ($complete as &$item) {

View File

@@ -415,8 +415,11 @@ class CardService {
if ($card->getArchived()) { if ($card->getArchived()) {
throw new StatusException('Operation not allowed. This card is archived.'); throw new StatusException('Operation not allowed. This card is archived.');
} }
$changes = new ChangeSet($card);
$card->setStackId($stackId); $card->setStackId($stackId);
$this->cardMapper->update($card); $this->cardMapper->update($card);
$changes->setAfter($card);
$this->activityManager->triggerUpdateEvents(ActivityManager::DECK_OBJECT_CARD, $changes, ActivityManager::SUBJECT_CARD_UPDATE);
$cards = $this->cardMapper->findAll($stackId); $cards = $this->cardMapper->findAll($stackId);
$result = []; $result = [];

38
package-lock.json generated
View File

@@ -3479,29 +3479,24 @@
} }
}, },
"@nextcloud/event-bus": { "@nextcloud/event-bus": {
"version": "1.1.4", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/@nextcloud/event-bus/-/event-bus-1.1.4.tgz", "resolved": "https://registry.npmjs.org/@nextcloud/event-bus/-/event-bus-1.2.0.tgz",
"integrity": "sha512-It27KzmUaSQ7w22nHFwOn8XgeVG0HYYOSNG9gs4UkP5VqcZ16m4ydt3GkMpWcyFec4OUjJc+yf7omRc3pNxsSw==", "integrity": "sha512-pNS0R6Mvgj4WnbJQ8LYjxRjCbRndpwjHNyZYm0zl8U71gbHsUvQIIzTdW7WYg6Nz/FjAlrdmDXJDFLh1DDcIFA==",
"requires": { "requires": {
"@types/semver": "^6.2.1", "@types/semver": "^7.1.0",
"core-js": "^3.6.2", "core-js": "^3.6.2",
"semver": "^6.3.0" "semver": "^7.3.2"
}, },
"dependencies": { "dependencies": {
"@types/semver": {
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-6.2.1.tgz",
"integrity": "sha512-+beqKQOh9PYxuHvijhVl+tIHvT6tuwOrE9m14zd+MT2A38KoKZhh7pYJ0SNleLtwDsiIxHDsIk9bv01oOxvSvA=="
},
"core-js": { "core-js": {
"version": "3.6.5", "version": "3.6.5",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz", "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz",
"integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==" "integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA=="
}, },
"semver": { "semver": {
"version": "6.3.0", "version": "7.3.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ=="
} }
} }
}, },
@@ -3636,9 +3631,9 @@
} }
}, },
"@nextcloud/vue": { "@nextcloud/vue": {
"version": "2.6.5", "version": "2.6.8",
"resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-2.6.5.tgz", "resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-2.6.8.tgz",
"integrity": "sha512-ZeY4n/TJ0cRu/iDgLGCwFSksvStMO+fAeJfANwjp52LjrpFXuJjxqG8ZKBdr7zJewj/yTOq6k0wMDnyBFTgnXA==", "integrity": "sha512-9yi9V4gX4Y1uxh2hNxCAlTHaS9zolzAy7x1sowII/WZfxMysF/yIGmEsnYGyz6CZ5eYCzxNUgrU5p/HQ21/09Q==",
"requires": { "requires": {
"@nextcloud/auth": "^1.2.3", "@nextcloud/auth": "^1.2.3",
"@nextcloud/axios": "^1.3.2", "@nextcloud/axios": "^1.3.2",
@@ -3897,6 +3892,11 @@
"integrity": "sha512-IkVfat549ggtkZUthUzEX49562eGikhSYeVGX97SkMFn+sTZrgRewXjQ4tPKFPCykZHkX1Zfd9OoELGqKU2jJA==", "integrity": "sha512-IkVfat549ggtkZUthUzEX49562eGikhSYeVGX97SkMFn+sTZrgRewXjQ4tPKFPCykZHkX1Zfd9OoELGqKU2jJA==",
"dev": true "dev": true
}, },
"@types/semver": {
"version": "7.3.3",
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.3.tgz",
"integrity": "sha512-jQxClWFzv9IXdLdhSaTf16XI3NYe6zrEbckSpb5xhKfPbWgIyAY0AFyWWWfaiDcBuj3UHmMkCIwSRqpKMTZL2Q=="
},
"@types/stack-utils": { "@types/stack-utils": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz",
@@ -7434,9 +7434,9 @@
"dev": true "dev": true
}, },
"emoji-mart-vue-fast": { "emoji-mart-vue-fast": {
"version": "7.0.4", "version": "7.0.5",
"resolved": "https://registry.npmjs.org/emoji-mart-vue-fast/-/emoji-mart-vue-fast-7.0.4.tgz", "resolved": "https://registry.npmjs.org/emoji-mart-vue-fast/-/emoji-mart-vue-fast-7.0.5.tgz",
"integrity": "sha512-VZuyclCe7ZNPhSvt7WT258MscqRBZTB2Is/7vBilCXgpiZqByaA4AhM1xdIIZZik/aA+5BQiZVmbsDK0jk78Eg==", "integrity": "sha512-+ayg30hhxqqM9oMtN9uUG470hT9gtOdFenByJJBm3XTfzI2QMVJ69euwk+xF55OphLfKZxQG7mnVz13lDOjb3g==",
"requires": { "requires": {
"@babel/polyfill": "7.2.5", "@babel/polyfill": "7.2.5",
"@babel/runtime": "7.3.4", "@babel/runtime": "7.3.4",

View File

@@ -34,12 +34,13 @@
"@nextcloud/auth": "^1.3.0", "@nextcloud/auth": "^1.3.0",
"@nextcloud/axios": "^1.4.0", "@nextcloud/axios": "^1.4.0",
"@nextcloud/dialogs": "^2.0.1", "@nextcloud/dialogs": "^2.0.1",
"@nextcloud/event-bus": "^1.2.0",
"@nextcloud/files": "^1.1.0", "@nextcloud/files": "^1.1.0",
"@nextcloud/initial-state": "^1.1.2", "@nextcloud/initial-state": "^1.1.2",
"@nextcloud/l10n": "^1.4.1", "@nextcloud/l10n": "^1.4.1",
"@nextcloud/moment": "^1.1.1", "@nextcloud/moment": "^1.1.1",
"@nextcloud/router": "^1.2.0", "@nextcloud/router": "^1.2.0",
"@nextcloud/vue": "^2.6.5", "@nextcloud/vue": "^2.6.8",
"@nextcloud/vue-dashboard": "^1.0.1", "@nextcloud/vue-dashboard": "^1.0.1",
"blueimp-md5": "^2.18.0", "blueimp-md5": "^2.18.0",
"dompurify": "^2.1.1", "dompurify": "^2.1.1",

View File

@@ -119,7 +119,7 @@ export default {
sharee.value = item.value sharee.value = item.value
return sharee return sharee
}) }).slice(0, 10)
}, },
unallocatedSharees() { unallocatedSharees() {
return this.sharees.filter((sharee) => { return this.sharees.filter((sharee) => {

View File

@@ -179,7 +179,7 @@
<CardSidebarTabAttachments :card="currentCard" /> <CardSidebarTabAttachments :card="currentCard" />
</AppSidebarTab> </AppSidebarTab>
<AppSidebarTab <AppSidebarTab v-if="hasComments"
id="comments" id="comments"
:order="2" :order="2"
:name="t('deck', 'Comments')" :name="t('deck', 'Comments')"
@@ -283,6 +283,7 @@ export default {
descriptionSaveTimeout: null, descriptionSaveTimeout: null,
descriptionSaving: false, descriptionSaving: false,
hasActivity: capabilities && capabilities.activity, hasActivity: capabilities && capabilities.activity,
hasComments: !!OC.appswebroots['comments'],
modalShow: false, modalShow: false,
lang: { lang: {
days: getDayNamesMin(), days: getDayNamesMin(),

View File

@@ -118,7 +118,7 @@ export default {
return this.$store.getters.canEdit return this.$store.getters.canEdit
} }
const board = this.$store.getters.boards.find((item) => item.id === this.card.boardId) const board = this.$store.getters.boards.find((item) => item.id === this.card.boardId)
return board.permissions.PERMISSION_EDIT return board ? board.permissions.PERMISSION_EDIT : false
}, },
card() { card() {
return this.item ? this.item : this.$store.getters.cardById(this.id) return this.item ? this.item : this.$store.getters.cardById(this.id)

View File

@@ -27,6 +27,7 @@ import { sync } from 'vuex-router-sync'
import { translate, translatePlural } from '@nextcloud/l10n' import { translate, translatePlural } from '@nextcloud/l10n'
import { generateFilePath } from '@nextcloud/router' import { generateFilePath } from '@nextcloud/router'
import { showError } from '@nextcloud/dialogs' import { showError } from '@nextcloud/dialogs'
import { subscribe } from '@nextcloud/event-bus'
import { Tooltip } from '@nextcloud/vue' import { Tooltip } from '@nextcloud/vue'
import ClickOutside from 'vue-click-outside' import ClickOutside from 'vue-click-outside'
import './models' import './models'
@@ -74,8 +75,17 @@ new Vue({
} }
}, },
created() { created() {
subscribe('nextcloud:unified-search.search', ({ query }) => {
this.$store.commit('setSearchQuery', query)
})
subscribe('nextcloud:unified-search.reset', () => {
this.$store.commit('setSearchQuery', '')
})
// FIXME remove this once Nextcloud 20 is minimum required version
// eslint-disable-next-line // eslint-disable-next-line
new OCA.Search(this.filter, this.cleanSearch) new OCA.Search(this.filter, this.cleanSearch)
this.interval = setInterval(() => { this.interval = setInterval(() => {
this.time = Date.now() this.time = Date.now()
}, 1000) }, 1000)

View File

@@ -287,7 +287,7 @@ class DeckProviderTest extends TestCase {
$this->assertEquals('test string Card', $event->getParsedSubject()); $this->assertEquals('test string Card', $event->getParsedSubject());
$this->assertEquals('test string {card}', $event->getRichSubject()); $this->assertEquals('test string {card}', $event->getRichSubject());
$this->assertEquals('BCD', $event->getMessage()); $this->assertEquals('BCD', $event->getMessage());
$this->assertEquals('<pre class="visualdiff"><del>A</del>BC<ins>D</ins></pre>', $event->getParsedMessage()); $this->assertEquals('BCD', $event->getParsedMessage());
} }
public function testParseParamForBoard() { public function testParseParamForBoard() {