Compare commits
4 Commits
v1.1.0
...
enh/addCar
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45f811f595 | ||
|
|
e11f048a91 | ||
|
|
d8c0240437 | ||
|
|
6e6ae23d88 |
45
CHANGELOG.md
45
CHANGELOG.md
@@ -1,46 +1,31 @@
|
||||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## 1.1.0 - 2020-10-03
|
||||
## 1.1.0 - unreleased
|
||||
|
||||
### Features
|
||||
### Merged PRs
|
||||
|
||||
* [#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
|
||||
* [#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
|
||||
|
||||
### Bugfixes
|
||||
|
||||
* [#1934](https://github.com/nextcloud/deck/pull/1934) Card dashboard @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
|
||||
* [#2144](https://github.com/nextcloud/deck/pull/2144) Fix nextcloud if install with dev dependencies @matchish
|
||||
* [#2158](https://github.com/nextcloud/deck/pull/2158) Fix description in dark mode
|
||||
* [#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 @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
|
||||
* [#2206](https://github.com/nextcloud/deck/pull/2206) Fix read-only sidebar (fixes #2033)
|
||||
* [#2208](https://github.com/nextcloud/deck/pull/2208) Fix design, dark mode and keyboard navigation of the board list
|
||||
* [#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) @juliushaertl
|
||||
* [#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
|
||||
* [#2243](https://github.com/nextcloud/deck/pull/2243) Various smaller styling fixes
|
||||
* [#2244](https://github.com/nextcloud/deck/pull/2244) Toggle filter on clicking card labels
|
||||
* [#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
|
||||
|
||||
* [#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 @juliushaertl
|
||||
* [#2244](https://github.com/nextcloud/deck/pull/2244) Toggle filter on clicking card labels @juliushaertl
|
||||
|
||||
|
||||
## 1.0.5 - 2020-07-15
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
- 🚀 Get your project organized
|
||||
|
||||
</description>
|
||||
<version>1.1.0</version>
|
||||
<version>1.1.0-beta2</version>
|
||||
<licence>agpl</licence>
|
||||
<author>Julius Härtl</author>
|
||||
<namespace>Deck</namespace>
|
||||
@@ -36,7 +36,7 @@
|
||||
<database min-version="9.4">pgsql</database>
|
||||
<database>sqlite</database>
|
||||
<database min-version="5.5">mysql</database>
|
||||
<nextcloud min-version="18" max-version="20" />
|
||||
<nextcloud min-version="18" max-version="21" />
|
||||
</dependencies>
|
||||
<background-jobs>
|
||||
<job>OCA\Deck\Cron\DeleteCron</job>
|
||||
|
||||
@@ -191,7 +191,6 @@ OC.L10N.register(
|
||||
"Select Date" : "Seleccione la fecha",
|
||||
"Modified" : "Modificado",
|
||||
"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!",
|
||||
"Save" : "Guardar",
|
||||
"The comment cannot be empty." : "El comentario no puede estar vacío.",
|
||||
@@ -217,7 +216,6 @@ OC.L10N.register(
|
||||
"Show boards in calendar/tasks" : "Mostrar tableros en calendario/tareas",
|
||||
"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.",
|
||||
"Board name" : "Nombre del tablero",
|
||||
"Edit board" : "Editar tablero",
|
||||
"Clone board " : "Clonar tablero",
|
||||
"Unarchive board " : "Desarchivar tablero",
|
||||
|
||||
@@ -189,7 +189,6 @@
|
||||
"Select Date" : "Seleccione la fecha",
|
||||
"Modified" : "Modificado",
|
||||
"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!",
|
||||
"Save" : "Guardar",
|
||||
"The comment cannot be empty." : "El comentario no puede estar vacío.",
|
||||
@@ -215,7 +214,6 @@
|
||||
"Show boards in calendar/tasks" : "Mostrar tableros en calendario/tareas",
|
||||
"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.",
|
||||
"Board name" : "Nombre del tablero",
|
||||
"Edit board" : "Editar tablero",
|
||||
"Clone board " : "Clonar tablero",
|
||||
"Unarchive board " : "Desarchivar tablero",
|
||||
|
||||
@@ -240,25 +240,9 @@ class ActivityManager {
|
||||
}
|
||||
|
||||
public function triggerEvent($objectType, $entity, $subject, $additionalParams = [], $author = null) {
|
||||
if ($author === null) {
|
||||
$author = $this->userId;
|
||||
}
|
||||
try {
|
||||
$event = $this->createEvent($objectType, $entity, $subject, $additionalParams, $author);
|
||||
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);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
|
||||
@@ -96,7 +96,6 @@ class DeckProvider implements IProvider {
|
||||
unset($subjectParams['author']);
|
||||
}
|
||||
$user = $this->userManager->get($author);
|
||||
$params = [];
|
||||
if ($user !== null) {
|
||||
$params = [
|
||||
'user' => [
|
||||
@@ -329,8 +328,8 @@ class DeckProvider implements IProvider {
|
||||
if (array_key_exists('diff', $subjectParams) && $subjectParams['diff']) {
|
||||
$diff = new Diff();
|
||||
// Don't add diff as message since we are limited to 255 chars here
|
||||
$event->setParsedMessage($subjectParams['after']);
|
||||
//$event->setParsedMessage('<pre class="visualdiff">' . $diff->render($subjectParams['before'], $subjectParams['after']) . '</pre>');
|
||||
//$event->setMessage($subjectParams['after']);
|
||||
$event->setParsedMessage('<pre class="visualdiff">' . $diff->render($subjectParams['before'], $subjectParams['after']) . '</pre>');
|
||||
return $params;
|
||||
}
|
||||
if (array_key_exists('before', $subjectParams)) {
|
||||
|
||||
@@ -78,8 +78,8 @@ class CardController extends Controller {
|
||||
* @param int $order
|
||||
* @return \OCP\AppFramework\Db\Entity
|
||||
*/
|
||||
public function create($title, $stackId, $type = 'plain', $order = 999) {
|
||||
return $this->cardService->create($title, $stackId, $type, $order, $this->userId);
|
||||
public function create($title, $stackId, $type = 'plain', $order = 999, $description = '', $duedate = null) {
|
||||
return $this->cardService->create($title, $stackId, $type, $order, $this->userId, $description, $duedate);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -59,7 +59,7 @@ class DeckCalendarBackend {
|
||||
}
|
||||
|
||||
public function getBoards(): array {
|
||||
return $this->boardService->findAll(-1, null, false);
|
||||
return $this->boardService->findAll();
|
||||
}
|
||||
|
||||
public function getBoard(int $id): Board {
|
||||
|
||||
@@ -93,18 +93,10 @@ class BoardMapper extends DeckMapper implements IPermissionMapper {
|
||||
* @param null $offset
|
||||
* @return array
|
||||
*/
|
||||
public function findAllByUser($userId, $limit = null, $offset = null, $since = -1, $includeArchived = true) {
|
||||
// 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 ' .
|
||||
public function findAllByUser($userId, $limit = null, $offset = null, $since = -1) {
|
||||
$sql = 'SELECT id, title, owner, color, archived, deleted_at, 0 as shared, last_modified FROM `*PREFIX*deck_boards` WHERE owner = ? AND last_modified > ? UNION ' .
|
||||
'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 > ?';
|
||||
if (!$includeArchived) {
|
||||
$sql .= ' AND NOT archived';
|
||||
}
|
||||
$entries = $this->findEntities($sql, [$userId, $since, $userId, Acl::PERMISSION_TYPE_USER, $userId, $since], $limit, $offset);
|
||||
/* @var Board $entry */
|
||||
foreach ($entries as $entry) {
|
||||
@@ -128,7 +120,7 @@ class BoardMapper extends DeckMapper implements IPermissionMapper {
|
||||
* @param null $offset
|
||||
* @return array
|
||||
*/
|
||||
public function findAllByGroups($userId, $groups, $limit = null, $offset = null, $since = -1,$includeArchived = true) {
|
||||
public function findAllByGroups($userId, $groups, $limit = null, $offset = null) {
|
||||
if (count($groups) <= 0) {
|
||||
return [];
|
||||
}
|
||||
@@ -140,10 +132,7 @@ class BoardMapper extends DeckMapper implements IPermissionMapper {
|
||||
$sql .= ' OR ';
|
||||
}
|
||||
}
|
||||
$sql .= ')';
|
||||
if (!$includeArchived) {
|
||||
$sql .= ' AND NOT archived';
|
||||
}
|
||||
$sql .= ');';
|
||||
$entries = $this->findEntities($sql, array_merge([$userId, Acl::PERMISSION_TYPE_GROUP], $groups), $limit, $offset);
|
||||
/* @var Board $entry */
|
||||
foreach ($entries as $entry) {
|
||||
@@ -153,7 +142,7 @@ class BoardMapper extends DeckMapper implements IPermissionMapper {
|
||||
return $entries;
|
||||
}
|
||||
|
||||
public function findAllByCircles($userId, $limit = null, $offset = null, $since = -1,$includeArchived = true) {
|
||||
public function findAllByCircles($userId, $limit = null, $offset = null) {
|
||||
if (!$this->circlesEnabled) {
|
||||
return [];
|
||||
}
|
||||
@@ -172,10 +161,7 @@ class BoardMapper extends DeckMapper implements IPermissionMapper {
|
||||
$sql .= ' OR ';
|
||||
}
|
||||
}
|
||||
$sql .= ')';
|
||||
if (!$includeArchived) {
|
||||
$sql .= ' AND NOT archived';
|
||||
}
|
||||
$sql .= ');';
|
||||
$entries = $this->findEntities($sql, array_merge([$userId, Acl::PERMISSION_TYPE_CIRCLE], $circles), $limit, $offset);
|
||||
/* @var Board $entry */
|
||||
foreach ($entries as $entry) {
|
||||
|
||||
@@ -107,11 +107,11 @@ class BoardService {
|
||||
$this->userId = $userId;
|
||||
}
|
||||
|
||||
public function getUserBoards(int $since = -1, $includeArchived = true): array {
|
||||
public function getUserBoards(int $since = -1): array {
|
||||
$userInfo = $this->getBoardPrerequisites();
|
||||
$userBoards = $this->boardMapper->findAllByUser($userInfo['user'], null, null, $since, $includeArchived);
|
||||
$groupBoards = $this->boardMapper->findAllByGroups($userInfo['user'], $userInfo['groups'],null, null, $since, $includeArchived);
|
||||
$circleBoards = $this->boardMapper->findAllByCircles($userInfo['user'], null, null, $since, $includeArchived);
|
||||
$userBoards = $this->boardMapper->findAllByUser($userInfo['user'], null, null, $since);
|
||||
$groupBoards = $this->boardMapper->findAllByGroups($userInfo['user'], $userInfo['groups'],null, null, $since);
|
||||
$circleBoards = $this->boardMapper->findAllByCircles($userInfo['user'], null, null, $since);
|
||||
$mergedBoards = array_merge($userBoards, $groupBoards, $circleBoards);
|
||||
$result = [];
|
||||
/** @var Board $item */
|
||||
@@ -125,11 +125,11 @@ class BoardService {
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function findAll($since = -1, $details = null, $includeArchived = true) {
|
||||
public function findAll($since = -1, $details = null) {
|
||||
if ($this->boardsCache) {
|
||||
return $this->boardsCache;
|
||||
}
|
||||
$complete = $this->getUserBoards($since, $includeArchived);
|
||||
$complete = $this->getUserBoards($since);
|
||||
$result = [];
|
||||
/** @var Board $item */
|
||||
foreach ($complete as &$item) {
|
||||
|
||||
@@ -415,11 +415,8 @@ class CardService {
|
||||
if ($card->getArchived()) {
|
||||
throw new StatusException('Operation not allowed. This card is archived.');
|
||||
}
|
||||
$changes = new ChangeSet($card);
|
||||
$card->setStackId($stackId);
|
||||
$this->cardMapper->update($card);
|
||||
$changes->setAfter($card);
|
||||
$this->activityManager->triggerUpdateEvents(ActivityManager::DECK_OBJECT_CARD, $changes, ActivityManager::SUBJECT_CARD_UPDATE);
|
||||
|
||||
$cards = $this->cardMapper->findAll($stackId);
|
||||
$result = [];
|
||||
|
||||
38
package-lock.json
generated
38
package-lock.json
generated
@@ -3479,24 +3479,29 @@
|
||||
}
|
||||
},
|
||||
"@nextcloud/event-bus": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@nextcloud/event-bus/-/event-bus-1.2.0.tgz",
|
||||
"integrity": "sha512-pNS0R6Mvgj4WnbJQ8LYjxRjCbRndpwjHNyZYm0zl8U71gbHsUvQIIzTdW7WYg6Nz/FjAlrdmDXJDFLh1DDcIFA==",
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@nextcloud/event-bus/-/event-bus-1.1.4.tgz",
|
||||
"integrity": "sha512-It27KzmUaSQ7w22nHFwOn8XgeVG0HYYOSNG9gs4UkP5VqcZ16m4ydt3GkMpWcyFec4OUjJc+yf7omRc3pNxsSw==",
|
||||
"requires": {
|
||||
"@types/semver": "^7.1.0",
|
||||
"@types/semver": "^6.2.1",
|
||||
"core-js": "^3.6.2",
|
||||
"semver": "^7.3.2"
|
||||
"semver": "^6.3.0"
|
||||
},
|
||||
"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": {
|
||||
"version": "3.6.5",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz",
|
||||
"integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA=="
|
||||
},
|
||||
"semver": {
|
||||
"version": "7.3.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
|
||||
"integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ=="
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
||||
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -3631,9 +3636,9 @@
|
||||
}
|
||||
},
|
||||
"@nextcloud/vue": {
|
||||
"version": "2.6.8",
|
||||
"resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-2.6.8.tgz",
|
||||
"integrity": "sha512-9yi9V4gX4Y1uxh2hNxCAlTHaS9zolzAy7x1sowII/WZfxMysF/yIGmEsnYGyz6CZ5eYCzxNUgrU5p/HQ21/09Q==",
|
||||
"version": "2.6.5",
|
||||
"resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-2.6.5.tgz",
|
||||
"integrity": "sha512-ZeY4n/TJ0cRu/iDgLGCwFSksvStMO+fAeJfANwjp52LjrpFXuJjxqG8ZKBdr7zJewj/yTOq6k0wMDnyBFTgnXA==",
|
||||
"requires": {
|
||||
"@nextcloud/auth": "^1.2.3",
|
||||
"@nextcloud/axios": "^1.3.2",
|
||||
@@ -3892,11 +3897,6 @@
|
||||
"integrity": "sha512-IkVfat549ggtkZUthUzEX49562eGikhSYeVGX97SkMFn+sTZrgRewXjQ4tPKFPCykZHkX1Zfd9OoELGqKU2jJA==",
|
||||
"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": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz",
|
||||
@@ -7434,9 +7434,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"emoji-mart-vue-fast": {
|
||||
"version": "7.0.5",
|
||||
"resolved": "https://registry.npmjs.org/emoji-mart-vue-fast/-/emoji-mart-vue-fast-7.0.5.tgz",
|
||||
"integrity": "sha512-+ayg30hhxqqM9oMtN9uUG470hT9gtOdFenByJJBm3XTfzI2QMVJ69euwk+xF55OphLfKZxQG7mnVz13lDOjb3g==",
|
||||
"version": "7.0.4",
|
||||
"resolved": "https://registry.npmjs.org/emoji-mart-vue-fast/-/emoji-mart-vue-fast-7.0.4.tgz",
|
||||
"integrity": "sha512-VZuyclCe7ZNPhSvt7WT258MscqRBZTB2Is/7vBilCXgpiZqByaA4AhM1xdIIZZik/aA+5BQiZVmbsDK0jk78Eg==",
|
||||
"requires": {
|
||||
"@babel/polyfill": "7.2.5",
|
||||
"@babel/runtime": "7.3.4",
|
||||
|
||||
@@ -34,13 +34,12 @@
|
||||
"@nextcloud/auth": "^1.3.0",
|
||||
"@nextcloud/axios": "^1.4.0",
|
||||
"@nextcloud/dialogs": "^2.0.1",
|
||||
"@nextcloud/event-bus": "^1.2.0",
|
||||
"@nextcloud/files": "^1.1.0",
|
||||
"@nextcloud/initial-state": "^1.1.2",
|
||||
"@nextcloud/l10n": "^1.4.1",
|
||||
"@nextcloud/moment": "^1.1.1",
|
||||
"@nextcloud/router": "^1.2.0",
|
||||
"@nextcloud/vue": "^2.6.8",
|
||||
"@nextcloud/vue": "^2.6.5",
|
||||
"@nextcloud/vue-dashboard": "^1.0.1",
|
||||
"blueimp-md5": "^2.18.0",
|
||||
"dompurify": "^2.1.1",
|
||||
|
||||
@@ -32,6 +32,11 @@
|
||||
</div>
|
||||
<div v-if="overviewName" class="board-title">
|
||||
<h2><a href="#">{{ overviewName }}</a></h2>
|
||||
<Actions>
|
||||
<ActionButton icon="icon-add" @click.stop="modalShow=true">
|
||||
{{ t('deck', 'Add card on today') }}
|
||||
</ActionButton>
|
||||
</Actions>
|
||||
</div>
|
||||
<div v-if="board" class="board-actions">
|
||||
<div v-if="canManage && !showArchived && !board.archived"
|
||||
@@ -193,6 +198,8 @@
|
||||
</Actions>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ControlsModal :modal-show="modalShow" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -200,11 +207,12 @@
|
||||
import { mapState, mapGetters } from 'vuex'
|
||||
import { Actions, ActionButton, Popover, Avatar } from '@nextcloud/vue'
|
||||
import labelStyle from '../mixins/labelStyle'
|
||||
import ControlsModal from './ControlsModal'
|
||||
|
||||
export default {
|
||||
name: 'Controls',
|
||||
components: {
|
||||
Actions, ActionButton, Popover, Avatar,
|
||||
Actions, ActionButton, Popover, Avatar, ControlsModal,
|
||||
},
|
||||
mixins: [ labelStyle ],
|
||||
props: {
|
||||
@@ -226,6 +234,12 @@ export default {
|
||||
showArchived: false,
|
||||
isAddStackVisible: false,
|
||||
filter: { tags: [], users: [], due: '', unassigned: false },
|
||||
|
||||
modalShow: false,
|
||||
selectedBoard: '',
|
||||
selectedStack: '',
|
||||
stacksFromBoard: [],
|
||||
newCardTitle: '',
|
||||
}
|
||||
},
|
||||
|
||||
@@ -233,6 +247,8 @@ export default {
|
||||
...mapGetters([
|
||||
'canEdit',
|
||||
'canManage',
|
||||
'lastBoardId',
|
||||
'lastListId',
|
||||
]),
|
||||
...mapState({
|
||||
compactMode: state => state.compactMode,
|
||||
@@ -257,6 +273,15 @@ export default {
|
||||
labelsSorted() {
|
||||
return [...this.board.labels].sort((a, b) => (a.title < b.title) ? -1 : 1)
|
||||
},
|
||||
boards() {
|
||||
return this.$store.getters.boards
|
||||
},
|
||||
addCardSetRequiredFields() {
|
||||
if (this.selectedBoard === '' || this.selectedStack === '' || this.newCardTitle.trim() === '') {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
board() {
|
||||
@@ -319,6 +344,10 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
#new-stack-input-main {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.controls {
|
||||
display: flex;
|
||||
|
||||
|
||||
168
src/components/ControlsModal.vue
Normal file
168
src/components/ControlsModal.vue
Normal file
@@ -0,0 +1,168 @@
|
||||
<!--
|
||||
* @copyright Copyright (c) 2020 Jakob Röhrl <jakob.roehrl@web.de>
|
||||
*
|
||||
* @author Jakob Röhrl <jakob.roehrl@web.de>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
-->
|
||||
|
||||
<template>
|
||||
<Modal v-if="modalShow" :title="t('deck', 'Add card on Today')" @close="modalShow=false">
|
||||
<div class="modal__content">
|
||||
{{ lastBoardId - selectedBoard }}
|
||||
{{ lastListId }}
|
||||
<h3>{{ t('deck', 'Add card on Today') }}</h3>
|
||||
<Multiselect v-model="selectedBoard"
|
||||
:placeholder="t('deck', 'Select a board')"
|
||||
:options="boards"
|
||||
:max-height="100"
|
||||
label="title"
|
||||
@select="loadStacksFromBoard" />
|
||||
<Multiselect v-model="selectedStack"
|
||||
:placeholder="t('deck', 'Select a list')"
|
||||
:options="stacksFromBoard"
|
||||
:max-height="100"
|
||||
label="title" />
|
||||
|
||||
<label for="new-stack-input-main" class="hidden-visually">{{ t('deck', 'Add card on Today') }}</label>
|
||||
<input id="new-stack-input-main"
|
||||
ref="newCardInput"
|
||||
v-model="newCardTitle"
|
||||
v-focus
|
||||
type="text"
|
||||
class="no-close"
|
||||
:placeholder="t('deck', 'Card name')">
|
||||
|
||||
<button :disabled="!addCardSetRequiredFields" class="primary" @click="addCard">
|
||||
{{ t('deck', 'Add card') }}
|
||||
</button>
|
||||
<button @click="modalShow=false">
|
||||
{{ t('deck', 'Cancel') }}
|
||||
</button>
|
||||
</div>
|
||||
</Modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Modal, Multiselect } from '@nextcloud/vue'
|
||||
import labelStyle from '../mixins/labelStyle'
|
||||
import axios from '@nextcloud/axios'
|
||||
import { generateUrl } from '@nextcloud/router'
|
||||
import { showError } from '@nextcloud/dialogs'
|
||||
|
||||
export default {
|
||||
name: 'ControlsModal',
|
||||
components: {
|
||||
Modal, Multiselect,
|
||||
},
|
||||
mixins: [ labelStyle ],
|
||||
props: {
|
||||
modalShow: {
|
||||
default: false,
|
||||
type: Boolean,
|
||||
},
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selectedBoard: '',
|
||||
selectedStack: '',
|
||||
stacksFromBoard: [],
|
||||
newCardTitle: '',
|
||||
lastBoardId: localStorage.getItem('deck.lastBoardId'),
|
||||
lastListId: localStorage.getItem('deck.lastListId'),
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
boards() {
|
||||
return this.$store.getters.boards
|
||||
},
|
||||
addCardSetRequiredFields() {
|
||||
if (this.selectedBoard === '' || this.selectedStack === '' || this.newCardTitle.trim() === '') {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.setLastBoardId()
|
||||
},
|
||||
|
||||
methods: {
|
||||
setLastBoardId() {
|
||||
if (this.lastBoardId === null || this.lastBoardId === 0) {
|
||||
this.selectedBoard = ''
|
||||
return
|
||||
}
|
||||
this.selectedBoard = this.selectedBoard = this.boards.filter(board => {
|
||||
return board.id === this.lastBoardId
|
||||
})
|
||||
},
|
||||
async loadStacksFromBoard(selectedBoard) {
|
||||
try {
|
||||
const url = generateUrl('/apps/deck/stacks/' + selectedBoard.id)
|
||||
const response = await axios.get(url)
|
||||
this.stacksFromBoard = response.data
|
||||
} catch (err) {
|
||||
return err
|
||||
}
|
||||
},
|
||||
async addCard() {
|
||||
try {
|
||||
const today = new Date()
|
||||
today.setHours(23, 59, 59, 999)
|
||||
await this.$store.dispatch('addCard', {
|
||||
title: this.newCardTitle,
|
||||
stackId: this.selectedStack.id,
|
||||
boardId: this.selectedBoard.id,
|
||||
duedate: today.toISOString(),
|
||||
})
|
||||
this.newCardTitle = ''
|
||||
localStorage.setItem('deck.lastBoardId', this.selectedBoard.id)
|
||||
localStorage.setItem('deck.lastListId', this.selectedStack.id)
|
||||
|
||||
} catch (e) {
|
||||
showError('Could not create card: ' + e.response.data.message)
|
||||
}
|
||||
// this.modalShow = false
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
#new-stack-input-main {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.modal__content {
|
||||
width: 25vw;
|
||||
min-width: 250px;
|
||||
min-height: 120px;
|
||||
text-align: center;
|
||||
margin: 20px 20px 100px 20px;
|
||||
|
||||
.multiselect {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.modal__content button {
|
||||
float: right;
|
||||
margin-top: 50px;
|
||||
}
|
||||
</style>
|
||||
@@ -119,7 +119,7 @@ export default {
|
||||
|
||||
sharee.value = item.value
|
||||
return sharee
|
||||
}).slice(0, 10)
|
||||
})
|
||||
},
|
||||
unallocatedSharees() {
|
||||
return this.sharees.filter((sharee) => {
|
||||
|
||||
@@ -118,7 +118,7 @@ export default {
|
||||
return this.$store.getters.canEdit
|
||||
}
|
||||
const board = this.$store.getters.boards.find((item) => item.id === this.card.boardId)
|
||||
return board ? board.permissions.PERMISSION_EDIT : false
|
||||
return board.permissions.PERMISSION_EDIT
|
||||
},
|
||||
card() {
|
||||
return this.item ? this.item : this.$store.getters.cardById(this.id)
|
||||
|
||||
10
src/main.js
10
src/main.js
@@ -27,7 +27,6 @@ import { sync } from 'vuex-router-sync'
|
||||
import { translate, translatePlural } from '@nextcloud/l10n'
|
||||
import { generateFilePath } from '@nextcloud/router'
|
||||
import { showError } from '@nextcloud/dialogs'
|
||||
import { subscribe } from '@nextcloud/event-bus'
|
||||
import { Tooltip } from '@nextcloud/vue'
|
||||
import ClickOutside from 'vue-click-outside'
|
||||
import './models'
|
||||
@@ -75,17 +74,8 @@ new Vue({
|
||||
}
|
||||
},
|
||||
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
|
||||
new OCA.Search(this.filter, this.cleanSearch)
|
||||
|
||||
this.interval = setInterval(() => {
|
||||
this.time = Date.now()
|
||||
}, 1000)
|
||||
|
||||
@@ -287,7 +287,7 @@ class DeckProviderTest extends TestCase {
|
||||
$this->assertEquals('test string Card', $event->getParsedSubject());
|
||||
$this->assertEquals('test string {card}', $event->getRichSubject());
|
||||
$this->assertEquals('BCD', $event->getMessage());
|
||||
$this->assertEquals('BCD', $event->getParsedMessage());
|
||||
$this->assertEquals('<pre class="visualdiff"><del>A</del>BC<ins>D</ins></pre>', $event->getParsedMessage());
|
||||
}
|
||||
|
||||
public function testParseParamForBoard() {
|
||||
|
||||
Reference in New Issue
Block a user