Seperate renote quote option
This commit is contained in:
parent
00b19a0445
commit
b97c1f0b4d
@ -794,6 +794,7 @@ customCssWarn: "This setting should only be used if you know what it does. Enter
|
|||||||
global: "Global"
|
global: "Global"
|
||||||
recommended: "Recommended"
|
recommended: "Recommended"
|
||||||
squareAvatars: "Display squared avatars"
|
squareAvatars: "Display squared avatars"
|
||||||
|
seperateRenoteQuote: "Seperate renote and quote buttons"
|
||||||
sent: "Sent"
|
sent: "Sent"
|
||||||
received: "Received"
|
received: "Received"
|
||||||
searchResult: "Search results"
|
searchResult: "Search results"
|
||||||
|
@ -793,6 +793,7 @@ customCss: "カスタムCSS"
|
|||||||
customCssWarn: "この設定は必ず知識のある方が行ってください。不適切な設定を行うとクライアントが正常に使用できなくなる恐れがあります。"
|
customCssWarn: "この設定は必ず知識のある方が行ってください。不適切な設定を行うとクライアントが正常に使用できなくなる恐れがあります。"
|
||||||
global: "グローバル"
|
global: "グローバル"
|
||||||
squareAvatars: "アイコンを四角形で表示"
|
squareAvatars: "アイコンを四角形で表示"
|
||||||
|
seperateRenoteQuote: "リノートと引用ボタンを分ける"
|
||||||
sent: "送信"
|
sent: "送信"
|
||||||
received: "受信"
|
received: "受信"
|
||||||
searchResult: "検索結果"
|
searchResult: "検索結果"
|
||||||
|
@ -77,6 +77,7 @@
|
|||||||
<p v-if="appearNote.repliesCount > 0" class="count">{{ appearNote.repliesCount }}</p>
|
<p v-if="appearNote.repliesCount > 0" class="count">{{ appearNote.repliesCount }}</p>
|
||||||
</button>
|
</button>
|
||||||
<XRenoteButton ref="renoteButton" class="button" :note="appearNote" :count="appearNote.renoteCount"/>
|
<XRenoteButton ref="renoteButton" class="button" :note="appearNote" :count="appearNote.renoteCount"/>
|
||||||
|
<XQuoteButton class="button" :note="appearNote"/>
|
||||||
<button v-if="appearNote.myReaction == null" ref="reactButton" class="button _button" @click="react()">
|
<button v-if="appearNote.myReaction == null" ref="reactButton" class="button _button" @click="react()">
|
||||||
<i class="fas fa-plus"></i>
|
<i class="fas fa-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
@ -113,6 +114,7 @@ import XMediaList from '@/components/MkMediaList.vue';
|
|||||||
import XCwButton from '@/components/MkCwButton.vue';
|
import XCwButton from '@/components/MkCwButton.vue';
|
||||||
import XPoll from '@/components/MkPoll.vue';
|
import XPoll from '@/components/MkPoll.vue';
|
||||||
import XRenoteButton from '@/components/MkRenoteButton.vue';
|
import XRenoteButton from '@/components/MkRenoteButton.vue';
|
||||||
|
import XQuoteButton from './quote-button.vue';
|
||||||
import MkUrlPreview from '@/components/MkUrlPreview.vue';
|
import MkUrlPreview from '@/components/MkUrlPreview.vue';
|
||||||
import MkInstanceTicker from '@/components/MkInstanceTicker.vue';
|
import MkInstanceTicker from '@/components/MkInstanceTicker.vue';
|
||||||
import MkVisibility from '@/components/MkVisibility.vue';
|
import MkVisibility from '@/components/MkVisibility.vue';
|
||||||
|
@ -87,6 +87,7 @@
|
|||||||
<p v-if="appearNote.repliesCount > 0" class="count">{{ appearNote.repliesCount }}</p>
|
<p v-if="appearNote.repliesCount > 0" class="count">{{ appearNote.repliesCount }}</p>
|
||||||
</button>
|
</button>
|
||||||
<XRenoteButton ref="renoteButton" class="button" :note="appearNote" :count="appearNote.renoteCount"/>
|
<XRenoteButton ref="renoteButton" class="button" :note="appearNote" :count="appearNote.renoteCount"/>
|
||||||
|
<XQuoteButton class="button" :note="appearNote"/>
|
||||||
<button v-if="appearNote.myReaction == null" ref="reactButton" class="button _button" @click="react()">
|
<button v-if="appearNote.myReaction == null" ref="reactButton" class="button _button" @click="react()">
|
||||||
<i class="fas fa-plus"></i>
|
<i class="fas fa-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
@ -123,6 +124,7 @@ import XMediaList from '@/components/MkMediaList.vue';
|
|||||||
import XCwButton from '@/components/MkCwButton.vue';
|
import XCwButton from '@/components/MkCwButton.vue';
|
||||||
import XPoll from '@/components/MkPoll.vue';
|
import XPoll from '@/components/MkPoll.vue';
|
||||||
import XRenoteButton from '@/components/MkRenoteButton.vue';
|
import XRenoteButton from '@/components/MkRenoteButton.vue';
|
||||||
|
import XQuoteButton from './quote-button.vue';
|
||||||
import MkUrlPreview from '@/components/MkUrlPreview.vue';
|
import MkUrlPreview from '@/components/MkUrlPreview.vue';
|
||||||
import MkInstanceTicker from '@/components/MkInstanceTicker.vue';
|
import MkInstanceTicker from '@/components/MkInstanceTicker.vue';
|
||||||
import MkVisibility from '@/components/MkVisibility.vue';
|
import MkVisibility from '@/components/MkVisibility.vue';
|
||||||
|
@ -22,6 +22,7 @@ import * as os from '@/os';
|
|||||||
import { $i } from '@/account';
|
import { $i } from '@/account';
|
||||||
import { useTooltip } from '@/scripts/use-tooltip';
|
import { useTooltip } from '@/scripts/use-tooltip';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
import { defaultStore } from "@/store";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: misskey.entities.Note;
|
||||||
@ -52,25 +53,33 @@ useTooltip(buttonRef, async (showing) => {
|
|||||||
|
|
||||||
const renote = (viaKeyboard = false) => {
|
const renote = (viaKeyboard = false) => {
|
||||||
pleaseLogin();
|
pleaseLogin();
|
||||||
os.popupMenu([{
|
if (defaultStore.state.seperateRenoteQuote) {
|
||||||
text: i18n.ts.renote,
|
os.api('notes/create', {
|
||||||
icon: 'fas fa-retweet',
|
renoteId: props.note.id,
|
||||||
action: () => {
|
visibility: props.note.visibility,
|
||||||
os.api('notes/create', {
|
});
|
||||||
renoteId: props.note.id,
|
} else {
|
||||||
});
|
os.popupMenu([{
|
||||||
},
|
text: i18n.ts.renote,
|
||||||
}, {
|
icon: 'fas fa-retweet',
|
||||||
text: i18n.ts.quote,
|
action: () => {
|
||||||
icon: 'fas fa-quote-right',
|
os.api('notes/create', {
|
||||||
action: () => {
|
renoteId: props.note.id,
|
||||||
os.post({
|
visibility: props.note.visibility,
|
||||||
renote: props.note,
|
});
|
||||||
});
|
},
|
||||||
},
|
}, {
|
||||||
}], buttonRef.value, {
|
text: i18n.ts.quote,
|
||||||
viaKeyboard,
|
icon: 'fas fa-quote-right',
|
||||||
});
|
action: () => {
|
||||||
|
os.post({
|
||||||
|
renote: props.note,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}], buttonRef.value, {
|
||||||
|
viaKeyboard,
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
50
packages/client/src/components/quote-button.vue
Normal file
50
packages/client/src/components/quote-button.vue
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
<template>
|
||||||
|
<button
|
||||||
|
v-if="canRenote && $store.state.seperateRenoteQuote"
|
||||||
|
class="eddddedb _button"
|
||||||
|
@click="quote()"
|
||||||
|
>
|
||||||
|
<i class="fas fa-quote-right"></i>
|
||||||
|
</button>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { computed } from 'vue';
|
||||||
|
import { Note } from 'foundkey-js/built/entities';
|
||||||
|
import { pleaseLogin } from '@/scripts/please-login';
|
||||||
|
import * as os from '@/os';
|
||||||
|
import { $i } from '@/account';
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
note: Note;
|
||||||
|
}>();
|
||||||
|
|
||||||
|
const canRenote = computed(() => ['public', 'home'].includes(props.note.visibility) || props.note.userId === $i?.id);
|
||||||
|
|
||||||
|
function quote(): void {
|
||||||
|
pleaseLogin();
|
||||||
|
os.post({
|
||||||
|
renote: props.note,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.eddddedb {
|
||||||
|
display: inline-block;
|
||||||
|
height: 32px;
|
||||||
|
margin: 2px;
|
||||||
|
padding: 0 6px;
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
&.renoted {
|
||||||
|
background: var(--accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
> .count {
|
||||||
|
display: inline;
|
||||||
|
margin-left: 8px;
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -51,6 +51,7 @@
|
|||||||
<FormSwitch v-model="loadRawImages" class="_formBlock">{{ i18n.ts.loadRawImages }}</FormSwitch>
|
<FormSwitch v-model="loadRawImages" class="_formBlock">{{ i18n.ts.loadRawImages }}</FormSwitch>
|
||||||
<FormSwitch v-model="disableShowingAnimatedImages" class="_formBlock">{{ i18n.ts.disableShowingAnimatedImages }}</FormSwitch>
|
<FormSwitch v-model="disableShowingAnimatedImages" class="_formBlock">{{ i18n.ts.disableShowingAnimatedImages }}</FormSwitch>
|
||||||
<FormSwitch v-model="squareAvatars" class="_formBlock">{{ i18n.ts.squareAvatars }}</FormSwitch>
|
<FormSwitch v-model="squareAvatars" class="_formBlock">{{ i18n.ts.squareAvatars }}</FormSwitch>
|
||||||
|
<FormSwitch v-model="seperateRenoteQuote" class="_formBlock">{{ i18n.ts.seperateRenoteQuote }}</FormSwitch>
|
||||||
<FormSwitch v-model="useSystemFont" class="_formBlock">{{ i18n.ts.useSystemFont }}</FormSwitch>
|
<FormSwitch v-model="useSystemFont" class="_formBlock">{{ i18n.ts.useSystemFont }}</FormSwitch>
|
||||||
<FormSwitch v-model="useOsNativeEmojis" class="_formBlock">
|
<FormSwitch v-model="useOsNativeEmojis" class="_formBlock">
|
||||||
{{ i18n.ts.useOsNativeEmojis }}
|
{{ i18n.ts.useOsNativeEmojis }}
|
||||||
@ -144,6 +145,7 @@ const instanceTicker = computed(defaultStore.makeGetterSetter('instanceTicker'))
|
|||||||
const enableInfiniteScroll = computed(defaultStore.makeGetterSetter('enableInfiniteScroll'));
|
const enableInfiniteScroll = computed(defaultStore.makeGetterSetter('enableInfiniteScroll'));
|
||||||
const enterSendsMessage = computed(defaultStore.makeGetterSetter('enterSendsMessage'));
|
const enterSendsMessage = computed(defaultStore.makeGetterSetter('enterSendsMessage'));
|
||||||
const useReactionPickerForContextMenu = computed(defaultStore.makeGetterSetter('useReactionPickerForContextMenu'));
|
const useReactionPickerForContextMenu = computed(defaultStore.makeGetterSetter('useReactionPickerForContextMenu'));
|
||||||
|
const seperateRenoteQuote = computed(defaultStore.makeGetterSetter('seperateRenoteQuote'));
|
||||||
const squareAvatars = computed(defaultStore.makeGetterSetter('squareAvatars'));
|
const squareAvatars = computed(defaultStore.makeGetterSetter('squareAvatars'));
|
||||||
const showUpdates = computed(defaultStore.makeGetterSetter('showUpdates'));
|
const showUpdates = computed(defaultStore.makeGetterSetter('showUpdates'));
|
||||||
const swipeOnDesktop = computed(defaultStore.makeGetterSetter('swipeOnDesktop'));
|
const swipeOnDesktop = computed(defaultStore.makeGetterSetter('swipeOnDesktop'));
|
||||||
@ -181,6 +183,7 @@ watch([
|
|||||||
showAds,
|
showAds,
|
||||||
showUpdates,
|
showUpdates,
|
||||||
swipeOnDesktop,
|
swipeOnDesktop,
|
||||||
|
seperateRenoteQuote,
|
||||||
], async () => {
|
], async () => {
|
||||||
await reloadAsk();
|
await reloadAsk();
|
||||||
});
|
});
|
||||||
|
@ -123,6 +123,10 @@ export const defaultStore = markRaw(new Storage('base', {
|
|||||||
where: 'device',
|
where: 'device',
|
||||||
default: 'quiet' as 'nothing' | 'quiet' | 'reload' | 'dialog',
|
default: 'quiet' as 'nothing' | 'quiet' | 'reload' | 'dialog',
|
||||||
},
|
},
|
||||||
|
seperateRenoteQuote: {
|
||||||
|
where: 'device',
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
nsfw: {
|
nsfw: {
|
||||||
where: 'device',
|
where: 'device',
|
||||||
default: 'respect' as 'respect' | 'force' | 'ignore',
|
default: 'respect' as 'respect' | 'force' | 'ignore',
|
||||||
|
Loading…
Reference in New Issue
Block a user