diff --git a/src/App.vue b/src/App.vue index c84eefca..b59fec19 100644 --- a/src/App.vue +++ b/src/App.vue @@ -309,6 +309,19 @@ {{ $t('Ack') }} + + + + notes + + + {{ $t('Notes') }} + + + + + + + + + + + + @@ -513,7 +551,16 @@ export default { Snackbar }, props: [], - data: () => ({ + data: vm => ({ + showAddNoteForm: false, + text: '', + valid: true, + maxNoteLength: 200, + minNoteLength: 0, + textRules: [ + v => !!v || i18n.t('TextIsRequired'), + v => (v && v.length <= vm.maxNoteLength) || `${i18n.t('TextMustBeLessThan')} ${vm.maxNoteLength} ${i18n.t('characters')}` + ], hasFocus: false, menu: false, message: false, @@ -764,6 +811,13 @@ export default { }) .reduce(() => this.clearSelected()) }, + bulkAddNotes() { + Promise.all(this.selected.map(a => this.$store.dispatch('alerts/addNote', [a.id, this.text]))).then(() => { + this.showAddNoteForm = false + this.clearSelected() + this.text='' + }) + }, bulkShelveAlert() { Promise.all(this.selected.map(a => { this.$store diff --git a/src/locales/de.js b/src/locales/de.js index d4964b1b..9139ccaf 100644 --- a/src/locales/de.js +++ b/src/locales/de.js @@ -70,6 +70,7 @@ export const de = { Unshelve: 'Unshelve', Close: 'Schließen', Watch: 'Beobachten', + Notes: 'Notities', Unwatch: 'Nicht beobachten', AddNote: 'Notiz hinzufügen', Delete: 'Löschen', diff --git a/src/locales/en.js b/src/locales/en.js index b4df45d3..9f8aa069 100644 --- a/src/locales/en.js +++ b/src/locales/en.js @@ -70,6 +70,7 @@ export const en = { Unshelve: 'Unshelve', Close: 'Close', Watch: 'Watch', + Notes: 'Notes', Unwatch: 'Unwatch', AddNote: 'Add note', Delete: 'Delete', diff --git a/src/locales/fr.js b/src/locales/fr.js index 307f8de9..62e70ed0 100644 --- a/src/locales/fr.js +++ b/src/locales/fr.js @@ -70,6 +70,7 @@ export const fr = { Unshelve: 'Unshelve', Close: 'Close', //'Fermé', Watch: 'Watch', //'Surveiller', + Notes: 'Notes', // 'Remarques' Unwatch: 'Unwatch', //'Ne plus surveiller', AddNote: 'Add note', //'Ajouter Note', Delete: 'Delete', //'Supprimer', diff --git a/src/locales/tr.js b/src/locales/tr.js index bd25fbb7..a85a3b63 100644 --- a/src/locales/tr.js +++ b/src/locales/tr.js @@ -70,6 +70,7 @@ export const tr = { Unshelve: 'Raftan kaldır', Close: 'Kapat', Watch: 'İzle', + Notes: 'Notlar', Unwatch: 'İzleme kaldır', AddNote: 'Not ekle', Delete: 'Sil',