Skip to content

Commit 98e04a0

Browse files
committed
feat(ui): Add rename/delete category actions in the sidebar
Signed-off-by: Grigorij Aronov <aronovgj@gmx.net>
2 parents 22e83c9 + ea948f0 commit 98e04a0

4 files changed

Lines changed: 37 additions & 1 deletion

File tree

.github/workflows/playwright.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout app
19-
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
19+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2020
with:
2121
persist-credentials: false
2222

l10n/pl.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ OC.L10N.register(
1818
"Notes settings" : "Ustawienia Notatek",
1919
"Please see Nextcloud server log for details." : "Szczegółowe informacje można znaleźć w dzienniku serwera Nextcloud.",
2020
"Custom" : "Niestandardowe",
21+
"Rich text" : "Tekst sformatowany",
22+
"Plain text" : "Zwykły tekst",
2123
"Preview" : "Podgląd",
2224
"Make the selection bold" : "Pogrub zaznaczenie",
2325
"Make the selection italic" : "Zaznacz kursywą",
@@ -33,8 +35,13 @@ OC.L10N.register(
3335
"Switch between editor and viewer" : "Przełączaj się między edytorem a przeglądarką",
3436
"Pick a notes folder" : "Wybierz katalog notatek",
3537
"Set notes folder" : "Ustaw katalog notatek",
38+
"General" : "Ogólne",
3639
"Display" : "Wyświetlanie",
3740
"File extension" : "Rozszerzenie pliku",
41+
"For new notes" : "Dla nowych notatek",
42+
"Custom file extension" : "Niestandardowe rozszerzenie pliku",
43+
"Files" : "Pliki",
44+
"Notes folder" : "Katalog notatek",
3845
"Mobile apps" : "Aplikacje mobilne",
3946
"Shortcuts" : "Skróty",
4047
"All notes" : "Wszystkie notatki",
@@ -46,6 +53,8 @@ OC.L10N.register(
4653
"Wrong image" : "Nieprawidłowy obraz",
4754
"The file was not uploaded. Check your server logs." : "Plik nie został wysłany. Sprawdź logi serwera.",
4855
"Upload image" : "Wyślij obraz",
56+
"Android" : "Android",
57+
"iPhone and iPad" : "iPhone i iPad",
4958
"Rich text editor" : "Zasobny edytor tekstu",
5059
"You can now switch to use the easy to use and distraction free rich text editor. It allows you to edit notes without seeing any Markdown marks." : "Możesz teraz przełączyć się na łatwy w obsłudze i wolny od znaczników edytor tekstu sformatowanego. Pozwala edytować notatki bez wyświetlania żadnych znaczników Markdown.",
5160
"This option can also be changed later on in the Notes app settings." : "Ta opcja może zostać zmieniona później w ustawieniach aplikacji Notatki.",

l10n/pl.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
"Notes settings" : "Ustawienia Notatek",
1717
"Please see Nextcloud server log for details." : "Szczegółowe informacje można znaleźć w dzienniku serwera Nextcloud.",
1818
"Custom" : "Niestandardowe",
19+
"Rich text" : "Tekst sformatowany",
20+
"Plain text" : "Zwykły tekst",
1921
"Preview" : "Podgląd",
2022
"Make the selection bold" : "Pogrub zaznaczenie",
2123
"Make the selection italic" : "Zaznacz kursywą",
@@ -31,8 +33,13 @@
3133
"Switch between editor and viewer" : "Przełączaj się między edytorem a przeglądarką",
3234
"Pick a notes folder" : "Wybierz katalog notatek",
3335
"Set notes folder" : "Ustaw katalog notatek",
36+
"General" : "Ogólne",
3437
"Display" : "Wyświetlanie",
3538
"File extension" : "Rozszerzenie pliku",
39+
"For new notes" : "Dla nowych notatek",
40+
"Custom file extension" : "Niestandardowe rozszerzenie pliku",
41+
"Files" : "Pliki",
42+
"Notes folder" : "Katalog notatek",
3643
"Mobile apps" : "Aplikacje mobilne",
3744
"Shortcuts" : "Skróty",
3845
"All notes" : "Wszystkie notatki",
@@ -44,6 +51,8 @@
4451
"Wrong image" : "Nieprawidłowy obraz",
4552
"The file was not uploaded. Check your server logs." : "Plik nie został wysłany. Sprawdź logi serwera.",
4653
"Upload image" : "Wyślij obraz",
54+
"Android" : "Android",
55+
"iPhone and iPad" : "iPhone i iPad",
4756
"Rich text editor" : "Zasobny edytor tekstu",
4857
"You can now switch to use the easy to use and distraction free rich text editor. It allows you to edit notes without seeing any Markdown marks." : "Możesz teraz przełączyć się na łatwy w obsłudze i wolny od znaczników edytor tekstu sformatowanego. Pozwala edytować notatki bez wyświetlania żadnych znaczników Markdown.",
4958
"This option can also be changed later on in the Notes app settings." : "Ta opcja może zostać zmieniona później w ustawieniach aplikacji Notatki.",

src/components/NoteItem.vue

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ export default {
296296
async onDeleteNote() {
297297
this.loading.delete = true
298298
try {
299+
this.closeOpenNoteBeforeDelete()
299300
const note = await fetchNote(this.note.id)
300301
if (note.errorType) {
301302
throw new Error('Note has errors')
@@ -311,6 +312,23 @@ export default {
311312
this.actionsOpen = false
312313
}
313314
},
315+
closeOpenNoteBeforeDelete() {
316+
const openNoteId = Number.parseInt(this.$route?.params?.noteId, 10)
317+
if (!Number.isFinite(openNoteId) || openNoteId !== this.note.id) {
318+
return
319+
}
320+
const remainingNote = this.$store.state.notes.notes.find(other => (
321+
other.id !== this.note.id && !other.deleting
322+
))
323+
if (remainingNote) {
324+
this.$router.push({
325+
name: 'note',
326+
params: { noteId: remainingNote.id.toString() },
327+
})
328+
} else {
329+
this.$router.push({ name: 'welcome' })
330+
}
331+
},
314332
onToggleSharing() {
315333
if (window?.OCA?.Files?.Sidebar?.setActiveTab) {
316334
emit('toggle-navigation', { open: false })

0 commit comments

Comments
 (0)