From 75482bb4b30d8157bf76b7a18a431244e69861f8 Mon Sep 17 00:00:00 2001 From: sim1222 Date: Wed, 9 Feb 2022 22:47:55 +0900 Subject: [PATCH] feat: Add renote home only button --- locales/en-US.yml | 1 + locales/ja-JP.yml | 1 + packages/client/src/components/renote-button.vue | 9 +++++++++ 3 files changed, 11 insertions(+) diff --git a/locales/en-US.yml b/locales/en-US.yml index 42bbcf89f..cfda37cdd 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -94,6 +94,7 @@ unfollow: "Unfollow" followRequestPending: "Pending follow request" enterEmoji: "Enter an emoji" renote: "Renote" +renoteHomeOnly: "Renote to home only" renoteFollowersOnly: "Renote to followers only" unrenote: "Take back renote" renoted: "Renoted." diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index df7e2627d..48d1d6262 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -94,6 +94,7 @@ unfollow: "フォロー解除" followRequestPending: "フォロー許可待ち" enterEmoji: "絵文字を入力" renote: "Renote" +renoteHomeOnly: "ホームのみにRenote" renoteFollowersOnly: "鍵Renote" unrenote: "Renote解除" renoted: "Renoteしたよ。" diff --git a/packages/client/src/components/renote-button.vue b/packages/client/src/components/renote-button.vue index 03d700e17..ab4bfcca4 100644 --- a/packages/client/src/components/renote-button.vue +++ b/packages/client/src/components/renote-button.vue @@ -66,6 +66,15 @@ export default defineComponent({ renoteId: props.note.id }); } + },{ + text: i18n.ts.renoteHomeOnly, + icon: 'fas fa-unlock', + action: () => { + os.api('notes/create', { + renoteId: props.note.id, + visibility: 'home' + }); + } },{ text: i18n.ts.renoteFollowersOnly, icon: 'fas fa-unlock',