Compare commits

..

12 Commits

Author SHA1 Message Date
Julius Knorr
fb36579e03 Merge pull request #6674 from nextcloud/backport/6671/stable27
[stable27] fix: Properly show attachment extension
2025-04-29 09:16:06 +02:00
dependabot[bot]
3f7389d773 Chore(deps): Bump actions/upload-artifact from 3 to 4
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-28 19:02:42 +02:00
Julius Härtl
9746870ad6 fix: Properly show attachment extension
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2025-04-28 19:00:19 +02:00
Julius Knorr
89bb483a0d Merge pull request #6643 from nextcloud/backport/5859/stable27
[stable27] Update TrelloJsonService.php
2025-01-02 17:13:17 +01:00
mulles
1bbc19f9e0 Update TrelloJsonService.php
removed trailing white space, I am sorry for that thx for your patience.

Signed-off-by: mulles <com.github@emu.lu>
2025-01-02 14:58:49 +00:00
mulles
7467cca0cc Update TrelloJsonService.php
Fixes the following issue: https://github.com/nextcloud/deck/issues/5136
By fixing the following error when running 'php occ deck:import --system=TrelloJson'

Error: Call to a member function getUID() on string in /home/sites/site100028002/web/nextcloud.enklaave.org/apps/deck/lib/Service/Importer/Systems/TrelloJsonService.php:136

and 

Error: Call to a member function getUID() on string in /home/sites/site100028002/web/nextcloud.enklaave.org/apps/deck/lib/Service/Importer/Systems/TrelloJsonService.php:364


Signed-off-by: mulles <com.github@emu.lu>
2025-01-02 14:58:49 +00:00
grnd-alt
49996522e3 Merge pull request #6354 from nextcloud/release/1.11.7
bump version to 1.11.7
2024-09-24 13:28:38 +02:00
grnd-alt
0b52b7f945 bump version to 1.11.7
Signed-off-by: grnd-alt <salimbelakkaf@outlook.de>
2024-09-24 10:47:23 +02:00
Julius Knorr
2493566efb Merge pull request #6323 from nextcloud/backport/6309/stable27
[stable27] fix: Load archived card if URL is opened directly
2024-09-17 18:32:41 +02:00
Julius Knorr
81d081f12d fix: Load archived card if URL is opened directly
Signed-off-by: Julius Knorr <jus@bitgrid.net>
2024-09-16 13:42:20 +00:00
Julius Härtl
3fa6123e53 chore(release): Bump version to 1.11.6
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-08-22 11:36:21 +02:00
grnd-alt
06f209ed04 Merge pull request #6202 from nextcloud/backport/6201/stable27
[stable27] use deleted_users for users that do not exist
2024-08-13 13:49:06 +02:00
13 changed files with 69 additions and 18 deletions

View File

@@ -37,7 +37,7 @@ jobs:
uname -a uname -a
RUST_BACKTRACE=1 krankerl --version RUST_BACKTRACE=1 krankerl --version
RUST_BACKTRACE=1 krankerl package RUST_BACKTRACE=1 krankerl package
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v4
with: with:
name: Deck app tarball name: Deck app tarball
path: build/artifacts/deck.tar.gz path: build/artifacts/deck.tar.gz

View File

@@ -108,7 +108,7 @@ jobs:
npm_package_name: ${{ env.APP_NAME }} npm_package_name: ${{ env.APP_NAME }}
- name: Upload test failure screenshots - name: Upload test failure screenshots
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
if: failure() if: failure()
with: with:
name: Upload screenshots name: Upload screenshots
@@ -116,7 +116,7 @@ jobs:
retention-days: 5 retention-days: 5
- name: Upload nextcloud logs - name: Upload nextcloud logs
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
if: failure() if: failure()
with: with:
name: Upload nextcloud log name: Upload nextcloud log

View File

@@ -1,9 +1,21 @@
# Changelog # Changelog
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## 1.11.7
### Fixed
- fix: Load archived card if URL is opened directly #6323
## 1.11.6
### Fixed
- fix: Avoid optional before required parameter [#6094](https://github.com/nextcloud/deck/pull/6094)
- use deleted_users for users that do not exist [#6202](https://github.com/nextcloud/deck/pull/6202)
## 1.11.5 ## 1.11.5
### Fixed ### Fixed
- don't reset update time when no update was written to db #6036 - don't reset update time when no update was written to db #6036
- fix: Avoid conflicts on deck attachments folder name #5709 - fix: Avoid conflicts on deck attachments folder name #5709
- fix: permission check for cloning board #5856 - fix: permission check for cloning board #5856

View File

@@ -16,7 +16,7 @@
- 🚀 Get your project organized - 🚀 Get your project organized
</description> </description>
<version>1.11.5</version> <version>1.11.7</version>
<licence>agpl</licence> <licence>agpl</licence>
<author>Julius Härtl</author> <author>Julius Härtl</author>
<documentation> <documentation>

View File

@@ -114,7 +114,8 @@ describe('Card', function() {
cy.get('.file-picker__main [data-filename="welcome.txt"]').should('be.visible') cy.get('.file-picker__main [data-filename="welcome.txt"]').should('be.visible')
.click() .click()
cy.get('.dialog__actions button.button-vue--vue-primary').click() cy.get('.dialog__actions button.button-vue--vue-primary').click()
cy.get('.attachment-list .basename').contains('welcome.txt') cy.get('.attachment-list .filename').contains('welcome')
cy.get('.attachment-list .filename .extension').contains('txt')
}) })
it('Shows the modal with the editor', () => { it('Shows the modal with the editor', () => {

View File

@@ -133,7 +133,7 @@ class TrelloJsonService extends ABoardImportService {
$cardId = $this->cards[$trelloCard->id]->getId(); $cardId = $this->cards[$trelloCard->id]->getId();
$comment = new Comment(); $comment = new Comment();
if (!empty($this->getImportService()->getConfig('uidRelation')->{$trelloComment->memberCreator->username})) { if (!empty($this->getImportService()->getConfig('uidRelation')->{$trelloComment->memberCreator->username})) {
$actor = $this->getImportService()->getConfig('uidRelation')->{$trelloComment->memberCreator->username}->getUID(); $actor = $this->getImportService()->getConfig('uidRelation')->{$trelloComment->memberCreator->username};
} else { } else {
$actor = $this->getImportService()->getConfig('owner')->getUID(); $actor = $this->getImportService()->getConfig('owner')->getUID();
} }
@@ -361,7 +361,7 @@ class TrelloJsonService extends ABoardImportService {
private function replaceUsernames(string $text): string { private function replaceUsernames(string $text): string {
foreach ($this->getImportService()->getConfig('uidRelation') as $trello => $nextcloud) { foreach ($this->getImportService()->getConfig('uidRelation') as $trello => $nextcloud) {
$text = str_replace($trello, $nextcloud->getUID(), $text); $text = str_replace($trello, $nextcloud, $text);
} }
return $text; return $text;
} }

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "deck", "name": "deck",
"version": "1.11.5", "version": "1.11.7",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "deck", "name": "deck",
"version": "1.11.5", "version": "1.11.7",
"license": "agpl", "license": "agpl",
"dependencies": { "dependencies": {
"@babel/polyfill": "^7.12.1", "@babel/polyfill": "^7.12.1",

View File

@@ -1,7 +1,7 @@
{ {
"name": "deck", "name": "deck",
"description": "", "description": "",
"version": "1.11.5", "version": "1.11.7",
"authors": [ "authors": [
{ {
"name": "Julius Härtl", "name": "Julius Härtl",
@@ -105,4 +105,4 @@
"<rootDir>/node_modules/jest-serializer-vue" "<rootDir>/node_modules/jest-serializer-vue"
] ]
} }
} }

View File

@@ -160,6 +160,16 @@ export default {
await this.$store.dispatch('loadBoardById', this.id) await this.$store.dispatch('loadBoardById', this.id)
await this.$store.dispatch('loadStacks', this.id) await this.$store.dispatch('loadStacks', this.id)
const routeCardId = parseInt(this.$route.params.cardId)
// If an archived card is requested, and we cannot find it in the current we load the archived stacks instead
if (routeCardId && !this.$store.getters.cardById(routeCardId)) {
await this.$store.dispatch('loadArchivedStacks', this.id)
if (this.$store.getters.cardById(routeCardId)) {
this.$store.commit('toggleShowArchived', true)
}
}
this.session?.close() this.session?.close()
this.session = createSession(this.id) this.session = createSession(this.id)
} catch (e) { } catch (e) {

View File

@@ -41,7 +41,8 @@
<div class="details"> <div class="details">
<a> <a>
<div class="filename"> <div class="filename">
<span class="basename">{{ attachment.name }}</span> <span>{{ attachmentBasename(attachment) }}</span>
<span class="extension">.{{ attachmentExtension(attachment) }}</span>
</div> </div>
<progress :value="attachment.progress" max="100" /> <progress :value="attachment.progress" max="100" />
</a> </a>
@@ -58,7 +59,8 @@
<div class="details"> <div class="details">
<a :href="internalLink(attachment)" @click.prevent="showViewer(attachment)"> <a :href="internalLink(attachment)" @click.prevent="showViewer(attachment)">
<div class="filename"> <div class="filename">
<span class="basename">{{ attachment.data }}</span> <span>{{ attachmentBasename(attachment) }}</span>
<span class="extension">.{{ attachmentExtension(attachment) }}</span>
</div> </div>
<div v-if="attachment.deletedAt === 0"> <div v-if="attachment.deletedAt === 0">
<span class="filesize">{{ formattedFileSize(attachment.extendedData.filesize) }}</span> <span class="filesize">{{ formattedFileSize(attachment.extendedData.filesize) }}</span>
@@ -200,6 +202,14 @@ export default {
return t('deck', 'Drop your files to upload') return t('deck', 'Drop your files to upload')
} }
}, },
attachmentBasename() {
return (attachment) => attachment?.extendedData?.info.filename
?? (attachment?.name ?? attachment.data).replace(/\.[^/.]+$/, '')
},
attachmentExtension() {
return (attachment) => attachment?.extendedData?.info?.extension
?? (attachment?.name ?? attachment.data).split('.').pop()
},
}, },
watch: { watch: {
cardId: { cardId: {

View File

@@ -255,15 +255,18 @@ export default {
}, },
addAttachment(attachment) { addAttachment(attachment) {
const asImage = (attachment.type === 'file' && attachment.extendedData.hasPreview) || attachment.extendedData.mimetype.includes('image') const asImage = (attachment.type === 'file' && attachment.extendedData.hasPreview) || attachment.extendedData.mimetype.includes('image')
// We need to strip those as text does not support rtl yet, so we cannot insert them separately
const stripRTLO = (text) => text.replaceAll('\u202e', '')
const fileName = stripRTLO(attachment.extendedData.info.filename) + '.' + stripRTLO(attachment.extendedData.info.extension)
if (this.editor) { if (this.editor) {
this.editor.insertAtCursor( this.editor.insertAtCursor(
asImage asImage
? `<a href="${this.attachmentPreview(attachment)}"><img src="${this.attachmentPreview(attachment)}" alt="${attachment.data}" /></a>` ? `<a href="${this.attachmentPreview(attachment)}"><img src="${this.attachmentPreview(attachment)}" alt="${attachment.data}" /></a>`
: `<a href="${this.attachmentPreview(attachment)}">${attachment.data}</a>`, : `<a href="${this.attachmentPreview(attachment)}">${fileName}</a>`,
) )
return return
} else { } else {
const attachmentString = (asImage ? '!' : '') + '[📎 ' + attachment.data + '](' + this.attachmentPreview(attachment) + ')' const attachmentString = (asImage ? '!' : '') + '[📎 ' + fileName + '](' + this.attachmentPreview(attachment) + ')'
const descString = this.$refs.markdownEditor.easymde.value() const descString = this.$refs.markdownEditor.easymde.value()
const newContent = descString + '\n' + attachmentString const newContent = descString + '\n' + attachmentString
this.$refs.markdownEditor.easymde.value(newContent) this.$refs.markdownEditor.easymde.value(newContent)

View File

@@ -179,8 +179,8 @@ export default new Vuex.Store({
} }
}) })
}, },
toggleShowArchived(state) { toggleShowArchived(state, newState = undefined) {
state.showArchived = !state.showArchived state.showArchived = newState !== undefined ? newState : !state.showArchived
}, },
/* /*
* Adds or replaces a board in the store. * Adds or replaces a board in the store.

View File

@@ -95,6 +95,21 @@ export default {
} }
commit('setCards', cards) commit('setCards', cards)
}, },
async loadArchivedStacks({ commit, getters }, boardId) {
const archivedStacks = await apiClient.loadArchivedStacks(boardId)
const cards = []
for (const i in archivedStacks) {
const stack = archivedStacks[i]
for (const j in stack.cards) {
cards.push(stack.cards[j])
}
delete stack.cards
if (!getters.stackById(stack.id)) {
commit('addStack', stack)
}
}
commit('setCards', cards)
},
createStack({ commit }, stack) { createStack({ commit }, stack) {
stack.boardId = this.state.currentBoard.id stack.boardId = this.state.currentBoard.id
apiClient.createStack(stack) apiClient.createStack(stack)