Compare commits
1 Commits
dependabot
...
feature/ad
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bbe72b93d9 |
2
.github/workflows/appbuild.yml
vendored
2
.github/workflows/appbuild.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
- name: Set up npm7
|
||||
run: npm i -g npm@7
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@2.35.5
|
||||
uses: shivammathur/setup-php@2.34.1
|
||||
with:
|
||||
php-version: '7.4'
|
||||
tools: composer
|
||||
|
||||
2
.github/workflows/appstore-build-publish.yml
vendored
2
.github/workflows/appstore-build-publish.yml
vendored
@@ -87,7 +87,7 @@ jobs:
|
||||
filename: ${{ env.APP_NAME }}/appinfo/info.xml
|
||||
|
||||
- name: Set up php ${{ steps.php-versions.outputs.php-min }}
|
||||
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
|
||||
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
|
||||
with:
|
||||
php-version: ${{ steps.php-versions.outputs.php-min }}
|
||||
coverage: none
|
||||
|
||||
2
.github/workflows/cypress-e2e.yml
vendored
2
.github/workflows/cypress-e2e.yml
vendored
@@ -91,7 +91,7 @@ jobs:
|
||||
restore-keys: ${{ steps.extcache.outputs.key }}
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2.35.5
|
||||
uses: shivammathur/setup-php@2.34.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
extensions: ${{ env.extensions }}
|
||||
|
||||
2
.github/workflows/integration.yml
vendored
2
.github/workflows/integration.yml
vendored
@@ -78,7 +78,7 @@ jobs:
|
||||
path: apps/activity
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2.35.5
|
||||
uses: shivammathur/setup-php@2.34.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, mysql, pdo_mysql, pgsql, pdo_pgsql, apcu, gd
|
||||
|
||||
2
.github/workflows/lint-php-cs.yml
vendored
2
.github/workflows/lint-php-cs.yml
vendored
@@ -34,7 +34,7 @@ jobs:
|
||||
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
|
||||
|
||||
- name: Set up php${{ steps.versions.outputs.php-min }}
|
||||
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
|
||||
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
|
||||
with:
|
||||
php-version: ${{ steps.versions.outputs.php-min }}
|
||||
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
|
||||
|
||||
2
.github/workflows/lint-php.yml
vendored
2
.github/workflows/lint-php.yml
vendored
@@ -48,7 +48,7 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
|
||||
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
|
||||
|
||||
2
.github/workflows/phpunit-mysql.yml
vendored
2
.github/workflows/phpunit-mysql.yml
vendored
@@ -103,7 +103,7 @@ jobs:
|
||||
path: apps/${{ env.APP_NAME }}
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
|
||||
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||
|
||||
2
.github/workflows/phpunit-pgsql.yml
vendored
2
.github/workflows/phpunit-pgsql.yml
vendored
@@ -106,7 +106,7 @@ jobs:
|
||||
path: apps/${{ env.APP_NAME }}
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
|
||||
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||
|
||||
2
.github/workflows/phpunit-sqlite.yml
vendored
2
.github/workflows/phpunit-sqlite.yml
vendored
@@ -95,7 +95,7 @@ jobs:
|
||||
path: apps/${{ env.APP_NAME }}
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
|
||||
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||
|
||||
2
.github/workflows/psalm.yml
vendored
2
.github/workflows/psalm.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
||||
run: grep 'phpVersion="${{ steps.versions.outputs.php-min }}' psalm.xml
|
||||
|
||||
- name: Set up php${{ steps.versions.outputs.php-min }}
|
||||
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
|
||||
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
|
||||
with:
|
||||
php-version: ${{ steps.versions.outputs.php-min }}
|
||||
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
|
||||
|
||||
2
.github/workflows/update-nextcloud-ocp.yml
vendored
2
.github/workflows/update-nextcloud-ocp.yml
vendored
@@ -38,7 +38,7 @@ jobs:
|
||||
|
||||
- name: Set up php8.2
|
||||
if: steps.checkout.outcome == 'success'
|
||||
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
|
||||
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
|
||||
with:
|
||||
php-version: 8.2
|
||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
- Adrian Missy <adrian.missy@onewavestudios.com>
|
||||
- Alexandru Puiu <alexpuiu20@yahoo.com>
|
||||
- Arne Bartelt <arne.bartelt@gmail.com>
|
||||
- Chandi Langecker <git@chandi.it>
|
||||
- Christoph Wurst <christoph@winzerhof-wurst.at>
|
||||
- Gary Kim <gary@garykim.dev>
|
||||
|
||||
8
composer.lock
generated
8
composer.lock
generated
@@ -380,12 +380,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nextcloud-deps/ocp.git",
|
||||
"reference": "f087138947c284c5db161308255b80696ff6b5c8"
|
||||
"reference": "6a5219dda0583a45fb5541719de83c9b673b3efa"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/f087138947c284c5db161308255b80696ff6b5c8",
|
||||
"reference": "f087138947c284c5db161308255b80696ff6b5c8",
|
||||
"url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/6a5219dda0583a45fb5541719de83c9b673b3efa",
|
||||
"reference": "6a5219dda0583a45fb5541719de83c9b673b3efa",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -421,7 +421,7 @@
|
||||
"issues": "https://github.com/nextcloud-deps/ocp/issues",
|
||||
"source": "https://github.com/nextcloud-deps/ocp/tree/master"
|
||||
},
|
||||
"time": "2025-09-10T00:46:52+00:00"
|
||||
"time": "2025-09-06T00:45:32+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
|
||||
73
docs/API.md
73
docs/API.md
@@ -6,7 +6,7 @@ The REST API provides access for authenticated users to their data inside the De
|
||||
|
||||
# Prerequisites
|
||||
|
||||
- All requests require a `OCS-APIRequest` HTTP header to be set to `true` and a `Content-Type` of `application/json`. This does not apply to the endpoint for uploading attachments, which consumes `multipart/form-data`.
|
||||
- All requests require a `OCS-APIRequest` HTTP header to be set to `true` and a `Content-Type` of `application/json`.
|
||||
- The API is located at https://nextcloud.local/index.php/apps/deck/api/v1.0
|
||||
- All request parameters are required, unless otherwise specified
|
||||
|
||||
@@ -212,28 +212,32 @@ Returns an array of board items
|
||||
"color": "31CC7C",
|
||||
"boardId": 10,
|
||||
"cardId": null,
|
||||
"id": 37
|
||||
"id": 37,
|
||||
"customSettings": {}
|
||||
},
|
||||
{
|
||||
"title": "To review",
|
||||
"color": "317CCC",
|
||||
"boardId": 10,
|
||||
"cardId": null,
|
||||
"id": 38
|
||||
"id": 38,
|
||||
"customSettings": {}
|
||||
},
|
||||
{
|
||||
"title": "Action needed",
|
||||
"color": "FF7A66",
|
||||
"boardId": 10,
|
||||
"cardId": null,
|
||||
"id": 39
|
||||
"id": 39,
|
||||
"customSettings": { "isImportant": true }
|
||||
},
|
||||
{
|
||||
"title": "Later",
|
||||
"color": "F1DB50",
|
||||
"boardId": 10,
|
||||
"cardId": null,
|
||||
"id": 40
|
||||
"id": 40,
|
||||
"customSettings": {}
|
||||
}
|
||||
],
|
||||
"acl": [],
|
||||
@@ -282,28 +286,32 @@ A 403 response might be returned if the users ability to create new boards has b
|
||||
"color": "31CC7C",
|
||||
"boardId": "10",
|
||||
"cardId": null,
|
||||
"id": 37
|
||||
"id": 37,
|
||||
"customSettings": {}
|
||||
},
|
||||
{
|
||||
"title": "To review",
|
||||
"color": "317CCC",
|
||||
"boardId": "10",
|
||||
"cardId": null,
|
||||
"id": 38
|
||||
"id": 38,
|
||||
"customSettings": {}
|
||||
},
|
||||
{
|
||||
"title": "Action needed",
|
||||
"color": "FF7A66",
|
||||
"boardId": "10",
|
||||
"cardId": null,
|
||||
"id": 39
|
||||
"id": 39,
|
||||
"customSettings": {}
|
||||
},
|
||||
{
|
||||
"title": "Later",
|
||||
"color": "F1DB50",
|
||||
"boardId": "10",
|
||||
"cardId": null,
|
||||
"id": 40
|
||||
"id": 40,
|
||||
"customSettings": {}
|
||||
}
|
||||
],
|
||||
"acl": [],
|
||||
@@ -733,7 +741,6 @@ The board list endpoint supports setting an `If-Modified-Since` header to limit
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | --------------------------------------- |
|
||||
| labelId | Integer | The label id to assign to the card |
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200 Success
|
||||
@@ -868,7 +875,8 @@ The request can fail with a bad request response for the following reasons:
|
||||
"color": "31CC7C",
|
||||
"boardId": "2",
|
||||
"cardId": null,
|
||||
"id": 5
|
||||
"id": 5,
|
||||
"customSettings": { "isImportant": false }
|
||||
}
|
||||
```
|
||||
|
||||
@@ -876,16 +884,18 @@ The request can fail with a bad request response for the following reasons:
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | ---------------------------------------- |
|
||||
| boardId | Integer | The id of the board the label belongs to |
|
||||
| Parameter | Type | Description |
|
||||
|----------------|---------|------------------------------------------------------------------------------|
|
||||
| boardId | Integer | The id of the board the label belongs to |
|
||||
| customSettings | Object | An key-value structure, currently supported only bool property `isImportant` |
|
||||
|
||||
#### Request data
|
||||
|
||||
```json
|
||||
{
|
||||
"title": "Finished",
|
||||
"color": "31CC7C"
|
||||
"color": "31CC7C",
|
||||
"customSettings": { "isImportant": false }
|
||||
}
|
||||
```
|
||||
|
||||
@@ -897,10 +907,11 @@ The request can fail with a bad request response for the following reasons:
|
||||
|
||||
#### Request parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | ---------------------------------------- |
|
||||
| boardId | Integer | The id of the board the label belongs to |
|
||||
| labelId | Integer | The id of the label |
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- |-----------------------------------------------------------------------------------|
|
||||
| boardId | Integer | The id of the board the label belongs to |
|
||||
| labelId | Integer | The id of the label |
|
||||
| customSettings | Object | An key-value structure, currently supported only bool property `isImportant` |
|
||||
|
||||
|
||||
#### Request data
|
||||
@@ -908,7 +919,8 @@ The request can fail with a bad request response for the following reasons:
|
||||
```json
|
||||
{
|
||||
"title": "Finished",
|
||||
"color": "31CC7C"
|
||||
"color": "31CC7C",
|
||||
"customSettings": { }
|
||||
}
|
||||
```
|
||||
|
||||
@@ -998,12 +1010,10 @@ The request can fail with a bad request response for the following reasons:
|
||||
|
||||
#### Request data
|
||||
|
||||
The request is performed as `multipart/form-data`.
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | ----------------------------------------------------------------------------------------------- |
|
||||
| type | String | The type of the attachement. Use `file` or `deck_file`. |
|
||||
| file | Binary | File data to add as an attachment together with the `filename` parameter according to RFC 7578. |
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | --------------------------------------------- |
|
||||
| type | String | The type of the attachement |
|
||||
| file | Binary | File data to add as an attachment |
|
||||
|
||||
- Prior to Deck version v1.3.0 (API v1.0), attachments were stored within deck. For this type of attachments `deck_file` was used as the default type of attachments
|
||||
- Starting with Deck version 1.3.0 (API v1.1) files are stored within the users regular Nextcloud files and the type `file` has been introduced for that
|
||||
@@ -1025,13 +1035,12 @@ The request is performed as `multipart/form-data`.
|
||||
|
||||
#### Request data
|
||||
|
||||
The request is performed as `multipart/form-data`.
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | ----------------------------------------------------------------------------------------------- |
|
||||
| type | String | The type of the attachement. For now only `deck_file` is supported as an attachment type. |
|
||||
| file | Binary | File data to add as an attachment together with the `filename` parameter according to RFC 7578. |
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------- | --------------------------------------------- |
|
||||
| type | String | The type of the attachement |
|
||||
| file | Binary | File data to add as an attachment |
|
||||
|
||||
For now only `deck_file` is supported as an attachment type.
|
||||
|
||||
#### Response
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ OC.L10N.register(
|
||||
"Done" : "Гатова",
|
||||
"File" : "Файл",
|
||||
"Cancel" : "Скасаваць",
|
||||
"Drop your files to upload" : "Перацягніце файлы для запампоўвання",
|
||||
"File already exists" : "Файл ужо існуе",
|
||||
"A file with the name {filename} already exists." : "Файл з назвай {filename} ужо існуе.",
|
||||
"Do you want to overwrite it?" : "Хочаце перазапісаць яго?",
|
||||
@@ -57,18 +56,13 @@ OC.L10N.register(
|
||||
"Keyboard shortcuts" : "Спалучэнні клавіш",
|
||||
"Keyboard shortcut" : "Спалучэнне клавіш",
|
||||
"Action" : "Дзеянне",
|
||||
"Shift" : "Shift",
|
||||
"Search" : "Пошук",
|
||||
"Enter" : "Enter",
|
||||
"Shared with you" : "Абагулена з вамі",
|
||||
"Cancel edit" : "Скасаваць рэдагаванне",
|
||||
"An error occurred" : "Узнікла памылка",
|
||||
"No notifications" : "Няма апавяшчэнняў",
|
||||
"Export" : "Экспарт",
|
||||
"No results found" : "Вынікаў не знойдзена",
|
||||
"{stack} in {board}" : "{stack} у {board}",
|
||||
"Close" : "Закрыць",
|
||||
"Message from {author} in {conversationName}" : "Паведамленне ад {author} у {conversationName}",
|
||||
"Failed to upload {name}" : "Не ўдалося запампаваць {name}",
|
||||
"Share" : "Абагуліць",
|
||||
"Today" : "Сёння",
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
"Done" : "Гатова",
|
||||
"File" : "Файл",
|
||||
"Cancel" : "Скасаваць",
|
||||
"Drop your files to upload" : "Перацягніце файлы для запампоўвання",
|
||||
"File already exists" : "Файл ужо існуе",
|
||||
"A file with the name {filename} already exists." : "Файл з назвай {filename} ужо існуе.",
|
||||
"Do you want to overwrite it?" : "Хочаце перазапісаць яго?",
|
||||
@@ -55,18 +54,13 @@
|
||||
"Keyboard shortcuts" : "Спалучэнні клавіш",
|
||||
"Keyboard shortcut" : "Спалучэнне клавіш",
|
||||
"Action" : "Дзеянне",
|
||||
"Shift" : "Shift",
|
||||
"Search" : "Пошук",
|
||||
"Enter" : "Enter",
|
||||
"Shared with you" : "Абагулена з вамі",
|
||||
"Cancel edit" : "Скасаваць рэдагаванне",
|
||||
"An error occurred" : "Узнікла памылка",
|
||||
"No notifications" : "Няма апавяшчэнняў",
|
||||
"Export" : "Экспарт",
|
||||
"No results found" : "Вынікаў не знойдзена",
|
||||
"{stack} in {board}" : "{stack} у {board}",
|
||||
"Close" : "Закрыць",
|
||||
"Message from {author} in {conversationName}" : "Паведамленне ад {author} у {conversationName}",
|
||||
"Failed to upload {name}" : "Не ўдалося запампаваць {name}",
|
||||
"Share" : "Абагуліць",
|
||||
"Today" : "Сёння",
|
||||
|
||||
@@ -373,7 +373,6 @@ OC.L10N.register(
|
||||
"Note: Only the JSON format is supported for importing back into the Deck app." : "Pozn.: Pro import zpět do aplikace Deck je podporován pouze formát JSON.",
|
||||
"Export" : "Exportovat",
|
||||
"Loading filtered view" : "Načítání filtrovaného pohledu",
|
||||
"Search for {searchQuery} in other boards" : "Hledat {searchQuery} v ostatních tabulích",
|
||||
"Search for {searchQuery} in all boards" : "Hledat {searchQuery} na všech tabulích",
|
||||
"No results found" : "Nenalezeny žádné výsledky",
|
||||
"Deck board {name}\n* Last modified on {lastMod}" : "Deck karta {name}\n* Naposledy změněno {lastMod}",
|
||||
|
||||
@@ -371,7 +371,6 @@
|
||||
"Note: Only the JSON format is supported for importing back into the Deck app." : "Pozn.: Pro import zpět do aplikace Deck je podporován pouze formát JSON.",
|
||||
"Export" : "Exportovat",
|
||||
"Loading filtered view" : "Načítání filtrovaného pohledu",
|
||||
"Search for {searchQuery} in other boards" : "Hledat {searchQuery} v ostatních tabulích",
|
||||
"Search for {searchQuery} in all boards" : "Hledat {searchQuery} na všech tabulích",
|
||||
"No results found" : "Nenalezeny žádné výsledky",
|
||||
"Deck board {name}\n* Last modified on {lastMod}" : "Deck karta {name}\n* Naposledy změněno {lastMod}",
|
||||
|
||||
@@ -129,7 +129,7 @@ OC.L10N.register(
|
||||
"Path is already shared with this card" : "A ruta xa está compartida con esta tarxeta",
|
||||
"Invalid date, date format must be YYYY-MM-DD" : "Data incorrecta, o formato da data debe ser AAAA-MM-DD",
|
||||
"Personal planning and team project organization" : "Planificación persoal e organización de proxectos de equipo",
|
||||
"Deck is a kanban style organization tool aimed at personal planning and project organization for teams integrated with Nextcloud.\n\n\n- 📥 Add your tasks to cards and put them in order\n- 📄 Write down additional notes in Markdown\n- 🔖 Assign labels for even better organization\n- 👥 Share with your team, friends or family\n- 📎 Attach files and embed them in your Markdown description\n- 💬 Discuss with your team using comments\n- ⚡ Keep track of changes in the activity stream\n- 🚀 Get your project organized" : "Gabeta é unha ferramenta de organización de estilo kanban dirixida a planificación persoal e organización de proxectos para equipos integrados con Nextcloud. \n\n\n-- 📥 Engada as súas tarefas ás tarxetas e fagas ordenadas\n- 📄 Escriba notas adicionais en Markdown\n- 🔖 Asigne etiquetas para unha mellor organización\n- 👥 Comparta co seu equipo, amigos ou a súa familia\n- 📎 Anexe ficheiros e integreos na súa descrición de Markdown\n- 💬 Debata co seu equipo usando os comentarios\n- ⚡ Faga un seguimento dos cambios no fluxo de actividade\n- 🚀 Teña o seu proxecto organizado",
|
||||
"Deck is a kanban style organization tool aimed at personal planning and project organization for teams integrated with Nextcloud.\n\n\n- 📥 Add your tasks to cards and put them in order\n- 📄 Write down additional notes in Markdown\n- 🔖 Assign labels for even better organization\n- 👥 Share with your team, friends or family\n- 📎 Attach files and embed them in your Markdown description\n- 💬 Discuss with your team using comments\n- ⚡ Keep track of changes in the activity stream\n- 🚀 Get your project organized" : "Gabeta é unha ferramenta de organización de estilo kanban dirixida a planificación persoal e organización de proxectos para equipos integrados con Nextcloud. \n\n\n– 📥 Engada as súas tarefas ás tarxetas e fagas ordenadas\n– 📄 Escriba notas adicionais en Markdown\n– 🔖 Asigne etiquetas para unha mellor organización\n– 👥 Comparta co seu equipo, amigos ou a súa familia\n– 📎 Anexe ficheiros e integreos na súa descrición de Markdown\n– 💬 Debata co seu equipo usando os comentarios\n– ⚡ Faga un seguimento dos cambios no fluxo de actividade\n– 🚀 Teña o seu proxecto organizado",
|
||||
"Add board" : "Engadir taboleiro",
|
||||
"Card details" : "Detalles da tarxeta",
|
||||
"Select the board to link to a project" : "Seleccione o taboleiro para ligar a un proxecto",
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
"Path is already shared with this card" : "A ruta xa está compartida con esta tarxeta",
|
||||
"Invalid date, date format must be YYYY-MM-DD" : "Data incorrecta, o formato da data debe ser AAAA-MM-DD",
|
||||
"Personal planning and team project organization" : "Planificación persoal e organización de proxectos de equipo",
|
||||
"Deck is a kanban style organization tool aimed at personal planning and project organization for teams integrated with Nextcloud.\n\n\n- 📥 Add your tasks to cards and put them in order\n- 📄 Write down additional notes in Markdown\n- 🔖 Assign labels for even better organization\n- 👥 Share with your team, friends or family\n- 📎 Attach files and embed them in your Markdown description\n- 💬 Discuss with your team using comments\n- ⚡ Keep track of changes in the activity stream\n- 🚀 Get your project organized" : "Gabeta é unha ferramenta de organización de estilo kanban dirixida a planificación persoal e organización de proxectos para equipos integrados con Nextcloud. \n\n\n-- 📥 Engada as súas tarefas ás tarxetas e fagas ordenadas\n- 📄 Escriba notas adicionais en Markdown\n- 🔖 Asigne etiquetas para unha mellor organización\n- 👥 Comparta co seu equipo, amigos ou a súa familia\n- 📎 Anexe ficheiros e integreos na súa descrición de Markdown\n- 💬 Debata co seu equipo usando os comentarios\n- ⚡ Faga un seguimento dos cambios no fluxo de actividade\n- 🚀 Teña o seu proxecto organizado",
|
||||
"Deck is a kanban style organization tool aimed at personal planning and project organization for teams integrated with Nextcloud.\n\n\n- 📥 Add your tasks to cards and put them in order\n- 📄 Write down additional notes in Markdown\n- 🔖 Assign labels for even better organization\n- 👥 Share with your team, friends or family\n- 📎 Attach files and embed them in your Markdown description\n- 💬 Discuss with your team using comments\n- ⚡ Keep track of changes in the activity stream\n- 🚀 Get your project organized" : "Gabeta é unha ferramenta de organización de estilo kanban dirixida a planificación persoal e organización de proxectos para equipos integrados con Nextcloud. \n\n\n– 📥 Engada as súas tarefas ás tarxetas e fagas ordenadas\n– 📄 Escriba notas adicionais en Markdown\n– 🔖 Asigne etiquetas para unha mellor organización\n– 👥 Comparta co seu equipo, amigos ou a súa familia\n– 📎 Anexe ficheiros e integreos na súa descrición de Markdown\n– 💬 Debata co seu equipo usando os comentarios\n– ⚡ Faga un seguimento dos cambios no fluxo de actividade\n– 🚀 Teña o seu proxecto organizado",
|
||||
"Add board" : "Engadir taboleiro",
|
||||
"Card details" : "Detalles da tarxeta",
|
||||
"Select the board to link to a project" : "Seleccione o taboleiro para ligar a un proxecto",
|
||||
|
||||
@@ -373,7 +373,6 @@ OC.L10N.register(
|
||||
"Note: Only the JSON format is supported for importing back into the Deck app." : "Uwaga: tylko format JSON jest obsługiwany przy imporcie z powrotem do aplikacji Deck.",
|
||||
"Export" : "Eksportuj",
|
||||
"Loading filtered view" : "Wczytywanie przefiltrowanego widoku",
|
||||
"Search for {searchQuery} in other boards" : "Szukaj {searchQuery} na innych tablicach",
|
||||
"Search for {searchQuery} in all boards" : "Wyszukaj dla {searchQuery} na wszystkich tablicach",
|
||||
"No results found" : "Nie znaleziono wyników",
|
||||
"Deck board {name}\n* Last modified on {lastMod}" : "Tablica {name}\n* Ostatnia modyfikacja w dniu {lastMod}",
|
||||
|
||||
@@ -371,7 +371,6 @@
|
||||
"Note: Only the JSON format is supported for importing back into the Deck app." : "Uwaga: tylko format JSON jest obsługiwany przy imporcie z powrotem do aplikacji Deck.",
|
||||
"Export" : "Eksportuj",
|
||||
"Loading filtered view" : "Wczytywanie przefiltrowanego widoku",
|
||||
"Search for {searchQuery} in other boards" : "Szukaj {searchQuery} na innych tablicach",
|
||||
"Search for {searchQuery} in all boards" : "Wyszukaj dla {searchQuery} na wszystkich tablicach",
|
||||
"No results found" : "Nie znaleziono wyników",
|
||||
"Deck board {name}\n* Last modified on {lastMod}" : "Tablica {name}\n* Ostatnia modyfikacja w dniu {lastMod}",
|
||||
|
||||
@@ -373,8 +373,7 @@ OC.L10N.register(
|
||||
"Note: Only the JSON format is supported for importing back into the Deck app." : "Not: Yeniden Tahta uygulaması içine aktarmak için yalnızca JSON biçimi desteklenir.",
|
||||
"Export" : "Dışa aktar",
|
||||
"Loading filtered view" : "Süzülmüş görünüm yükleniyor",
|
||||
"Search for {searchQuery} in other boards" : "Diğer panolarda {searchQuery} ara",
|
||||
"Search for {searchQuery} in all boards" : "Tüm panolarda {searchQuery} ara",
|
||||
"Search for {searchQuery} in all boards" : "Tüm panolarda {searchQuery} araması için sonuçlar",
|
||||
"No results found" : "Herhangi bir sonuç bulunamadı",
|
||||
"Deck board {name}\n* Last modified on {lastMod}" : "{name} tahta panosu\n* Son değişiklik: {lastMod}",
|
||||
"* Created on {created}\n* Last modified on {lastMod}\n* {nbAttachments} attachments\n* {nbComments} comments" : "* Oluşturulma: {created}\n* Son değiştirilme: {lastMod}\n* {nbAttachments} ek dosya\n* {nbComments} yorum",
|
||||
|
||||
@@ -371,8 +371,7 @@
|
||||
"Note: Only the JSON format is supported for importing back into the Deck app." : "Not: Yeniden Tahta uygulaması içine aktarmak için yalnızca JSON biçimi desteklenir.",
|
||||
"Export" : "Dışa aktar",
|
||||
"Loading filtered view" : "Süzülmüş görünüm yükleniyor",
|
||||
"Search for {searchQuery} in other boards" : "Diğer panolarda {searchQuery} ara",
|
||||
"Search for {searchQuery} in all boards" : "Tüm panolarda {searchQuery} ara",
|
||||
"Search for {searchQuery} in all boards" : "Tüm panolarda {searchQuery} araması için sonuçlar",
|
||||
"No results found" : "Herhangi bir sonuç bulunamadı",
|
||||
"Deck board {name}\n* Last modified on {lastMod}" : "{name} tahta panosu\n* Son değişiklik: {lastMod}",
|
||||
"* Created on {created}\n* Last modified on {lastMod}\n* {nbAttachments} attachments\n* {nbComments} comments" : "* Oluşturulma: {created}\n* Son değiştirilme: {lastMod}\n* {nbAttachments} ek dosya\n* {nbComments} yorum",
|
||||
|
||||
@@ -373,7 +373,6 @@ OC.L10N.register(
|
||||
"Note: Only the JSON format is supported for importing back into the Deck app." : "Примітка: Для імпорту в додаток Deck підтримується лише формат JSON.",
|
||||
"Export" : "Експортувати",
|
||||
"Loading filtered view" : "Завантаження відфільтрованого перегляду",
|
||||
"Search for {searchQuery} in other boards" : "Шукати {searchQuery} на інших дошках",
|
||||
"Search for {searchQuery} in all boards" : "Шукати {searchQuery} на всіх дошках оголошень",
|
||||
"No results found" : "Не знайдено жодного результату",
|
||||
"Deck board {name}\n* Last modified on {lastMod}" : "Колода {name}\n* Востаннє змінено на {lastMod}",
|
||||
|
||||
@@ -371,7 +371,6 @@
|
||||
"Note: Only the JSON format is supported for importing back into the Deck app." : "Примітка: Для імпорту в додаток Deck підтримується лише формат JSON.",
|
||||
"Export" : "Експортувати",
|
||||
"Loading filtered view" : "Завантаження відфільтрованого перегляду",
|
||||
"Search for {searchQuery} in other boards" : "Шукати {searchQuery} на інших дошках",
|
||||
"Search for {searchQuery} in all boards" : "Шукати {searchQuery} на всіх дошках оголошень",
|
||||
"No results found" : "Не знайдено жодного результату",
|
||||
"Deck board {name}\n* Last modified on {lastMod}" : "Колода {name}\n* Востаннє змінено на {lastMod}",
|
||||
|
||||
@@ -55,7 +55,6 @@ OC.L10N.register(
|
||||
"Edit title" : "Sarlavhani tahrirlash",
|
||||
"Delete card" : "Kartani o'chirish",
|
||||
"seconds ago" : "seconds ago",
|
||||
"Keyboard shortcuts" : "Klaviatura yorliqlari",
|
||||
"Search" : "Qidirish",
|
||||
"Archived boards" : "Arxivlangan taxtalar",
|
||||
"Shared with you" : "Shared with you",
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
"Edit title" : "Sarlavhani tahrirlash",
|
||||
"Delete card" : "Kartani o'chirish",
|
||||
"seconds ago" : "seconds ago",
|
||||
"Keyboard shortcuts" : "Klaviatura yorliqlari",
|
||||
"Search" : "Qidirish",
|
||||
"Archived boards" : "Arxivlangan taxtalar",
|
||||
"Shared with you" : "Shared with you",
|
||||
|
||||
@@ -50,10 +50,12 @@ class LabelApiController extends ApiController {
|
||||
*
|
||||
* @params $title
|
||||
* @params $color
|
||||
* @param array<string, scalar> $customSettings
|
||||
*
|
||||
* Create a new label
|
||||
*/
|
||||
public function create($title, $color) {
|
||||
$label = $this->labelService->create($title, $color, $this->request->getParam('boardId'));
|
||||
public function create($title, $color, array $customSettings = []) {
|
||||
$label = $this->labelService->create($title, $color, $this->request->getParam('boardId'), $customSettings);
|
||||
return new DataResponse($label, HTTP::STATUS_OK);
|
||||
}
|
||||
|
||||
@@ -64,10 +66,12 @@ class LabelApiController extends ApiController {
|
||||
*
|
||||
* @params $title
|
||||
* @params $color
|
||||
* @param array<string, scalar> $customSettings
|
||||
*
|
||||
* Update a specific label
|
||||
*/
|
||||
public function update($title, $color) {
|
||||
$label = $this->labelService->update($this->request->getParam('labelId'), $title, $color);
|
||||
public function update($title, $color, array $customSettings = []) {
|
||||
$label = $this->labelService->update($this->request->getParam('labelId'), $title, $color, $customSettings);
|
||||
return new DataResponse($label, HTTP::STATUS_OK);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,10 +25,11 @@ class LabelController extends Controller {
|
||||
* @param $title
|
||||
* @param $color
|
||||
* @param $boardId
|
||||
* @param array<string, scalar> $customSettings
|
||||
* @return \OCP\AppFramework\Db\Entity
|
||||
*/
|
||||
public function create($title, $color, $boardId) {
|
||||
return $this->labelService->create($title, $color, $boardId);
|
||||
public function create($title, $color, $boardId, array $customSettings = []) {
|
||||
return $this->labelService->create($title, $color, $boardId, $customSettings);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -36,10 +37,11 @@ class LabelController extends Controller {
|
||||
* @param $id
|
||||
* @param $title
|
||||
* @param $color
|
||||
* @param array<string, scalar> $customSettings
|
||||
* @return \OCP\AppFramework\Db\Entity
|
||||
*/
|
||||
public function update($id, $title, $color) {
|
||||
return $this->labelService->update($id, $title, $color);
|
||||
public function update($id, $title, $color, array $customSettings = []) {
|
||||
return $this->labelService->update($id, $title, $color, $customSettings);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -77,33 +77,18 @@ class AssignmentMapper extends DeckMapper implements IPermissionMapper {
|
||||
}
|
||||
|
||||
public function deleteByParticipantOnBoard(string $participant, int $boardId, $type = Assignment::TYPE_USER) {
|
||||
// Step 1: Get all card IDs for the board that have assignments for this participant
|
||||
// This avoids MySQL Error 1093 by separating the SELECT from the DELETE operation
|
||||
$qb = $this->db->getQueryBuilder();
|
||||
$cardIdQuery = $this->db->getQueryBuilder();
|
||||
$cardIdQuery->select('a.card_id')
|
||||
->from('deck_assigned_users', 'a')
|
||||
->innerJoin('a', 'deck_cards', 'c', 'c.id = a.card_id')
|
||||
->innerJoin('c', 'deck_stacks', 's', 's.id = c.stack_id')
|
||||
->where($cardIdQuery->expr()->eq('a.participant', $cardIdQuery->createNamedParameter($participant, IQueryBuilder::PARAM_STR)))
|
||||
->andWhere($cardIdQuery->expr()->eq('s.board_id', $cardIdQuery->createNamedParameter($boardId, IQueryBuilder::PARAM_INT)))
|
||||
->andWhere($cardIdQuery->expr()->eq('a.type', $cardIdQuery->createNamedParameter($type, IQueryBuilder::PARAM_INT)));
|
||||
|
||||
$result = $cardIdQuery->executeQuery();
|
||||
$cardIds = [];
|
||||
while ($row = $result->fetch()) {
|
||||
$cardIds[] = $row['card_id'];
|
||||
}
|
||||
$result->closeCursor();
|
||||
|
||||
// Step 2: If we have card IDs, delete the assignments
|
||||
if (!empty($cardIds)) {
|
||||
$deleteQuery = $this->db->getQueryBuilder();
|
||||
$deleteQuery->delete('deck_assigned_users')
|
||||
->where($deleteQuery->expr()->eq('participant', $deleteQuery->createNamedParameter($participant, IQueryBuilder::PARAM_STR)))
|
||||
->andWhere($deleteQuery->expr()->eq('type', $deleteQuery->createNamedParameter($type, IQueryBuilder::PARAM_INT)))
|
||||
->andWhere($deleteQuery->expr()->in('card_id', $deleteQuery->createNamedParameter($cardIds, IQueryBuilder::PARAM_INT_ARRAY)));
|
||||
$deleteQuery->executeStatement();
|
||||
}
|
||||
->where($cardIdQuery->expr()->eq('a.participant', $qb->createNamedParameter($participant, IQueryBuilder::PARAM_STR)))
|
||||
->andWhere($cardIdQuery->expr()->eq('s.board_id', $qb->createNamedParameter($boardId, IQueryBuilder::PARAM_INT)))
|
||||
->andWhere($cardIdQuery->expr()->eq('a.type', $qb->createNamedParameter($type, IQueryBuilder::PARAM_INT)));
|
||||
$qb->delete('deck_assigned_users')
|
||||
->where($qb->expr()->in('card_id', $qb->createFunction($cardIdQuery->getSQL()), IQueryBuilder::PARAM_INT_ARRAY));
|
||||
$qb->executeStatement();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -131,11 +131,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
||||
return $card;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Card[]
|
||||
* @throws \OCP\DB\Exception
|
||||
*/
|
||||
public function findAll($stackId, ?int $limit = null, ?int $offset = null, int $since = -1) {
|
||||
public function findAll($stackId, $limit = null, $offset = null, $since = -1) {
|
||||
$qb = $this->db->getQueryBuilder();
|
||||
$qb->select('*')
|
||||
->from('deck_cards')
|
||||
@@ -150,32 +146,6 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
||||
return $this->findEntities($qb);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int[] $stackIds
|
||||
* @return array<int, null|Card[]>
|
||||
* @throws \OCP\DB\Exception
|
||||
*/
|
||||
public function findAllForStacks(array $stackIds, ?int $limit = null, ?int $offset = null, int $since = -1): array {
|
||||
$qb = $this->db->getQueryBuilder();
|
||||
$qb->select('*')
|
||||
->from('deck_cards')
|
||||
->where($qb->expr()->in('stack_id', $qb->createNamedParameter($stackIds, IQueryBuilder::PARAM_INT_ARRAY)))
|
||||
->andWhere($qb->expr()->eq('archived', $qb->createNamedParameter(false, IQueryBuilder::PARAM_BOOL)))
|
||||
->andWhere($qb->expr()->eq('deleted_at', $qb->createNamedParameter(0, IQueryBuilder::PARAM_INT)))
|
||||
->andWhere($qb->expr()->gt('last_modified', $qb->createNamedParameter($since, IQueryBuilder::PARAM_INT)))
|
||||
->setMaxResults($limit)
|
||||
->setFirstResult($offset)
|
||||
->orderBy('order')
|
||||
->addOrderBy('id');
|
||||
|
||||
$rawCards = $this->findEntities($qb);
|
||||
$cards = array_fill_keys($stackIds, null);
|
||||
foreach ($rawCards as $card) {
|
||||
$cards[$card->getStackId()][] = $card;
|
||||
}
|
||||
return $cards;
|
||||
}
|
||||
|
||||
public function queryCardsByBoard(int $boardId): IQueryBuilder {
|
||||
$qb = $this->db->getQueryBuilder();
|
||||
$qb->select('c.*')
|
||||
|
||||
@@ -9,6 +9,8 @@ namespace OCA\Deck\Db;
|
||||
|
||||
/**
|
||||
* @method getTitle(): string
|
||||
* @method getCustomSettings(): string
|
||||
* @method setCustomSettings(string $customSettings)
|
||||
*/
|
||||
class Label extends RelationalEntity {
|
||||
protected $title;
|
||||
@@ -16,15 +18,32 @@ class Label extends RelationalEntity {
|
||||
protected $boardId;
|
||||
protected $cardId;
|
||||
protected $lastModified;
|
||||
protected $customSettings;
|
||||
|
||||
public function __construct() {
|
||||
$this->addType('id', 'integer');
|
||||
$this->addType('boardId', 'integer');
|
||||
$this->addType('cardId', 'integer');
|
||||
$this->addType('lastModified', 'integer');
|
||||
$this->addType('customSettings', 'string');
|
||||
}
|
||||
|
||||
public function getETag() {
|
||||
return md5((string)$this->getLastModified());
|
||||
}
|
||||
|
||||
public function getCustomSettingsArray(): array {
|
||||
return $this->customSettings ? json_decode($this->customSettings, true) : [];
|
||||
}
|
||||
|
||||
public function setCustomSettingsArray(array $customSettings): void {
|
||||
$this->setCustomSettings(json_encode($customSettings ?: new \stdClass()));
|
||||
}
|
||||
|
||||
public function jsonSerialize(): array {
|
||||
$data = parent::jsonSerialize();
|
||||
$data['customSettings'] = $this->getCustomSettingsArray() ?: new \stdClass();
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ use Sabre\VObject\Component\VCalendar;
|
||||
* @method int getDeletedAt()
|
||||
* @method int getLastModified()
|
||||
* @method int getOrder()
|
||||
* @method Card[] getCards()
|
||||
*/
|
||||
class Stack extends RelationalEntity {
|
||||
protected $title;
|
||||
|
||||
@@ -77,10 +77,12 @@ class StackMapper extends DeckMapper implements IPermissionMapper {
|
||||
|
||||
/**
|
||||
* @param numeric $boardId
|
||||
* @param int|null $limit
|
||||
* @param int|null $offset
|
||||
* @return Stack[]
|
||||
* @throws \OCP\DB\Exception
|
||||
*/
|
||||
public function findAll($boardId, ?int $limit = null, ?int $offset = null): array {
|
||||
public function findAll($boardId, $limit = null, $offset = null): array {
|
||||
$qb = $this->db->getQueryBuilder();
|
||||
$qb->select('*')
|
||||
->from($this->getTableName())
|
||||
|
||||
32
lib/Migration/Version20000Date20250907000000.php
Normal file
32
lib/Migration/Version20000Date20250907000000.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace OCA\Deck\Migration;
|
||||
|
||||
use Closure;
|
||||
use OCP\DB\ISchemaWrapper;
|
||||
use OCP\DB\Types;
|
||||
use OCP\Migration\IOutput;
|
||||
use OCP\Migration\SimpleMigrationStep;
|
||||
|
||||
class Version20000Date20250907000000 extends SimpleMigrationStep {
|
||||
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
|
||||
/** @var ISchemaWrapper $schema */
|
||||
$schema = $schemaClosure();
|
||||
|
||||
$table = $schema->getTable('deck_labels');
|
||||
if (!$table->hasColumn('custom_settings')) {
|
||||
$table->addColumn('custom_settings', Types::JSON, [
|
||||
'notnull' => false,
|
||||
]);
|
||||
}
|
||||
|
||||
return $schema;
|
||||
}
|
||||
}
|
||||
@@ -340,7 +340,7 @@ class CardService {
|
||||
// clone labels that are assigned to card but don't exist in new board
|
||||
if (empty($filteredLabels)) {
|
||||
if ($this->permissionService->getPermissions($boardId)[Acl::PERMISSION_MANAGE] === true) {
|
||||
$newLabel = $this->labelService->create($label->getTitle(), $label->getColor(), $board->getId());
|
||||
$newLabel = $this->labelService->create($label->getTitle(), $label->getColor(), $board->getId(), $label->getCustomSettingsArray());
|
||||
$boardLabels[] = $label;
|
||||
$this->assignLabel($card->getId(), $newLabel->getId());
|
||||
}
|
||||
|
||||
@@ -62,6 +62,7 @@ class LabelService {
|
||||
* @param $title
|
||||
* @param $color
|
||||
* @param $boardId
|
||||
* @param array<string, scalar> $customSettings
|
||||
* @return \OCP\AppFramework\Db\Entity
|
||||
* @throws StatusException
|
||||
* @throws \OCA\Deck\NoPermissionException
|
||||
@@ -69,7 +70,7 @@ class LabelService {
|
||||
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
|
||||
* @throws BadRequestException
|
||||
*/
|
||||
public function create($title, $color, $boardId) {
|
||||
public function create($title, $color, $boardId, array $customSettings = []) {
|
||||
$this->labelServiceValidator->check(compact('title', 'color', 'boardId'));
|
||||
|
||||
$this->permissionService->checkPermission(null, $boardId, Acl::PERMISSION_MANAGE);
|
||||
@@ -89,6 +90,7 @@ class LabelService {
|
||||
$label->setTitle($title);
|
||||
$label->setColor($color);
|
||||
$label->setBoardId($boardId);
|
||||
$label->setCustomSettingsArray($customSettings);
|
||||
$this->changeHelper->boardChanged($boardId);
|
||||
return $this->labelMapper->insert($label);
|
||||
}
|
||||
@@ -99,7 +101,7 @@ class LabelService {
|
||||
$originLabel = $this->find($labelId);
|
||||
$filteredValues = array_values(array_filter($boardLabels, fn ($item) => $item->getTitle() === $originLabel->getTitle()));
|
||||
if (empty($filteredValues)) {
|
||||
$label = $this->create($originLabel->getTitle(), $originLabel->getColor(), $targetBoardId);
|
||||
$label = $this->create($originLabel->getTitle(), $originLabel->getColor(), $targetBoardId, $originLabel->getCustomSettingsArray());
|
||||
return $label;
|
||||
}
|
||||
return $originLabel;
|
||||
@@ -130,6 +132,7 @@ class LabelService {
|
||||
* @param $id
|
||||
* @param $title
|
||||
* @param $color
|
||||
* @param array<string, scalar> $customSettings
|
||||
* @return \OCP\AppFramework\Db\Entity
|
||||
* @throws StatusException
|
||||
* @throws \OCA\Deck\NoPermissionException
|
||||
@@ -137,7 +140,7 @@ class LabelService {
|
||||
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
|
||||
* @throws BadRequestException
|
||||
*/
|
||||
public function update($id, $title, $color) {
|
||||
public function update($id, $title, $color, array $customSettings = []) {
|
||||
$this->labelServiceValidator->check(compact('title', 'color', 'id'));
|
||||
|
||||
$this->permissionService->checkPermission($this->labelMapper, $id, Acl::PERMISSION_MANAGE);
|
||||
@@ -161,6 +164,7 @@ class LabelService {
|
||||
|
||||
$label->setTitle($title);
|
||||
$label->setColor($color);
|
||||
$label->setCustomSettingsArray($customSettings);
|
||||
$this->changeHelper->boardChanged($label->getBoardId());
|
||||
return $this->labelMapper->update($label);
|
||||
}
|
||||
|
||||
@@ -75,22 +75,19 @@ class StackService {
|
||||
$this->stackServiceValidator = $stackServiceValidator;
|
||||
}
|
||||
|
||||
/** @param Stack[] $stacks */
|
||||
private function enrichStacksWithCards(array $stacks, $since = -1): void {
|
||||
$cardsByStackId = $this->cardMapper->findAllForStacks(array_map(fn (Stack $stack) => $stack->getId(), $stacks), null, null, $since);
|
||||
private function enrichStackWithCards($stack, $since = -1) {
|
||||
$cards = $this->cardMapper->findAll($stack->getId(), null, null, $since);
|
||||
|
||||
foreach ($cardsByStackId as $stackId => $cards) {
|
||||
if (!$cards) {
|
||||
continue;
|
||||
}
|
||||
if (\count($cards) === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
$stack->setCards($this->cardService->enrichCards($cards));
|
||||
}
|
||||
|
||||
foreach ($stacks as $stack) {
|
||||
if ($stack->getId() === $stackId) {
|
||||
$stack->setCards($this->cardService->enrichCards($cards));
|
||||
break;
|
||||
}
|
||||
}
|
||||
private function enrichStacksWithCards($stacks, $since = -1) {
|
||||
foreach ($stacks as $stack) {
|
||||
$this->enrichStackWithCards($stack, $since);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,9 +124,9 @@ class StackService {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $boardId
|
||||
* @param $boardId
|
||||
*
|
||||
* @return Stack[]
|
||||
* @return array
|
||||
* @throws \OCA\Deck\NoPermissionException
|
||||
* @throws BadRequestException
|
||||
*/
|
||||
@@ -250,7 +247,7 @@ class StackService {
|
||||
);
|
||||
$this->changeHelper->boardChanged($stack->getBoardId());
|
||||
$this->eventDispatcher->dispatchTyped(new BoardUpdatedEvent($stack->getBoardId()));
|
||||
$this->enrichStacksWithCards([$stack]);
|
||||
$this->enrichStackWithCards($stack);
|
||||
|
||||
return $stack;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<template>
|
||||
<div v-if="activity" class="activity">
|
||||
<div class="activity--header">
|
||||
<img :src="activity.icon" class="activity--icon" :class="applyMonochromeIconColor">
|
||||
<img :src="activity.icon" class="activity--icon">
|
||||
<NcRichText class="activity--subject" :text="message.subject" :arguments="message.parameters" />
|
||||
<div class="activity--timestamp" :name="formatReadableDate(activity.datetime)">
|
||||
{{ relativeDate(activity.datetime) }}
|
||||
@@ -94,15 +94,6 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
applyMonochromeIconColor() {
|
||||
// copied from https://github.com/nextcloud/activity/blob/db919d45c45356082b17104614018e2c7e691996/js/script.js#L225
|
||||
const monochromeIcon = this.activity.type !== 'file_created' && this.activity.type !== 'file_deleted' && this.activity.type !== 'favorite' && !this.activity.icon.endsWith('-color.svg')
|
||||
if (monochromeIcon) {
|
||||
return 'monochrome'
|
||||
}
|
||||
return ''
|
||||
},
|
||||
|
||||
sanitizedMessage() {
|
||||
return DOMPurify.sanitize(this.activity.message, { ALLOWED_TAGS: ['ins', 'del'], ALLOWED_ATTR: ['class'] })
|
||||
},
|
||||
@@ -124,12 +115,6 @@ export default {
|
||||
height: 16px;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
|
||||
/* colored icons, in addition to core ones */
|
||||
&.monochrome {
|
||||
opacity: 0.8;
|
||||
filter: var(--background-invert-if-dark);
|
||||
}
|
||||
}
|
||||
.activity--subject {
|
||||
margin-left: 10px;
|
||||
|
||||
@@ -281,6 +281,7 @@ export default {
|
||||
}
|
||||
|
||||
.board {
|
||||
padding-left: $board-gap;
|
||||
position: relative;
|
||||
overflow-x: auto;
|
||||
flex-grow: 1;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<NcAppSidebar v-if="board != null"
|
||||
:actions="[]"
|
||||
:name="board.title"
|
||||
style="width: 400px"
|
||||
@close="closeSidebar">
|
||||
<NcAppSidebarTab id="sharing"
|
||||
:order="0"
|
||||
@@ -58,7 +59,7 @@ import { NcAppSidebar, NcAppSidebarTab } from '@nextcloud/vue'
|
||||
import ActivityIcon from 'vue-material-design-icons/LightningBolt.vue'
|
||||
import SharingIcon from 'vue-material-design-icons/ShareVariantOutline.vue'
|
||||
import TagsIcon from 'vue-material-design-icons/TagMultipleOutline.vue'
|
||||
import TrashIcon from 'vue-material-design-icons/TrashCanOutline.vue'
|
||||
import TrashIcon from 'vue-material-design-icons/DeleteOutline.vue'
|
||||
const capabilities = window.OC.getCapabilities()
|
||||
|
||||
export default {
|
||||
|
||||
@@ -15,7 +15,11 @@
|
||||
@input="updateColor">
|
||||
<div :style="{ backgroundColor: '#' + editingLabel.color }" class="color0 icon-colorpicker" />
|
||||
</NcColorPicker>
|
||||
<input v-model="editingLabel.title" type="text">
|
||||
<NcCheckboxRadioSwitch v-model="editingLabelIsImportant"
|
||||
type="switch">
|
||||
{{ t('deck', 'Important') }}
|
||||
</NcCheckboxRadioSwitch>
|
||||
<input v-model="editingLabel.title" type="text" style="margin-right: 20px;">
|
||||
<input :disabled="!editLabelObjValidated"
|
||||
type="submit"
|
||||
value=""
|
||||
@@ -34,10 +38,18 @@
|
||||
</template>
|
||||
<template v-else>
|
||||
<div v-if="canManage && !isArchived" class="label-title" @click="clickEdit(label)">
|
||||
<span :style="{ backgroundColor: `#${label.color}`, color: textColor(label.color) }">{{ label.title }}</span>
|
||||
<span :style="{
|
||||
backgroundColor: `#${label.color}`,
|
||||
color: textColor(label.color),
|
||||
fontWeight: label.customSettings.isImportant ? 'bold' : 'normal'
|
||||
}">{{ label.title }}</span>
|
||||
</div>
|
||||
<div v-else class="label-title">
|
||||
<span :style="{ backgroundColor: `#${label.color}`, color: textColor(label.color) }">{{ label.title }}</span>
|
||||
<span :style="{
|
||||
backgroundColor: `#${label.color}`,
|
||||
color: textColor(label.color),
|
||||
fontWeight: label.customSettings.isImportant ? 'bold' : 'normal'
|
||||
}">{{ label.title }}</span>
|
||||
</div>
|
||||
|
||||
<NcActions v-if="canManage && !isArchived">
|
||||
@@ -62,7 +74,11 @@
|
||||
@input="updateColor">
|
||||
<div :style="{ backgroundColor: '#' + addLabelObj.color }" class="color0 icon-colorpicker" />
|
||||
</NcColorPicker>
|
||||
<input v-model="addLabelObj.title" type="text">
|
||||
<NcCheckboxRadioSwitch v-model="addLabelIsImportant"
|
||||
type="switch">
|
||||
{{ t('deck', 'Important') }}
|
||||
</NcCheckboxRadioSwitch>
|
||||
<input v-model="addLabelObj.title" type="text" style="margin-right: 20px;">
|
||||
<input :disabled="!addLabelObjValidated"
|
||||
type="submit"
|
||||
value=""
|
||||
@@ -88,7 +104,7 @@
|
||||
|
||||
import { mapGetters } from 'vuex'
|
||||
import Color from '../../mixins/color.js'
|
||||
import { NcColorPicker, NcActions, NcActionButton } from '@nextcloud/vue'
|
||||
import { NcColorPicker, NcActions, NcActionButton, NcCheckboxRadioSwitch } from '@nextcloud/vue'
|
||||
|
||||
export default {
|
||||
name: 'TagsTabSidebar',
|
||||
@@ -96,6 +112,7 @@ export default {
|
||||
NcColorPicker,
|
||||
NcActions,
|
||||
NcActionButton,
|
||||
NcCheckboxRadioSwitch,
|
||||
},
|
||||
mixins: [Color],
|
||||
data() {
|
||||
@@ -139,7 +156,22 @@ export default {
|
||||
labelsSorted() {
|
||||
return [...this.labels].sort((a, b) => a.title.localeCompare(b.title))
|
||||
},
|
||||
|
||||
addLabelIsImportant: {
|
||||
get() {
|
||||
return this.addLabelObj?.customSettings?.isImportant || false
|
||||
},
|
||||
set(isImportant) {
|
||||
this.addLabelObj.customSettings = { ...this.addLabelObj.customSettings, isImportant }
|
||||
},
|
||||
},
|
||||
editingLabelIsImportant: {
|
||||
get() {
|
||||
return this.editingLabel?.customSettings?.isImportant
|
||||
},
|
||||
set(isImportant) {
|
||||
this.editingLabel.customSettings = { ...this.editingLabel.customSettings, isImportant }
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
updateColor(c) {
|
||||
@@ -157,15 +189,23 @@ export default {
|
||||
this.$store.dispatch('removeLabelFromCurrentBoard', id)
|
||||
},
|
||||
updateLabel(label) {
|
||||
this.$store.dispatch('updateLabelFromCurrentBoard', this.editingLabel)
|
||||
const payload = {
|
||||
...this.editingLabel,
|
||||
customSettings: { ...this.editingLabel.customSettings },
|
||||
}
|
||||
this.$store.dispatch('updateLabelFromCurrentBoard', payload)
|
||||
this.editingLabelId = null
|
||||
},
|
||||
clickShowAddLabel() {
|
||||
this.addLabelObj = { cardId: null, color: this.defaultColors[Math.floor(Math.random() * this.defaultColors.length)], title: '' }
|
||||
this.addLabelObj = { cardId: null, color: this.defaultColors[Math.floor(Math.random() * this.defaultColors.length)], title: '', customSettings: {} }
|
||||
this.addLabel = true
|
||||
},
|
||||
clickAddLabel() {
|
||||
this.$store.dispatch('addLabelToCurrentBoard', this.addLabelObj)
|
||||
const payload = {
|
||||
...this.addLabelObj,
|
||||
customSettings: { ...this.addLabelObj.customSettings },
|
||||
}
|
||||
this.$store.dispatch('addLabelToCurrentBoard', payload)
|
||||
this.addLabel = false
|
||||
this.addLabelObj = null
|
||||
},
|
||||
|
||||
@@ -131,6 +131,42 @@ export default {
|
||||
height: var(--default-clickable-area);
|
||||
}
|
||||
|
||||
.badges .icon.due {
|
||||
background-position: 4px center;
|
||||
border-radius: var(--border-radius);
|
||||
padding: 4px;
|
||||
font-size: 13px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
opacity: .5;
|
||||
flex-shrink: 1;
|
||||
|
||||
.icon {
|
||||
background-size: contain;
|
||||
}
|
||||
|
||||
&.overdue {
|
||||
background-color: var(--color-error);
|
||||
color: var(--color-primary-element-text);
|
||||
opacity: .7;
|
||||
}
|
||||
&.now {
|
||||
background-color: var(--color-warning);
|
||||
opacity: .7;
|
||||
}
|
||||
&.next {
|
||||
background-color: var(--color-background-dark);
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
span {
|
||||
margin-left: 20px;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.badge-left, .badge-right {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
@@ -6,10 +6,19 @@
|
||||
<template>
|
||||
<AttachmentDragAndDrop v-if="card" :card-id="card.id" class="drop-upload--card">
|
||||
<div :ref="`card${card.id}`"
|
||||
:class="{'compact': compactMode, 'current-card': currentCard, 'no-labels': !hasLabels, 'card__editable': canEdit, 'card__archived': card.archived, 'card__highlight': highlight}"
|
||||
:class="{
|
||||
'compact': compactMode,
|
||||
'current-card': currentCard,
|
||||
'no-labels': !hasLabels,
|
||||
'card__editable': canEdit,
|
||||
'card__archived': card.archived,
|
||||
'card__highlight': highlight,
|
||||
'card__important': !!importantColor,
|
||||
}"
|
||||
tag="div"
|
||||
:tabindex="0"
|
||||
class="card"
|
||||
:style="{'box-shadow': importantColor ? `-5px 0px 0px 0px ${importantColor}` : null}"
|
||||
@click="openCard"
|
||||
@keyup.self="handleCardKeyboardShortcut"
|
||||
@mouseenter="focus(card.id)">
|
||||
@@ -133,6 +142,14 @@ export default {
|
||||
currentBoard: state => state.currentBoard,
|
||||
showCardCover: state => state.showCardCover,
|
||||
shortcutLock: state => state.shortcutLock,
|
||||
importantColor() {
|
||||
for (const label of this.card.labels) {
|
||||
if (label.customSettings.isImportant) {
|
||||
return '#' + label.color
|
||||
}
|
||||
}
|
||||
return null
|
||||
},
|
||||
}),
|
||||
...mapGetters([
|
||||
'isArchived',
|
||||
@@ -421,6 +438,10 @@ export default {
|
||||
&.card__highlight {
|
||||
animation: highlight 2s;
|
||||
}
|
||||
|
||||
&:not(.card__important) {
|
||||
box-shadow: -5px 0px 0px 0px var(--color-main-background);
|
||||
}
|
||||
.card-labels {
|
||||
display: flex;
|
||||
align-items: end;
|
||||
|
||||
@@ -95,16 +95,16 @@ export default {
|
||||
z-index: 2;
|
||||
|
||||
[data-due-state='Overdue'] & {
|
||||
color: var(--color-element-error, var(--color-error-text));
|
||||
background-color: rgba(var(--color-error-rgb), .5);
|
||||
color: var(--color-error-text);
|
||||
background-color: rgba(var(--color-error-rgb), .1);
|
||||
}
|
||||
[data-due-state='Now'] & {
|
||||
color: var(--color-element-warning, var(--color-warning-text));
|
||||
background-color: rgba(var(--color-warning-rgb), .5);
|
||||
color: var(--color-warning-text);
|
||||
background-color: rgba(var(--color-warning-rgb), .1);
|
||||
}
|
||||
[data-due-state='Done'] & {
|
||||
color: var(--color-element-success, var(--color-success-text));
|
||||
background-color: rgba(var(--color-success-rgb), .5);
|
||||
color: var(--color-success-text);
|
||||
background-color: rgba(var(--color-success-rgb), .1);
|
||||
}
|
||||
|
||||
.due--label {
|
||||
|
||||
@@ -272,6 +272,7 @@ export default new Vuex.Store({
|
||||
|
||||
labelToUpdate.title = newLabel.title
|
||||
labelToUpdate.color = newLabel.color
|
||||
labelToUpdate.customSettings = newLabel.customSettings
|
||||
},
|
||||
addLabelToCurrentBoard(state, newLabel) {
|
||||
state.currentBoard.labels.push(newLabel)
|
||||
|
||||
@@ -45,11 +45,13 @@ class LabelTest extends TestCase {
|
||||
'lastModified' => null,
|
||||
'color' => '000000',
|
||||
'ETag' => $label->getETag(),
|
||||
'customSettings' => new \stdClass(),
|
||||
], $label->jsonSerialize());
|
||||
}
|
||||
public function testJsonSerializeCard() {
|
||||
$label = $this->createLabel();
|
||||
$label->setCardId(123);
|
||||
$label->setCustomSettingsArray(['isImportant' => true]);
|
||||
$this->assertEquals([
|
||||
'id' => 1,
|
||||
'title' => 'My Label',
|
||||
@@ -58,6 +60,7 @@ class LabelTest extends TestCase {
|
||||
'lastModified' => null,
|
||||
'color' => '000000',
|
||||
'ETag' => $label->getETag(),
|
||||
'customSettings' => ['isImportant' => true]
|
||||
], $label->jsonSerialize());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,14 +75,16 @@ class LabelServiceTest extends TestCase {
|
||||
$label->setTitle('Label title');
|
||||
$label->setBoardId(123);
|
||||
$label->setColor('00ff00');
|
||||
$label->setCustomSettingsArray(['isImportant' => true]);
|
||||
$this->labelMapper->expects($this->once())
|
||||
->method('insert')
|
||||
->willReturn($label);
|
||||
$b = $this->labelService->create('Label title', '00ff00', 123);
|
||||
$b = $this->labelService->create('Label title', '00ff00', 123, ['isImportant' => true]);
|
||||
|
||||
$this->assertEquals($b->getTitle(), 'Label title');
|
||||
$this->assertEquals($b->getBoardId(), 123);
|
||||
$this->assertEquals($b->getColor(), '00ff00');
|
||||
$this->assertEquals($b->getCustomSettingsArray(), ['isImportant' => true]);
|
||||
}
|
||||
|
||||
|
||||
@@ -111,6 +113,7 @@ class LabelServiceTest extends TestCase {
|
||||
$label->setId(1);
|
||||
$label->setTitle('title');
|
||||
$label->setColor('00ff00');
|
||||
$label->setCustomSettingsArray(['isImportant' => true]);
|
||||
$this->labelMapper->expects($this->once())
|
||||
->method('find')
|
||||
->willReturn($label);
|
||||
@@ -119,6 +122,7 @@ class LabelServiceTest extends TestCase {
|
||||
$expectedLabel->setTitle('title');
|
||||
$expectedLabel->setColor('00ff00');
|
||||
$expectedLabel->setBoardId(1);
|
||||
$expectedLabel->setCustomSettingsArray(['isImportant' => true]);
|
||||
$this->labelMapper->expects($this->once())
|
||||
->method('insert')
|
||||
->with($expectedLabel)
|
||||
|
||||
@@ -129,17 +129,12 @@ class StackServiceTest extends TestCase {
|
||||
}
|
||||
)
|
||||
);
|
||||
$this->cardMapper->expects($this->any())->method('findAllForStacks')->willReturnCallback(function (array $stackIds) {
|
||||
$r = [];
|
||||
foreach ($stackIds as $stackId) {
|
||||
$r[$stackId] = $this->getCards(222);
|
||||
}
|
||||
return $r;
|
||||
});
|
||||
$this->cardMapper->expects($this->any())->method('findAll')->willReturn($this->getCards(222));
|
||||
|
||||
|
||||
$actual = $this->stackService->findAll(123);
|
||||
for ($stackId = 0; $stackId < 3; $stackId++) {
|
||||
for ($cardId = 0; $cardId < 10; $cardId++) {
|
||||
for ($cardId = 0;$cardId < 10;$cardId++) {
|
||||
$this->assertEquals($actual[0]->getCards()[$cardId]->getId(), $cardId);
|
||||
$this->assertEquals($actual[0]->getCards()[$cardId]->getStackId(), 222);
|
||||
$this->assertEquals($actual[0]->getCards()[$cardId]->getLabels(), $this->getLabels()[$cardId]);
|
||||
@@ -216,7 +211,7 @@ class StackServiceTest extends TestCase {
|
||||
$stackToBeDeleted->setBoardId(1);
|
||||
$this->stackMapper->expects($this->once())->method('find')->willReturn($stackToBeDeleted);
|
||||
$this->stackMapper->expects($this->once())->method('update')->willReturn($stackToBeDeleted);
|
||||
$this->cardMapper->expects($this->once())->method('findAllForStacks')->willReturn([]);
|
||||
$this->cardMapper->expects($this->once())->method('findAll')->willReturn([]);
|
||||
$this->stackService->delete(123);
|
||||
$this->assertTrue($stackToBeDeleted->getDeletedAt() <= time(), 'deletedAt is in the past');
|
||||
$this->assertTrue($stackToBeDeleted->getDeletedAt() > 0, 'deletedAt is set');
|
||||
|
||||
Reference in New Issue
Block a user