enhance(frontend): モデレーターがセンシティブ設定を変更する際に確認ダイアログを出すように (#15462)
* enhance(frontend): モデレーターがセンシティブ設定を変更する際に確認ダイアログを出すように * use MkSwitch * Update Changelog
This commit is contained in:
parent
801a2ec1db
commit
77667cf80d
@ -5,6 +5,7 @@
|
|||||||
- Fix: システムアカウントが削除できる問題を修正
|
- Fix: システムアカウントが削除できる問題を修正
|
||||||
|
|
||||||
### Client
|
### Client
|
||||||
|
- Enhance: モデレーターがセンシティブ設定を変更する際に確認ダイアログを出すように
|
||||||
- Fix: 削除して編集の削除タイミングを投稿後になるように `#14498`
|
- Fix: 削除して編集の削除タイミングを投稿後になるように `#14498`
|
||||||
|
|
||||||
### Server
|
### Server
|
||||||
|
8
locales/index.d.ts
vendored
8
locales/index.d.ts
vendored
@ -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,
|
||||||
|
@ -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(() => [{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user