diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f270bfeaf..7164eb2656 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Added +- Added Report button to status ellipsis menu for easier reporting + ### Fixed - Follows/Followers tabs on user profiles now display the content properly. - Handle punycode in screen names diff --git a/src/components/account_actions/account_actions.js b/src/components/account_actions/account_actions.js index 395d6685e1..e53c4f773d 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 b5b29e8a5a..dd45b6b9f9 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 dc790cad7e..e845d8fc5a 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" />{{ $t("status.external_source") }} + 0 会同设置成零一样", - "inset_classic": "插入内部的阴影会使用 {0}" + "inset_classic": "内阴影会使用 {0}" }, "components": { "panel": "面板", @@ -459,13 +462,14 @@ "topBar": "顶栏", "avatar": "用户头像(在个人资料栏)", "avatarStatus": "用户头像(在帖子显示栏)", - "popup": "弹窗和工具提示", + "popup": "弹窗与工具提示", "button": "按钮", "buttonHover": "按钮(悬停)", - "buttonPressed": "按钮(按下)", - "buttonPressedHover": "按钮(按下和悬停)", + "buttonPressed": "按钮(压下)", + "buttonPressedHover": "按钮(压下和悬停)", "input": "输入框" - } + }, + "hintV3": "对于阴影,您还可以使用 {0} 表示法来使用其它颜色插槽。" }, "fonts": { "_tab_label": "字体", @@ -478,22 +482,22 @@ }, "family": "字体名称", "size": "大小 (in px)", - "weight": "字重 (粗体))", + "weight": "字重 (粗体)", "custom": "自选" }, "preview": { "header": "预览", "content": "内容", - "error": "例子错误", + "error": "错误示例", "button": "按钮", "text": "有堆 {0} 和 {1}", - "mono": "内容", - "input": "刚刚抵达上海", - "faint_link": "帮助菜单", + "mono": "monospace 内容", + "input": "刚刚抵达上海。", + "faint_link": "帮助手册", "fine_print": "阅读我们的 {0} ,然而什么也学不到!", "header_faint": "这很正常", - "checkbox": "我已经浏览了 TOC", - "link": "一个很棒的摇滚链接" + "checkbox": "我已经浏览了条款及细则", + "link": "一个棒棒的小小链接" } }, "version": { @@ -519,11 +523,11 @@ "type_domains_to_mute": "搜索需要隐藏的域名", "useStreamingApi": "实时接收帖子和通知", "user_mutes": "用户", - "reset_background_confirm": "您确定要重置个人资料背景图吗?", + "reset_background_confirm": "您确定要重置背景图吗?", "reset_banner_confirm": "您确定要重置横幅图片吗?", "reset_avatar_confirm": "您确定要重置头像吗?", "reset_profile_banner": "重置横幅图片", - "reset_profile_background": "重置个人资料背景图", + "reset_profile_background": "重置个人背景图", "reset_avatar": "重置头像", "hide_followers_count_description": "不显示关注者数量", "profile_fields": { @@ -547,7 +551,8 @@ "mute_import_error": "导入隐藏名单出错", "mute_import": "隐藏名单导入", "mute_export_button": "导出你的隐藏名单到一个 csv 文件", - "mute_export": "隐藏名单导出" + "mute_export": "隐藏名单导出", + "hide_wallpaper": "隐藏实例壁纸" }, "time": { "day": "{0} 天", @@ -588,16 +593,17 @@ "conversation": "对话", "error_fetching": "获取更新时发生错误", "load_older": "加载更早的状态", - "no_retweet_hint": "这条内容仅关注者可见,或者是私信,因此不能转发。", - "repeated": "已转发", + "no_retweet_hint": "这条内容仅关注者可见,或者是私信,因此不能转发", + "repeated": "转发了", "show_new": "显示新内容", "up_to_date": "已是最新", "no_more_statuses": "没有更多的状态", "no_statuses": "没有状态更新", - "reload": "重新载入" + "reload": "重新载入", + "error": "取得时间轴时发生错误:{0}" }, "status": { - "favorites": "收藏", + "favorites": "喜欢", "repeats": "转发", "delete": "删除状态", "pin": "在个人资料置顶", @@ -618,24 +624,27 @@ "unbookmark": "取消书签", "bookmark": "书签", "thread_muted_and_words": ",含有过滤词:", - "status_deleted": "该状态已被删除" + "status_deleted": "该状态已被删除", + "nsfw": "NSFW", + "external_source": "外部来源", + "expand": "展开" }, "user_card": { - "approve": "允许", + "approve": "核准", "block": "屏蔽", "blocked": "已屏蔽!", "deny": "拒绝", - "favorites": "收藏", + "favorites": "喜欢", "follow": "关注", "follow_sent": "请求已发送!", - "follow_progress": "请求中", + "follow_progress": "请求中…", "follow_again": "再次发送请求?", "follow_unfollow": "取消关注", "followees": "正在关注", "followers": "关注者", "following": "正在关注!", "follows_you": "关注了你!", - "its_you": "就是你!!", + "its_you": "就是你!", "media": "媒体", "mute": "隐藏", "muted": "已隐藏", @@ -652,7 +661,7 @@ "unmute_progress": "取消隐藏中…", "mute_progress": "隐藏中…", "admin_menu": { - "moderation": "权限", + "moderation": "仲裁", "grant_admin": "赋予管理权限", "revoke_admin": "撤销管理权限", "grant_moderator": "赋予监察员权限", @@ -685,7 +694,7 @@ "title": "报告 {0}", "add_comment_description": "此报告会发送给您的实例监察员。您可以在下面提供更多详细信息解释报告的缘由:", "additional_comments": "其它信息", - "forward_description": "这个账号是从另外一个服务器。同时发送一个副本到那里?", + "forward_description": "这个账号来自另一个服务器。是否同时发送一份报告副本到那里?", "forward_to": "转发 {0}", "submit": "提交", "generic_error": "当处理您的请求时,发生了一个错误。" @@ -695,10 +704,10 @@ "who_to_follow": "推荐关注" }, "tool_tip": { - "media_upload": "上传多媒体", + "media_upload": "上传媒体", "repeat": "转发", "reply": "回复", - "favorite": "收藏", + "favorite": "喜欢", "user_settings": "用户设置", "reject_follow_request": "拒绝关注请求", "add_reaction": "添加互动", @@ -709,7 +718,8 @@ "error": { "base": "上传不成功。", "file_too_big": "文件太大了 [{filesize}{filesizeunit} / {allowedsize}{allowedsizeunit}]", - "default": "迟些再试" + "default": "迟些再试", + "message": "上传错误:{0}" }, "file_size_units": { "B": "B", @@ -772,7 +782,7 @@ "ftl_removal": "从“全部已知网络”时间线上移除" }, "mrf_policies_desc": "MRF 策略会影响本实例的互通行为。以下策略已启用:", - "mrf_policies": "已启动的 MRF 策略", + "mrf_policies": "已启用的 MRF 策略", "keyword": { "ftl_removal": "从“全部已知网络”时间线上移除", "keyword_policies": "关键词策略", diff --git a/src/i18n/zh_Hant.json b/src/i18n/zh_Hant.json index f26251161f..f63acab832 100644 --- a/src/i18n/zh_Hant.json +++ b/src/i18n/zh_Hant.json @@ -35,7 +35,8 @@ "follow_request": "想要關注你", "followed_you": "關注了你", "favorited_you": "喜歡了你的發文", - "broken_favorite": "未知的狀態,正在搜索中…" + "broken_favorite": "未知的狀態,正在搜索中…", + "error": "獲取通知錯誤:{0}" }, "nav": { "chats": "聊天", @@ -121,7 +122,8 @@ "media_proxy": "媒體代理", "pleroma_chat_messages": "Pleroma 聊天", "chat": "聊天", - "gopher": "Gopher" + "gopher": "Gopher", + "upload_limit": "上傳限制" }, "exporter": { "processing": "正在處理,稍後會提示您下載文件", @@ -351,7 +353,7 @@ "reset_avatar": "重置頭像", "discoverable": "允許通過搜索檢索等服務找到此賬號", "delete_account_error": "刪除賬戶時發生錯誤,如果一直刪除不了,請聯繫實例管理員。", - "composing": "正在書寫", + "composing": "寫作設置", "chatMessageRadius": "聊天訊息", "mfa": { "confirm_and_enable": "確認並啟用OTP", diff --git a/src/modules/reports.js b/src/modules/reports.js index 904022f1b1..fea83e5f07 100644 --- a/src/modules/reports.js +++ b/src/modules/reports.js @@ -4,12 +4,14 @@ const reports = { state: { userId: null, statuses: [], + preTickedIds: [], modalActivated: false }, mutations: { - openUserReportingModal (state, { userId, statuses }) { + openUserReportingModal (state, { userId, statuses, preTickedIds }) { state.userId = userId state.statuses = statuses + state.preTickedIds = preTickedIds state.modalActivated = true }, closeUserReportingModal (state) { @@ -17,9 +19,15 @@ const reports = { } }, actions: { - openUserReportingModal ({ rootState, commit }, userId) { - const statuses = filter(rootState.statuses.allStatuses, status => status.user.id === userId) - commit('openUserReportingModal', { userId, statuses }) + openUserReportingModal ({ rootState, commit }, { userId, statusIds = [] }) { + const preTickedStatuses = statusIds.map(id => rootState.statuses.allStatusesObject[id]) + const preTickedIds = statusIds + const statuses = preTickedStatuses.concat( + filter(rootState.statuses.allStatuses, + status => status.user.id === userId && !preTickedIds.includes(status.id) + ) + ) + commit('openUserReportingModal', { userId, statuses, preTickedIds }) }, closeUserReportingModal ({ commit }) { commit('closeUserReportingModal')