Skip to content

Commit fa929d0

Browse files
committed
#3357 nextclouddeckdialog: add card archiving and deleting
Signed-off-by: Patrizio Bekerle <patrizio@bekerle.com>
1 parent d80cc16 commit fa929d0

File tree

5 files changed

+499
-310
lines changed

5 files changed

+499
-310
lines changed

CHANGELOG.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
## 25.9.2
44

5-
- Try to mitigate Nextcloud sync errors by not triggering an expiration of
5+
- Try to **mitigate Nextcloud sync errors** by not triggering an expiration of
66
trashed notes periodically, rather we want to do it after the note folder
77
was reloaded (for [#3359](https://github.com/pbek/QOwnNotes/issues/3359))
88
- The save button in the **Nextcloud Deck dialog** will now only insert a link
99
into the current note for new cards (for [#3357](https://github.com/pbek/QOwnNotes/issues/3357))
10-
- The Groq AI model list was updated (for [#3365](https://github.com/pbek/QOwnNotes/issues/3365), thank you, @Weej1)
11-
- The Slackware Build process was updated to use CMake and a 15.0 directory was added
10+
- You can now **archive** and **delete cards** in the **Nextcloud Deck dialog**
11+
(for [#3357](https://github.com/pbek/QOwnNotes/issues/3357))
12+
- The **Groq AI model list was updated** (for [#3365](https://github.com/pbek/QOwnNotes/issues/3365), thank you, @Weej1)
13+
- The **Slackware Build process was updated** to use CMake and a 15.0 directory was added
1214
(for [#3363](https://github.com/pbek/QOwnNotes/issues/3363), thank you, @fsLeg)
1315
- There was a new release of the **QOwnNotes Web Companion browser extension** 2025.9.0
1416
- The extension was migrated to the latest version of Quasar to mitigate security issues

src/dialogs/nextclouddeckdialog.cpp

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,32 @@ void NextcloudDeckDialog::on_newItemEdit_returnPressed() {
294294
ui->dueDateTimeCheckBox->setChecked(true);
295295
}
296296

297-
void NextcloudDeckDialog::on_deleteCardButton_clicked() {}
297+
void NextcloudDeckDialog::on_deleteCardButton_clicked() {
298+
if (Utils::Gui::question(this, tr("Delete card"),
299+
tr("Do you want to delete the current Nextcloud Deck card?"),
300+
QStringLiteral("nextcloud-deck-delete")) != QMessageBox::Yes) {
301+
return;
302+
}
303+
304+
NextcloudDeckService nextcloudDeckService(this);
305+
bool isSuccess = nextcloudDeckService.deleteCard(_currentCard.id);
306+
307+
if (isSuccess) {
308+
reloadCardList();
309+
}
310+
}
298311

299-
void NextcloudDeckDialog::on_archiveCardButton_clicked() {}
312+
void NextcloudDeckDialog::on_archiveCardButton_clicked() {
313+
if (Utils::Gui::question(this, tr("Archive card"),
314+
tr("Do you want to archive the current Nextcloud Deck card?"),
315+
QStringLiteral("nextcloud-deck-archive")) != QMessageBox::Yes) {
316+
return;
317+
}
318+
319+
NextcloudDeckService nextcloudDeckService(this);
320+
bool isSuccess = nextcloudDeckService.archiveCard(_currentCard.id);
321+
322+
if (isSuccess) {
323+
reloadCardList();
324+
}
325+
}

0 commit comments

Comments
 (0)