summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/SkNoteSub.vue
diff options
context:
space:
mode:
authorMar0xy <marie@kaifa.ch>2023-12-04 00:19:34 +0100
committerMar0xy <marie@kaifa.ch>2023-12-04 00:19:34 +0100
commitfb75282ea8c71fd4dfc08c885fe099f2f1e2baba (patch)
treeb0d1850acb55c3122f81e7f41dc4c0a01f0d5c66 /packages/frontend/src/components/SkNoteSub.vue
parentfix: quotes showing in replies on a note (diff)
downloadsharkey-fb75282ea8c71fd4dfc08c885fe099f2f1e2baba.tar.gz
sharkey-fb75282ea8c71fd4dfc08c885fe099f2f1e2baba.tar.bz2
sharkey-fb75282ea8c71fd4dfc08c885fe099f2f1e2baba.zip
add: choose boost visibility when clicking boost
Closes transfem-org/Sharkey#195
Diffstat (limited to 'packages/frontend/src/components/SkNoteSub.vue')
-rw-r--r--packages/frontend/src/components/SkNoteSub.vue42
1 files changed, 40 insertions, 2 deletions
diff --git a/packages/frontend/src/components/SkNoteSub.vue b/packages/frontend/src/components/SkNoteSub.vue
index c537fc902b..cc44f42177 100644
--- a/packages/frontend/src/components/SkNoteSub.vue
+++ b/packages/frontend/src/components/SkNoteSub.vue
@@ -39,7 +39,7 @@ SPDX-License-Identifier: AGPL-3.0-only
class="_button"
:class="$style.noteFooterButton"
:style="renoted ? 'color: var(--accent) !important;' : ''"
- @mousedown="renoted ? undoRenote() : renote()"
+ @mousedown="renoted ? undoRenote() : boostVisibility()"
>
<i class="ph-rocket-launch ph-bold ph-lg"></i>
<p v-if="note.renoteCount > 0" :class="$style.noteFooterButtonCount">{{ note.renoteCount }}</p>
@@ -261,7 +261,43 @@ watch(() => props.expandAllCws, (expandAllCws) => {
let replies: Misskey.entities.Note[] = $ref([]);
-function renote() {
+function boostVisibility() {
+ os.popupMenu([
+ {
+ type: 'button',
+ icon: 'ph-globe-hemisphere-west ph-bold ph-lg',
+ text: i18n.ts._visibility['public'],
+ action: () => {
+ renote('public');
+ },
+ },
+ {
+ type: 'button',
+ icon: 'ph-house ph-bold ph-lg',
+ text: i18n.ts._visibility['home'],
+ action: () => {
+ renote('home');
+ },
+ },
+ {
+ type: 'button',
+ icon: 'ph-lock ph-bold ph-lg',
+ text: i18n.ts._visibility['followers'],
+ action: () => {
+ renote('followers');
+ },
+ },
+ {
+ type: 'button',
+ icon: 'ph-planet ph-bold ph-lg',
+ text: i18n.ts._timelines.local,
+ action: () => {
+ renote('local');
+ },
+ }], renoteButton.value);
+}
+
+function renote(visibility: 'public' | 'home' | 'followers' | 'specified' | 'local') {
pleaseLogin();
showMovedDialog();
@@ -292,6 +328,8 @@ function renote() {
os.api('notes/create', {
renoteId: props.note.id,
+ localOnly: visibility === 'local' ? true : false,
+ visibility: visibility === 'local' ? props.note.visibility : visibility,
}).then(() => {
os.toast(i18n.ts.renoted);
renoted.value = true;