Merge branch 'develop' into enh-14810
This commit is contained in:
commit
8e038de613
|
@ -5,6 +5,11 @@
|
||||||
- Fix: システムアカウントが削除できる問題を修正
|
- Fix: システムアカウントが削除できる問題を修正
|
||||||
|
|
||||||
### Client
|
### Client
|
||||||
|
- Enhance: モデレーターがセンシティブ設定を変更する際に確認ダイアログを出すように
|
||||||
|
- Enhance: ユーザーページのノート一覧と前後のノート表示でチャンネルのノートを含めるように
|
||||||
|
- Fix: 削除して編集の削除タイミングを投稿後になるように `#14498`
|
||||||
|
- Fix: フォローされたときのメッセージがちらつくことがある問題を修正
|
||||||
|
- Fix: 投稿ダイアログがサイズ限界を超えた際にスクロールできない問題を修正
|
||||||
- Fix: デッキでリンクをダブルクリックすると、ウィンドウが2枚開いてしまう問題を修正
|
- Fix: デッキでリンクをダブルクリックすると、ウィンドウが2枚開いてしまう問題を修正
|
||||||
|
|
||||||
### Server
|
### Server
|
||||||
|
|
|
@ -5262,6 +5262,14 @@ export interface Locale extends ILocale {
|
||||||
* " {emoji} " をリアクションしますか?
|
* " {emoji} " をリアクションしますか?
|
||||||
*/
|
*/
|
||||||
"reactAreYouSure": ParameterizedString<"emoji">;
|
"reactAreYouSure": ParameterizedString<"emoji">;
|
||||||
|
/**
|
||||||
|
* このメディアをセンシティブとして設定しますか?
|
||||||
|
*/
|
||||||
|
"markAsSensitiveConfirm": string;
|
||||||
|
/**
|
||||||
|
* このメディアのセンシティブ指定を解除しますか?
|
||||||
|
*/
|
||||||
|
"unmarkAsSensitiveConfirm": string;
|
||||||
"_accountSettings": {
|
"_accountSettings": {
|
||||||
/**
|
/**
|
||||||
* コンテンツの表示にログインを必須にする
|
* コンテンツの表示にログインを必須にする
|
||||||
|
|
|
@ -1311,6 +1311,8 @@ federationSpecified: "このサーバーはホワイトリスト連合で運用
|
||||||
federationDisabled: "このサーバーは連合が無効化されています。他のサーバーのユーザーとやり取りすることはできません。"
|
federationDisabled: "このサーバーは連合が無効化されています。他のサーバーのユーザーとやり取りすることはできません。"
|
||||||
confirmOnReact: "リアクションする際に確認する"
|
confirmOnReact: "リアクションする際に確認する"
|
||||||
reactAreYouSure: "\" {emoji} \" をリアクションしますか?"
|
reactAreYouSure: "\" {emoji} \" をリアクションしますか?"
|
||||||
|
markAsSensitiveConfirm: "このメディアをセンシティブとして設定しますか?"
|
||||||
|
unmarkAsSensitiveConfirm: "このメディアのセンシティブ指定を解除しますか?"
|
||||||
|
|
||||||
_accountSettings:
|
_accountSettings:
|
||||||
requireSigninToViewContents: "コンテンツの表示にログインを必須にする"
|
requireSigninToViewContents: "コンテンツの表示にログインを必須にする"
|
||||||
|
|
|
@ -259,7 +259,14 @@ function showMenu(ev: MouseEvent) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleSensitive(file: Misskey.entities.DriveFile) {
|
async function toggleSensitive(file: Misskey.entities.DriveFile) {
|
||||||
|
const { canceled } = await os.confirm({
|
||||||
|
type: 'warning',
|
||||||
|
text: file.isSensitive ? i18n.ts.unmarkAsSensitiveConfirm : i18n.ts.markAsSensitiveConfirm,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (canceled) return;
|
||||||
|
|
||||||
os.apiWithDialog('drive/files/update', {
|
os.apiWithDialog('drive/files/update', {
|
||||||
fileId: file.id,
|
fileId: file.id,
|
||||||
isSensitive: !file.isSensitive,
|
isSensitive: !file.isSensitive,
|
||||||
|
|
|
@ -124,11 +124,21 @@ function showMenu(ev: MouseEvent) {
|
||||||
|
|
||||||
if (iAmModerator) {
|
if (iAmModerator) {
|
||||||
menuItems.push({
|
menuItems.push({
|
||||||
text: i18n.ts.markAsSensitive,
|
text: props.image.isSensitive ? i18n.ts.unmarkAsSensitive : i18n.ts.markAsSensitive,
|
||||||
icon: 'ti ti-eye-exclamation',
|
icon: 'ti ti-eye-exclamation',
|
||||||
danger: true,
|
danger: true,
|
||||||
action: () => {
|
action: async () => {
|
||||||
os.apiWithDialog('drive/files/update', { fileId: props.image.id, isSensitive: true });
|
const { canceled } = await os.confirm({
|
||||||
|
type: 'warning',
|
||||||
|
text: props.image.isSensitive ? i18n.ts.unmarkAsSensitiveConfirm : i18n.ts.markAsSensitiveConfirm,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (canceled) return;
|
||||||
|
|
||||||
|
os.apiWithDialog('drive/files/update', {
|
||||||
|
fileId: props.image.id,
|
||||||
|
isSensitive: !props.image.isSensitive,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -284,7 +284,14 @@ function showMenu(ev: MouseEvent) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleSensitive(file: Misskey.entities.DriveFile) {
|
async function toggleSensitive(file: Misskey.entities.DriveFile) {
|
||||||
|
const { canceled } = await os.confirm({
|
||||||
|
type: 'warning',
|
||||||
|
text: file.isSensitive ? i18n.ts.unmarkAsSensitiveConfirm : i18n.ts.markAsSensitiveConfirm,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (canceled) return;
|
||||||
|
|
||||||
os.apiWithDialog('drive/files/update', {
|
os.apiWithDialog('drive/files/update', {
|
||||||
fileId: file.id,
|
fileId: file.id,
|
||||||
isSensitive: !file.isSensitive,
|
isSensitive: !file.isSensitive,
|
||||||
|
|
|
@ -104,18 +104,18 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { inject, watch, nextTick, onMounted, defineAsyncComponent, provide, shallowRef, ref, computed } from 'vue';
|
import { inject, watch, nextTick, onMounted, defineAsyncComponent, provide, shallowRef, ref, computed } from 'vue';
|
||||||
import type { ShallowRef } from 'vue';
|
|
||||||
import * as mfm from 'mfm-js';
|
import * as mfm from 'mfm-js';
|
||||||
import * as Misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import insertTextAtCursor from 'insert-text-at-cursor';
|
import insertTextAtCursor from 'insert-text-at-cursor';
|
||||||
import { toASCII } from 'punycode.js';
|
import { toASCII } from 'punycode.js';
|
||||||
import { host, url } from '@@/js/config.js';
|
import { host, url } from '@@/js/config.js';
|
||||||
|
import type { ShallowRef } from 'vue';
|
||||||
import type { PostFormProps } from '@/types/post-form.js';
|
import type { PostFormProps } from '@/types/post-form.js';
|
||||||
import MkNoteSimple from '@/components/MkNoteSimple.vue';
|
import type { PollEditorModelValue } from '@/components/MkPollEditor.vue';
|
||||||
import MkNotePreview from '@/components/MkNotePreview.vue';
|
import MkNotePreview from '@/components/MkNotePreview.vue';
|
||||||
import XPostFormAttaches from '@/components/MkPostFormAttaches.vue';
|
import XPostFormAttaches from '@/components/MkPostFormAttaches.vue';
|
||||||
import MkPollEditor from '@/components/MkPollEditor.vue';
|
import MkPollEditor from '@/components/MkPollEditor.vue';
|
||||||
import type { PollEditorModelValue } from '@/components/MkPollEditor.vue';
|
import MkNoteSimple from '@/components/MkNoteSimple.vue';
|
||||||
import { erase, unique } from '@/scripts/array.js';
|
import { erase, unique } from '@/scripts/array.js';
|
||||||
import { extractMentions } from '@/scripts/extract-mentions.js';
|
import { extractMentions } from '@/scripts/extract-mentions.js';
|
||||||
import { formatTimeString } from '@/scripts/format-time-string.js';
|
import { formatTimeString } from '@/scripts/format-time-string.js';
|
||||||
|
@ -150,6 +150,7 @@ const props = withDefaults(defineProps<PostFormProps & {
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
mock: false,
|
mock: false,
|
||||||
initialLocalOnly: undefined,
|
initialLocalOnly: undefined,
|
||||||
|
deleteInitialNoteAfterPost: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
provide('mock', props.mock);
|
provide('mock', props.mock);
|
||||||
|
@ -845,6 +846,12 @@ async function post(ev?: MouseEvent) {
|
||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
// 削除して編集の対象ノートを削除
|
||||||
|
if (props.initialNote && props.deleteInitialNoteAfterPost) {
|
||||||
|
misskeyApi('notes/delete', {
|
||||||
|
noteId: props.initialNote.id,
|
||||||
|
});
|
||||||
|
}
|
||||||
deleteDraft();
|
deleteDraft();
|
||||||
emit('posted');
|
emit('posted');
|
||||||
if (postData.text && postData.text !== '') {
|
if (postData.text && postData.text !== '') {
|
||||||
|
@ -896,6 +903,11 @@ async function post(ev?: MouseEvent) {
|
||||||
if (m === 0 && s === 0) {
|
if (m === 0 && s === 0) {
|
||||||
claimAchievement('postedAt0min0sec');
|
claimAchievement('postedAt0min0sec');
|
||||||
}
|
}
|
||||||
|
if (props.initialNote && props.deleteInitialNoteAfterPost) {
|
||||||
|
if (date.getTime() - new Date(props.initialNote.createdAt).getTime() < 1000 * 60 && props.initialNote.userId === $i.id) {
|
||||||
|
claimAchievement('noteDeletedWithin1min');
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
posting.value = false;
|
posting.value = false;
|
||||||
|
@ -1070,6 +1082,8 @@ defineExpose({
|
||||||
&.modal {
|
&.modal {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 520px;
|
max-width: 520px;
|
||||||
|
overflow-x: clip;
|
||||||
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,23 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<MkModal ref="modal" :preferType="'dialog'" @click="modal?.close()" @closed="onModalClosed()" @esc="modal?.close()">
|
<MkModal
|
||||||
<MkPostForm ref="form" :class="$style.form" v-bind="props" autofocus freezeAfterPosted @posted="onPosted" @cancel="modal?.close()" @esc="modal?.close()"/>
|
ref="modal"
|
||||||
|
:preferType="'dialog'"
|
||||||
|
@click="modal?.close()"
|
||||||
|
@closed="onModalClosed()"
|
||||||
|
@esc="modal?.close()"
|
||||||
|
>
|
||||||
|
<MkPostForm
|
||||||
|
ref="form"
|
||||||
|
:class="$style.form"
|
||||||
|
v-bind="props"
|
||||||
|
autofocus
|
||||||
|
freezeAfterPosted
|
||||||
|
@posted="onPosted"
|
||||||
|
@cancel="modal?.close()"
|
||||||
|
@esc="modal?.close()"
|
||||||
|
/>
|
||||||
</MkModal>
|
</MkModal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -36,8 +36,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkA v-if="file.user" class="user" :to="`/admin/user/${file.user.id}`">
|
<MkA v-if="file.user" class="user" :to="`/admin/user/${file.user.id}`">
|
||||||
<MkUserCardMini :user="file.user"/>
|
<MkUserCardMini :user="file.user"/>
|
||||||
</MkA>
|
</MkA>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<MkSwitch v-model="isSensitive" @update:modelValue="toggleIsSensitive">{{ i18n.ts.sensitive }}</MkSwitch>
|
<MkSwitch :modelValue="isSensitive" @update:modelValue="toggleSensitive">{{ i18n.ts.sensitive }}</MkSwitch>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
@ -117,9 +118,21 @@ async function del() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function toggleIsSensitive(v) {
|
async function toggleSensitive() {
|
||||||
await misskeyApi('drive/files/update', { fileId: props.fileId, isSensitive: v });
|
if (!file.value) return;
|
||||||
isSensitive.value = v;
|
|
||||||
|
const { canceled } = await os.confirm({
|
||||||
|
type: 'warning',
|
||||||
|
text: isSensitive.value ? i18n.ts.unmarkAsSensitiveConfirm : i18n.ts.markAsSensitiveConfirm,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (canceled) return;
|
||||||
|
isSensitive.value = !isSensitive.value;
|
||||||
|
|
||||||
|
os.apiWithDialog('drive/files/update', {
|
||||||
|
fileId: file.value.id,
|
||||||
|
isSensitive: !file.value.isSensitive,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const headerActions = computed(() => [{
|
const headerActions = computed(() => [{
|
||||||
|
|
|
@ -87,6 +87,7 @@ const prevUserPagination: Paging = {
|
||||||
params: computed(() => note.value ? ({
|
params: computed(() => note.value ? ({
|
||||||
userId: note.value.userId,
|
userId: note.value.userId,
|
||||||
untilId: note.value.id,
|
untilId: note.value.id,
|
||||||
|
withChannelNotes: true,
|
||||||
}) : undefined),
|
}) : undefined),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -97,6 +98,8 @@ const nextUserPagination: Paging = {
|
||||||
params: computed(() => note.value ? ({
|
params: computed(() => note.value ? ({
|
||||||
userId: note.value.userId,
|
userId: note.value.userId,
|
||||||
sinceId: note.value.id,
|
sinceId: note.value.id,
|
||||||
|
withChannelNotes: true,
|
||||||
|
includeSensitiveChannel: $i != null,
|
||||||
}) : undefined),
|
}) : undefined),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="user.followedMessage != null" class="followedMessage">
|
<div v-if="user.followedMessage != null" class="followedMessage">
|
||||||
<MkFukidashi class="fukidashi" :tail="narrow ? 'none' : 'left'" negativeMargin shadow>
|
<MkFukidashi class="fukidashi" :tail="narrow ? 'none' : 'left'" negativeMargin>
|
||||||
<div class="messageHeader">{{ i18n.ts.messageToFollower }}</div>
|
<div class="messageHeader">{{ i18n.ts.messageToFollower }}</div>
|
||||||
<div><MkSparkle><Mfm :plain="true" :text="user.followedMessage" :author="user"/></MkSparkle></div>
|
<div><MkSparkle><Mfm :plain="true" :text="user.followedMessage" :author="user"/></MkSparkle></div>
|
||||||
</MkFukidashi>
|
</MkFukidashi>
|
||||||
|
|
|
@ -43,7 +43,7 @@ const pagination = computed(() => tab.value === 'featured' ? {
|
||||||
userId: props.user.id,
|
userId: props.user.id,
|
||||||
withRenotes: tab.value === 'all',
|
withRenotes: tab.value === 'all',
|
||||||
withReplies: tab.value === 'all',
|
withReplies: tab.value === 'all',
|
||||||
withChannelNotes: tab.value === 'all',
|
withChannelNotes: true,
|
||||||
withFiles: tab.value === 'files',
|
withFiles: tab.value === 'files',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { defineAsyncComponent } from 'vue';
|
import { defineAsyncComponent } from 'vue';
|
||||||
import type { Ref, ShallowRef } from 'vue';
|
|
||||||
import * as Misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import { url } from '@@/js/config.js';
|
import { url } from '@@/js/config.js';
|
||||||
import { claimAchievement } from './achievements.js';
|
import { claimAchievement } from './achievements.js';
|
||||||
|
import type { Ref, ShallowRef } from 'vue';
|
||||||
import type { MenuItem } from '@/types/menu.js';
|
import type { MenuItem } from '@/types/menu.js';
|
||||||
import { $i } from '@/account.js';
|
import { $i } from '@/account.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
|
@ -208,15 +208,7 @@ export function getNoteMenu(props: {
|
||||||
}).then(({ canceled }) => {
|
}).then(({ canceled }) => {
|
||||||
if (canceled) return;
|
if (canceled) return;
|
||||||
|
|
||||||
misskeyApi('notes/delete', {
|
os.post({ initialNote: appearNote, renote: appearNote.renote, reply: appearNote.reply, channel: appearNote.channel, deleteInitialNoteAfterPost: true });
|
||||||
noteId: appearNote.id,
|
|
||||||
});
|
|
||||||
|
|
||||||
os.post({ initialNote: appearNote, renote: appearNote.renote, reply: appearNote.reply, channel: appearNote.channel });
|
|
||||||
|
|
||||||
if (Date.now() - new Date(appearNote.createdAt).getTime() < 1000 * 60 && appearNote.userId === $i.id) {
|
|
||||||
claimAchievement('noteDeletedWithin1min');
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,4 +19,5 @@ export interface PostFormProps {
|
||||||
initialVisibleUsers?: Misskey.entities.UserDetailed[];
|
initialVisibleUsers?: Misskey.entities.UserDetailed[];
|
||||||
initialNote?: Misskey.entities.Note;
|
initialNote?: Misskey.entities.Note;
|
||||||
instant?: boolean;
|
instant?: boolean;
|
||||||
|
deleteInitialNoteAfterPost?: boolean;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue