diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml
index 53f4f7e28..e01fc6de6 100644
--- a/locales/ja-JP.yml
+++ b/locales/ja-JP.yml
@@ -107,6 +107,7 @@ clickToShow: "クリックして表示"
sensitive: "閲覧注意"
add: "追加"
reaction: "リアクション"
+reactWithRenote: "ついでにRenoteする"
reactionSetting: "ピッカーに表示するリアクション"
reactionSettingDescription2: "ドラッグして並び替え、クリックして削除、+を押して追加します。"
rememberNoteVisibility: "公開範囲を記憶する"
diff --git a/locales/ja-NY.yml b/locales/ja-NY.yml
index a1e789a2f..856f77158 100644
--- a/locales/ja-NY.yml
+++ b/locales/ja-NY.yml
@@ -837,6 +837,8 @@ emojiColor: "カラーコード"
colorPicker: "カラーピッカー"
emojiApproval: "絵文字を登録"
deckOld: "旧デッキ"
+pakuruConfirm: "パクりますか?"
+pakuru: "パクる"
_emailUnavailable:
diff --git a/package.json b/package.json
index 4c1981549..f63706962 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "misskey",
- "version": "12.119.0-simkey-v2",
+ "version": "12.119.0-simkey-v3",
"codename": "indigo",
"repository": {
"type": "git",
diff --git a/packages/client/src/components/MkEmojiPicker.vue b/packages/client/src/components/MkEmojiPicker.vue
index 3de0afbf5..cade60566 100644
--- a/packages/client/src/components/MkEmojiPicker.vue
+++ b/packages/client/src/components/MkEmojiPicker.vue
@@ -74,6 +74,7 @@
+ {{ i18n.ts.reactWithRenote }}
@@ -90,6 +91,7 @@ import { deviceKind } from '@/scripts/device-kind';
import { emojiCategories, instance } from '@/instance';
import { i18n } from '@/i18n';
import { defaultStore } from '@/store';
+import MkSwitch from '@/components/form/switch.vue';
const props = withDefaults(defineProps<{
showPinned?: boolean;
@@ -101,10 +103,11 @@ const props = withDefaults(defineProps<{
});
const emit = defineEmits<{
- (ev: 'chosen', v: string): void;
+ (ev: 'chosen', v: { reaction: string, withRenote: boolean } | string): void;
}>();
const search = ref();
+const withRenote = ref(true);
const emojis = ref();
const {
@@ -278,6 +281,7 @@ function focus() {
function reset() {
if (emojis.value) emojis.value.scrollTop = 0;
q.value = '';
+ withRenote.value = false; // 毎回Renoteをfalseに戻す
}
function getKey(emoji: string | Misskey.entities.CustomEmoji | UnicodeEmojiDef): string {
@@ -294,7 +298,7 @@ function chosen(emoji: any, ev?: MouseEvent) {
}
const key = getKey(emoji);
- emit('chosen', key);
+ emit('chosen', (props.asReactionPicker) ? { reaction: key, withRenote: withRenote.value } : key);
// 最近使った絵文字更新
if (!pinned.value.includes(key)) {
@@ -452,6 +456,10 @@ defineExpose({
}
}
+ > .withRenote {
+ padding: 12px;
+ }
+
> .tabs {
display: flex;
display: none;
diff --git a/packages/client/src/components/MkEmojiPickerDialog.vue b/packages/client/src/components/MkEmojiPickerDialog.vue
index 3b41f9d75..fdec2b169 100644
--- a/packages/client/src/components/MkEmojiPickerDialog.vue
+++ b/packages/client/src/components/MkEmojiPickerDialog.vue
@@ -51,8 +51,8 @@ const emit = defineEmits<{
const modal = ref>();
const picker = ref>();
-function chosen(emoji: any) {
- emit('done', emoji);
+function chosen(results: { reaction: string, withRenote: boolean }) {
+ emit('done', results);
modal.value?.close();
}
diff --git a/packages/client/src/components/MkNote.vue b/packages/client/src/components/MkNote.vue
index efe786ba4..0f6909fe5 100644
--- a/packages/client/src/components/MkNote.vue
+++ b/packages/client/src/components/MkNote.vue
@@ -207,11 +207,17 @@ function reply(viaKeyboard = false): void {
function react(viaKeyboard = false): void {
pleaseLogin();
blur();
- reactionPicker.show(reactButton.value, reaction => {
+ reactionPicker.show(reactButton.value, results => {
os.api('notes/reactions/create', {
noteId: appearNote.id,
- reaction: reaction,
+ reaction: results.reaction,
});
+ if (results.withRenote) {
+ os.api('notes/create', {
+ renoteId: appearNote.id,
+ isRenote: true,
+ });
+ }
}, () => {
focus();
});
diff --git a/packages/client/src/pages/admin/emojigen.vue b/packages/client/src/pages/admin/emojigen.vue
index 9464b09b2..b3c63406f 100644
--- a/packages/client/src/pages/admin/emojigen.vue
+++ b/packages/client/src/pages/admin/emojigen.vue
@@ -6,7 +6,6 @@
![]()
{{ $ts.emojiApproval }}
-
{{ $ts.settings }}
diff --git a/packages/client/src/scripts/get-note-menu.ts b/packages/client/src/scripts/get-note-menu.ts
index a5cf98206..ff53f2dfe 100644
--- a/packages/client/src/scripts/get-note-menu.ts
+++ b/packages/client/src/scripts/get-note-menu.ts
@@ -26,6 +26,22 @@ export function getNoteMenu(props: {
const appearNote = isRenote ? props.note.renote as misskey.entities.Note : props.note;
+ function pakuru(): void {
+ os.confirm({
+ type: 'question',
+ text: i18n.ts.pakuruConfirm,
+ }).then(({ canceled }) => {
+ if (canceled) return;
+ const postData = {
+ text: appearNote.text,
+ cw: appearNote.cw ? appearNote.cw || '' : undefined,
+ localOnly: appearNote.localOnly,
+ visibility: appearNote.visibility,
+ }
+ os.api('notes/create', postData, undefined);
+ });
+ }
+
function del(): void {
os.confirm({
type: 'warning',
@@ -205,6 +221,11 @@ export function getNoteMenu(props: {
action: unclip,
}, null] : []
),
+ {
+ icon: 'fas fa-copy',
+ text: i18n.ts.pakuru,
+ action: pakuru,
+ },
{
icon: 'fas fa-copy',
text: i18n.ts.copyContent,
diff --git a/packages/client/src/scripts/reaction-picker.ts b/packages/client/src/scripts/reaction-picker.ts
index a6d0940a4..82adb0bed 100644
--- a/packages/client/src/scripts/reaction-picker.ts
+++ b/packages/client/src/scripts/reaction-picker.ts
@@ -4,7 +4,7 @@ import { popup } from '@/os';
class ReactionPicker {
private src: Ref = ref(null);
private manualShowing = ref(false);
- private onChosen?: (reaction: string) => void;
+ private onChosen?: ({ reaction: string, withRenote: boolean }) => void;
private onClosed?: () => void;
constructor() {
@@ -17,8 +17,8 @@ class ReactionPicker {
asReactionPicker: true,
manualShowing: this.manualShowing
}, {
- done: reaction => {
- this.onChosen!(reaction);
+ done: results => {
+ this.onChosen!({ reaction: results.reaction, withRenote: results.withRenote });
},
close: () => {
this.manualShowing.value = false;