aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/account_actions/account_actions.js2
-rw-r--r--src/components/extra_buttons/extra_buttons.js9
-rw-r--r--src/components/extra_buttons/extra_buttons.vue10
-rw-r--r--src/components/interface_language_switcher/interface_language_switcher.vue3
-rw-r--r--src/components/status/status.js1
-rw-r--r--src/components/user_reporting_modal/user_reporting_modal.js10
6 files changed, 29 insertions, 6 deletions
diff --git a/src/components/account_actions/account_actions.js b/src/components/account_actions/account_actions.js
index 395d6685..e53c4f77 100644
--- a/src/components/account_actions/account_actions.js
+++ b/src/components/account_actions/account_actions.js
@@ -35,7 +35,7 @@ const AccountActions = {
this.$store.dispatch('unblockUser', this.user.id)
},
reportUser () {
- this.$store.dispatch('openUserReportingModal', this.user.id)
+ this.$store.dispatch('openUserReportingModal', { userId: this.user.id })
},
openChat () {
this.$router.push({
diff --git a/src/components/extra_buttons/extra_buttons.js b/src/components/extra_buttons/extra_buttons.js
index b5b29e8a..dd45b6b9 100644
--- a/src/components/extra_buttons/extra_buttons.js
+++ b/src/components/extra_buttons/extra_buttons.js
@@ -9,7 +9,8 @@ import {
faExternalLinkAlt
} from '@fortawesome/free-solid-svg-icons'
import {
- faBookmark as faBookmarkReg
+ faBookmark as faBookmarkReg,
+ faFlag
} from '@fortawesome/free-regular-svg-icons'
library.add(
@@ -19,7 +20,8 @@ library.add(
faEyeSlash,
faThumbtack,
faShareAlt,
- faExternalLinkAlt
+ faExternalLinkAlt,
+ faFlag
)
const ExtraButtons = {
@@ -66,6 +68,9 @@ const ExtraButtons = {
this.$store.dispatch('unbookmark', { id: this.status.id })
.then(() => this.$emit('onSuccess'))
.catch(err => this.$emit('onError', err.error.error))
+ },
+ reportStatus () {
+ this.$store.dispatch('openUserReportingModal', { userId: this.status.user.id, statusIds: [this.status.id] })
}
},
computed: {
diff --git a/src/components/extra_buttons/extra_buttons.vue b/src/components/extra_buttons/extra_buttons.vue
index dc790cad..e845d8fc 100644
--- a/src/components/extra_buttons/extra_buttons.vue
+++ b/src/components/extra_buttons/extra_buttons.vue
@@ -109,6 +109,16 @@
icon="external-link-alt"
/><span>{{ $t("status.external_source") }}</span>
</a>
+ <button
+ class="button-default dropdown-item dropdown-item-icon"
+ @click.prevent="reportStatus"
+ @click="close"
+ >
+ <FAIcon
+ fixed-width
+ :icon="['far', 'flag']"
+ /><span>{{ $t("user_card.report") }}</span>
+ </button>
</div>
</div>
<span
diff --git a/src/components/interface_language_switcher/interface_language_switcher.vue b/src/components/interface_language_switcher/interface_language_switcher.vue
index d039e86b..524ec5e9 100644
--- a/src/components/interface_language_switcher/interface_language_switcher.vue
+++ b/src/components/interface_language_switcher/interface_language_switcher.vue
@@ -63,7 +63,8 @@ export default {
const specialLanguageNames = {
'ja': 'Japanese (日本語)',
'ja_easy': 'Japanese (やさしいにほんご)',
- 'zh': 'Chinese (简体中文)'
+ 'zh': 'Simplified Chinese (简体中文)',
+ 'zh_Hant': 'Traditional Chinese (繁體中文)'
}
return specialLanguageNames[code] || ISO6391.getName(code)
}
diff --git a/src/components/status/status.js b/src/components/status/status.js
index f9c710ab..2bf93a9e 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -157,6 +157,7 @@ const Status = {
return muteWordHits(this.status, this.muteWords)
},
muted () {
+ if (this.statusoid.user.id === this.currentUser.id) return false
const { status } = this
const { reblog } = status
const relationship = this.$store.getters.relationship(status.user.id)
diff --git a/src/components/user_reporting_modal/user_reporting_modal.js b/src/components/user_reporting_modal/user_reporting_modal.js
index 38cf117b..8d171b2d 100644
--- a/src/components/user_reporting_modal/user_reporting_modal.js
+++ b/src/components/user_reporting_modal/user_reporting_modal.js
@@ -38,17 +38,23 @@ const UserReportingModal = {
},
statuses () {
return this.$store.state.reports.statuses
+ },
+ preTickedIds () {
+ return this.$store.state.reports.preTickedIds
}
},
watch: {
- userId: 'resetState'
+ userId: 'resetState',
+ preTickedIds (newValue) {
+ this.statusIdsToReport = newValue
+ }
},
methods: {
resetState () {
// Reset state
this.comment = ''
this.forward = false
- this.statusIdsToReport = []
+ this.statusIdsToReport = this.preTickedIds
this.processing = false
this.error = false
},