diff --git a/src/views/reports/components/NoteCard.vue b/src/views/reports/components/NoteCard.vue index b4fc6225..a2a6a427 100644 --- a/src/views/reports/components/NoteCard.vue +++ b/src/views/reports/components/NoteCard.vue @@ -2,22 +2,14 @@
-
-
- -

{{ note.user.nickname }}

-
+
+ + {{ note.user.nickname }}
- - - {{ $t('reports.deleteNote') }} - - + + {{ $t('reports.deleteNote') }} +
@@ -44,14 +36,29 @@ export default { } }, methods: { - isValid(account) { - return account.nickname && account.id + handleNoteDeletion(noteID, reportID) { + this.$confirm('Are you sure you want to delete this note?', 'Warning', { + confirmButtonText: 'OK', + cancelButtonText: 'Cancel', + type: 'warning' + }).then(() => { + this.$store.dispatch('DeleteReportNote', { noteID, reportID }) + this.$message({ + type: 'success', + message: 'Delete completed' + }) + }).catch(() => { + this.$message({ + type: 'info', + message: 'Delete canceled' + }) + }) }, parseTimestamp(timestamp) { return moment(timestamp).format('YYYY-MM-DD HH:mm') }, - handleNoteDeletion(noteID, reportID) { - this.$store.dispatch('DeleteReportNote', { noteID, reportID }) + propertyExists(account, property) { + return account[property] } } } @@ -76,7 +83,7 @@ export default { } .note-actor-name { margin: 0; - height: 22px; + height: 28px; } .note-avatar-img { width: 15px; @@ -96,6 +103,10 @@ export default { .note-header { display: flex; justify-content: space-between; + align-items: center; + height: 28px; + font-size: 15px; + font-weight: 500; } @media only screen and (max-width:480px) { @@ -105,14 +116,15 @@ export default { .note-header { display: flex; flex-direction: column; - height: 80px; + height: 65px; } - .note-actor-container { + .note-actor { margin-bottom: 5px; } .note-header { display: flex; flex-direction: column; + align-items: flex-start; } } diff --git a/src/views/users/components/ModerationDropdown.vue b/src/views/users/components/ModerationDropdown.vue index b385fdbe..57d56562 100644 --- a/src/views/users/components/ModerationDropdown.vue +++ b/src/views/users/components/ModerationDropdown.vue @@ -1,10 +1,10 @@