From fa0e65cc1b3bfda6a87239a17b4cdf0aa64499e8 Mon Sep 17 00:00:00 2001 From: naskya Date: Wed, 21 Feb 2024 07:24:52 +0900 Subject: [PATCH] feat (client): add private visibility --- docs/changelog.md | 2 ++ locales/en-US.yml | 4 +++- locales/ja-JP.yml | 2 ++ locales/zh-CN.yml | 2 ++ locales/zh-TW.yml | 2 ++ packages/client/src/components/MkPostForm.vue | 16 +++++++++---- .../client/src/components/MkVisibility.vue | 18 +++++++++++++-- .../src/components/MkVisibilityPicker.vue | 23 ++++++++++++++++++- .../client/src/pages/settings/privacy.vue | 8 +++++++ packages/client/src/store.ts | 7 +++++- 10 files changed, 75 insertions(+), 9 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index 517a565e7b..2e02b5eb2d 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -6,6 +6,8 @@ Critical security updates are indicated by the :warning: icon. - Add the ability to give regular (non-moderator) users permission to manage custom emojis - Fix a bug that made impossible to update user profiles under some conditions +- Add "private" (only me) post visibility + - It's just a paraphrase of DMs without recipients ## :warning: v20240217-1 diff --git a/locales/en-US.yml b/locales/en-US.yml index 64e5ba4c2f..6f2b3c3eca 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -1172,12 +1172,14 @@ postSearch: "Post search on this server" showBigPostButton: "Show a huge post button on the posting form" emojiModPerm: "Custom emoji management permission" emojiModPermDescription: "Add: Allow this user to add new custom emojis and to set tag/category/license to newly added custom emojis.\nAdd and Edit: \"Add\" Permission + Allow this user to edit the name/category/tag/license of the existing custom emojis.\nAllow All: \"Add and Edit\" Permission + Allow this user to delete existing custom emojis." +private: "Private" +privateDescription: "Make visible for you only" + _emojiModPerm: unauthorized: "None" add: "Add" mod: "Add and Edit" full: "Allow All" - _sensitiveMediaDetection: description: "Reduces the effort of server moderation through automatically recognizing NSFW media via Machine Learning. This will slightly increase the load on the server." diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 0e02e486a8..8daa360001 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -2026,3 +2026,5 @@ _emojiModPerm: add: "追加" mod: "追加と変更" full: "全て許可" +private: "秘密" +privateDescription: "あなた以外には非公開" diff --git a/locales/zh-CN.yml b/locales/zh-CN.yml index dba8d63682..bc43214a69 100644 --- a/locales/zh-CN.yml +++ b/locales/zh-CN.yml @@ -1995,3 +1995,5 @@ languageForTranslation: 帖子翻译语言 vibrate: 播放振动 openServerInfo: 点击帖子上的服务器滚动条时显示服务器信息 clickToShowPatterns: 点击显示模块模式 +private: "秘密" +privateDescription: "仅你可见" diff --git a/locales/zh-TW.yml b/locales/zh-TW.yml index bfc34ce014..0eccaf8060 100644 --- a/locales/zh-TW.yml +++ b/locales/zh-TW.yml @@ -2012,3 +2012,5 @@ moreUrlsDescription: "請以下列形式輸入欲釘選在左下角幫助選單 showPreviewByDefault: "自動開啟發文介面中的預覽顯示" preventMisclick: "預防誤觸" hideFollowButtons: "隱藏會誤觸的追隨按鈕" +private: "祕密" +privateDescription: "僅你可見" diff --git a/packages/client/src/components/MkPostForm.vue b/packages/client/src/components/MkPostForm.vue index a58ce88459..cfc3cc9f2a 100644 --- a/packages/client/src/components/MkPostForm.vue +++ b/packages/client/src/components/MkPostForm.vue @@ -50,6 +50,9 @@ + +