Compare commits

...

10 Commits

Author SHA1 Message Date
Julius Härtl
a514e6e168 Adapt modal size to viewer upstream changes
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-04-29 08:47:21 +00:00
Julius Härtl
cb5553ea94 Merge pull request #3754 from nextcloud/backport/3745/stable24
[stable24] Add missing indices
2022-04-28 10:10:31 +02:00
Julius Härtl
335ee31c7c Add missing indices
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-04-26 16:26:17 +00:00
Julius Härtl
9b4379727d Merge pull request #3736 from nextcloud/backport/3681/stable24
[stable24] Show cards after moving into another list
2022-04-20 18:14:34 +02:00
Julius Härtl
a5fe2f59be Merge pull request #3733 from nextcloud/backport/3692/stable24
[stable24] Fix hidden attachment icon on archived cards
2022-04-20 18:14:13 +02:00
Luka Trovic
1b58f7854e fix: feedback
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2022-04-20 14:24:24 +00:00
Luka Trovic
b6effa468f fix: show card after moving into another list
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2022-04-20 14:24:24 +00:00
Luka Trovic
2b512b88c4 fix: hidden attachment icon on archived cards
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2022-04-20 14:22:23 +00:00
Julius Härtl
5cb61cba90 Merge pull request #3723 from nextcloud/update-stable24-target-versions
Update stable24 target versions
2022-04-19 15:38:37 +02:00
Joas Schilling
0657efe239 Update stable24 target versions
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-04-14 22:09:00 +02:00
10 changed files with 127 additions and 34 deletions

View File

@@ -19,7 +19,7 @@ jobs:
matrix:
php-versions: ['7.4']
databases: ['sqlite', 'mysql', 'pgsql']
server-versions: ['master']
server-versions: ['stable24']
name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}

View File

@@ -20,7 +20,7 @@ jobs:
matrix:
php-versions: ['7.4', '8.0', '8.1']
databases: ['sqlite', 'mysql', 'pgsql']
server-versions: ['master']
server-versions: ['stable24']
name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}

View File

@@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ocp-version: [ 'dev-master' ]
ocp-version: [ 'dev-stable24' ]
name: Nextcloud ${{ matrix.ocp-version }}
steps:
- name: Checkout

View File

@@ -0,0 +1,99 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2022 Your name <your@email.com>
*
* @author Your name <your@email.com>
*
* @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/>.
*
*/
namespace OCA\Deck\Migration;
use Closure;
use Doctrine\DBAL\Schema\SchemaException;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version10800Date20220422061816 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @param Closure(): ISchemaWrapper $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
* @return null|ISchemaWrapper
* @throws SchemaException
*/
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
$schema = $schemaClosure();
$indexAdded = $this->addIndex($schema,
'deck_boards',
'idx_owner_modified',
[ 'owner', 'last_modified' ]
);
$indexAdded = $this->addIndex($schema,
'deck_board_acl',
'idx_participant_type',
[ 'participant', 'type']
) || $indexAdded;
$indexAdded = $this->addIndex($schema,
'deck_cards',
'idx_due_notified_archived_deleted', [
'duedate', 'notified', 'archived', 'deleted_at'
],
) || $indexAdded;
$indexAdded = $this->addIndex($schema,
'deck_cards',
'idx_last_editor', [
'last_editor', 'description_prev'
], [],
// Adding a partial index on the description_prev as it is only used for a NULL check
['lengths' => [null, 1]]
) || $indexAdded;
$indexAdded = $this->addIndex($schema,
'deck_attachment',
'idx_cardid_deletedat',
[ 'card_id', 'deleted_at']
) || $indexAdded;
$indexAdded = $this->addIndex($schema,
'deck_assigned_users',
'idx_card_participant',
[ 'card_id', 'participant']
) || $indexAdded;
return $indexAdded ? $schema : null;
}
private function addIndex(ISchemaWrapper $schema, string $table, string $indexName, array $columns, array $flags = [], array $options = []): bool {
$table = $schema->getTable($table);
if (!$table->hasIndex($indexName)) {
$table->addIndex($columns, $indexName, $flags, $options);
return true;
}
return false;
}
}

View File

@@ -181,6 +181,7 @@ class StackService {
if (array_key_exists($card->id, $labels)) {
$cards[$cardIndex]->setLabels($labels[$card->id]);
}
$cards[$cardIndex]->setAttachmentCount($this->attachmentService->count($card->getId()));
}
$stacks[$stackIndex]->setCards($cards);
}

View File

@@ -31,6 +31,7 @@
v-if="cardDetailsInModal && $route.params.cardId"
:clear-view-delay="0"
:title="t('deck', 'Card details')"
size="large"
@close="hideModal()">
<div class="modal__content modal__card">
<router-view name="sidebar" />
@@ -154,14 +155,6 @@ export default {
}
}
}
.modal__card {
min-width: 320px;
width: 50vw;
max-width: 800px;
min-height: 200px;
height: 80vh;
}
</style>
<style lang="scss">

View File

@@ -225,6 +225,8 @@ export default {
max-width: calc(100% - #{$modal-padding*2});
padding: 0 14px;
max-height: 100%;
overflow: initial;
&::v-deep {
.app-sidebar-header {
position: sticky;
@@ -240,6 +242,10 @@ export default {
background-color: var(--color-main-background);
}
.app-sidebar__tab {
overflow: initial;
}
#emptycontent, .emptycontent {
margin-top: 88px;
}

View File

@@ -135,6 +135,10 @@ export default {
},
activeBoards() {
return this.$store.getters.boards.filter((item) => item.deletedAt === 0 && item.archived === false)
},
boardId() {
return this.card?.boardId ? this.card.boardId : this.$route.params.id
}
},
methods: {
@@ -167,10 +171,13 @@ export default {
},
})
},
moveCard() {
async moveCard() {
this.copiedCard = Object.assign({}, this.card)
this.copiedCard.stackId = this.selectedStack.id
this.$store.dispatch('moveCard', this.copiedCard)
if (parseInt(this.boardId) === parseInt(this.selectedStack.boardId)) {
await this.$store.commit('addNewCard', { ...this.copiedCard })
}
this.modalShow = false
},
async loadStacksFromBoard(board) {

View File

@@ -264,6 +264,9 @@ export default {
Vue.set(state.cards[existingIndex], 'attachmentCount', state.cards[existingIndex].attachmentCount - 1)
}
},
addNewCard(state, card) {
state.cards.push(card)
},
},
actions: {
async addCard({ commit }, card) {

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="4.16.1@aa7e400908833b10c0333861f86cd48c510b60eb">
<files psalm-version="4.22.0@fc2c6ab4d5fa5d644d8617089f012f3bb84b8703">
<file src="lib/Activity/ActivityManager.php">
<TypeDoesNotContainType occurrences="1">
<code>$message !== null</code>
@@ -10,17 +10,6 @@
<code>(int)$subjectParams['comment']</code>
</InvalidScalarArgument>
</file>
<file src="lib/AppInfo/Application.php">
<InvalidArgument occurrences="7">
<code>registerEventListener</code>
<code>registerEventListener</code>
<code>registerEventListener</code>
<code>registerEventListener</code>
<code>registerEventListener</code>
<code>registerEventListener</code>
<code>registerEventListener</code>
</InvalidArgument>
</file>
<file src="lib/Command/UserExport.php">
<ImplementedReturnTypeMismatch occurrences="1">
<code>void</code>
@@ -49,11 +38,6 @@
<code>$this-&gt;userId</code>
</UndefinedThisPropertyFetch>
</file>
<file src="lib/Controller/BoardController.php">
<UndefinedDocblockClass occurrences="1">
<code>\OCP\Deck\DB\Board</code>
</UndefinedDocblockClass>
</file>
<file src="lib/Controller/CommentsApiController.php">
<InvalidScalarArgument occurrences="6">
<code>$cardId</code>
@@ -107,11 +91,6 @@
<code>$cardId</code>
</ParamNameMismatch>
</file>
<file src="lib/Db/AttachmentMapper.php">
<UndefinedVariable occurrences="1">
<code>$query</code>
</UndefinedVariable>
</file>
<file src="lib/Db/BoardMapper.php">
<ParamNameMismatch occurrences="1">
<code>$boardId</code>
@@ -184,6 +163,11 @@
<code>$stackId</code>
</ParamNameMismatch>
</file>
<file src="lib/Migration/Version10800Date20220422061816.php">
<MoreSpecificImplementedParamType occurrences="1">
<code>$schemaClosure</code>
</MoreSpecificImplementedParamType>
</file>
<file src="lib/Notification/Notifier.php">
<RedundantCast occurrences="4">
<code>(string) $l-&gt;t('%s has mentioned you in a comment on "%s".', [$dn, $params[0]])</code>