mirror of
https://github.com/paricafe/misskey.git
synced 2025-02-25 00:34:25 -06:00
parent
0c2296fdf2
commit
a7378cf00a
5 changed files with 33 additions and 55 deletions
locales
packages/frontend/src
|
@ -2837,5 +2837,3 @@ _selfXssPrevention:
|
||||||
description3: "For more information, please check here: {link}"
|
description3: "For more information, please check here: {link}"
|
||||||
insertNewNotes: "Insert new notes at current position"
|
insertNewNotes: "Insert new notes at current position"
|
||||||
insertNewNotesDescription: "Insert new notes at the current position while scrolling timeline."
|
insertNewNotesDescription: "Insert new notes at the current position while scrolling timeline."
|
||||||
defaultReactionEmoji: "Default reaction emoji"
|
|
||||||
defaultReactionEmojiDescription: "Set the emoji used for quick reaction button."
|
|
||||||
|
|
|
@ -500,34 +500,28 @@ function reply(): void {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function toggleReaction(reaction: string): Promise<void> {
|
function like(): void {
|
||||||
|
pleaseLogin(undefined, pleaseLoginContext.value);
|
||||||
|
showMovedDialog();
|
||||||
|
sound.playMisskeySfx('reaction');
|
||||||
if (props.mock) {
|
if (props.mock) {
|
||||||
if (appearNote.value.myReaction) {
|
|
||||||
emit('removeReaction', appearNote.value.myReaction);
|
|
||||||
} else {
|
|
||||||
emit('reaction', reaction);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
misskeyApi('notes/reactions/create', {
|
||||||
if (appearNote.value.myReaction) {
|
noteId: appearNote.value.id,
|
||||||
await misskeyApi('notes/reactions/delete', {
|
reaction: '❤️',
|
||||||
noteId: appearNote.value.id,
|
});
|
||||||
});
|
const el = likeButton.value as HTMLElement | null | undefined;
|
||||||
} else {
|
if (el) {
|
||||||
await misskeyApi('notes/reactions/create', {
|
const rect = el.getBoundingClientRect();
|
||||||
noteId: appearNote.value.id,
|
const x = rect.left + (el.offsetWidth / 2);
|
||||||
reaction: reaction,
|
const y = rect.top + (el.offsetHeight / 2);
|
||||||
|
const { dispose } = os.popup(MkRippleEffect, { x, y }, {
|
||||||
|
end: () => dispose(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function like() {
|
|
||||||
if (props.appearNote.myReaction) return;
|
|
||||||
const emoji = defaultStore.state.defaultReactionEmoji;
|
|
||||||
await toggleReaction(emoji);
|
|
||||||
}
|
|
||||||
|
|
||||||
function react(): void {
|
function react(): void {
|
||||||
pleaseLogin({ openOnRemote: pleaseLoginContext.value });
|
pleaseLogin({ openOnRemote: pleaseLoginContext.value });
|
||||||
showMovedDialog();
|
showMovedDialog();
|
||||||
|
|
|
@ -484,25 +484,28 @@ function reply(): void {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function toggleReaction(reaction: string): Promise<void> {
|
function like(): void {
|
||||||
if (appearNote.value.myReaction) {
|
pleaseLogin(undefined, pleaseLoginContext.value);
|
||||||
await misskeyApi('notes/reactions/delete', {
|
showMovedDialog();
|
||||||
noteId: appearNote.value.id,
|
sound.playMisskeySfx('reaction');
|
||||||
});
|
if (props.mock) {
|
||||||
} else {
|
return;
|
||||||
await misskeyApi('notes/reactions/create', {
|
}
|
||||||
noteId: appearNote.value.id,
|
misskeyApi('notes/reactions/create', {
|
||||||
reaction: reaction,
|
noteId: appearNote.value.id,
|
||||||
|
reaction: '❤️',
|
||||||
|
});
|
||||||
|
const el = likeButton.value as HTMLElement | null | undefined;
|
||||||
|
if (el) {
|
||||||
|
const rect = el.getBoundingClientRect();
|
||||||
|
const x = rect.left + (el.offsetWidth / 2);
|
||||||
|
const y = rect.top + (el.offsetHeight / 2);
|
||||||
|
const { dispose } = os.popup(MkRippleEffect, { x, y }, {
|
||||||
|
end: () => dispose(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function like() {
|
|
||||||
if (props.appearNote.myReaction) return;
|
|
||||||
const emoji = defaultStore.state.defaultReactionEmoji;
|
|
||||||
await toggleReaction(emoji);
|
|
||||||
}
|
|
||||||
|
|
||||||
function react(): void {
|
function react(): void {
|
||||||
pleaseLogin({ openOnRemote: pleaseLoginContext.value });
|
pleaseLogin({ openOnRemote: pleaseLoginContext.value });
|
||||||
showMovedDialog();
|
showMovedDialog();
|
||||||
|
|
|
@ -69,10 +69,6 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkSwitch v-model="showDetailTimeWhenHover">{{ i18n.ts.showDetailTimeWhenHover }}</MkSwitch>
|
<MkSwitch v-model="showDetailTimeWhenHover">{{ i18n.ts.showDetailTimeWhenHover }}</MkSwitch>
|
||||||
<MkSwitch v-model="noteClickToOpen">{{ i18n.ts.noteClickToOpen }}</MkSwitch>
|
<MkSwitch v-model="noteClickToOpen">{{ i18n.ts.noteClickToOpen }}</MkSwitch>
|
||||||
<MkSwitch v-model="enableFallbackReactButton">{{ i18n.ts.enableFallbackReactButton }}</MkSwitch>
|
<MkSwitch v-model="enableFallbackReactButton">{{ i18n.ts.enableFallbackReactButton }}</MkSwitch>
|
||||||
<MkButton @click="changeDefaultEmoji">
|
|
||||||
<template #label>{{ i18n.ts.defaultReactionEmoji }}</template>
|
|
||||||
<template #suffix>{{ defaultReactionEmoji }}</template>
|
|
||||||
</MkButton>
|
|
||||||
<MkSwitch v-model="enableMFMCheatsheet">{{ i18n.ts.enableMFMCheatsheet }}</MkSwitch>
|
<MkSwitch v-model="enableMFMCheatsheet">{{ i18n.ts.enableMFMCheatsheet }}</MkSwitch>
|
||||||
<MkSwitch v-model="enableUndoClearPostForm">{{ i18n.ts.enableUndoClearPostForm }}</MkSwitch>
|
<MkSwitch v-model="enableUndoClearPostForm">{{ i18n.ts.enableUndoClearPostForm }}</MkSwitch>
|
||||||
<MkSwitch v-model="collapseNotesRepliedTo">{{ i18n.ts.collapseNotesRepliedTo }}</MkSwitch>
|
<MkSwitch v-model="collapseNotesRepliedTo">{{ i18n.ts.collapseNotesRepliedTo }}</MkSwitch>
|
||||||
|
@ -110,7 +106,6 @@ import MkInfo from '@/components/MkInfo.vue';
|
||||||
import MkRange from '@/components/MkRange.vue';
|
import MkRange from '@/components/MkRange.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import FormSection from '@/components/form/section.vue';
|
import FormSection from '@/components/form/section.vue';
|
||||||
import * as os from '@/os.js';
|
|
||||||
|
|
||||||
const defaultFont = getDefaultFontSettings();
|
const defaultFont = getDefaultFontSettings();
|
||||||
console.log(defaultFont);
|
console.log(defaultFont);
|
||||||
|
@ -143,14 +138,6 @@ const collapsedUnexpectedLangs = computed(defaultStore.makeGetterSetter('collaps
|
||||||
const emojiAutoSpacing = computed(defaultStore.makeGetterSetter('emojiAutoSpacing'));
|
const emojiAutoSpacing = computed(defaultStore.makeGetterSetter('emojiAutoSpacing'));
|
||||||
const insertNewNotes = computed(defaultStore.makeGetterSetter('insertNewNotes'));
|
const insertNewNotes = computed(defaultStore.makeGetterSetter('insertNewNotes'));
|
||||||
|
|
||||||
const defaultReactionEmoji = computed(defaultStore.makeGetterSetter('defaultReactionEmoji'));
|
|
||||||
|
|
||||||
async function changeDefaultEmoji() {
|
|
||||||
const { canceled, result: emoji } = await os.pickEmoji();
|
|
||||||
if (canceled) return;
|
|
||||||
defaultReactionEmoji.value = emoji;
|
|
||||||
}
|
|
||||||
|
|
||||||
definePageMetadata(() => ({
|
definePageMetadata(() => ({
|
||||||
title: 'Pari Plus!',
|
title: 'Pari Plus!',
|
||||||
icon: 'ti ti-plus',
|
icon: 'ti ti-plus',
|
||||||
|
|
|
@ -563,10 +563,6 @@ export const defaultStore = markRaw(new Storage('base', {
|
||||||
where: 'device',
|
where: 'device',
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
defaultReactionEmoji: {
|
|
||||||
where: 'device',
|
|
||||||
default: '♥',
|
|
||||||
},
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// TODO: 他のタブと永続化されたstateを同期
|
// TODO: 他のタブと永続化されたstateを同期
|
||||||
|
|
Loading…
Add table
Reference in a new issue