Merge 2c1d2ed734
into 30df768d26
This commit is contained in:
commit
3595496b69
|
@ -5254,6 +5254,14 @@ export interface Locale extends ILocale {
|
|||
* このサーバーは連合が無効化されています。他のサーバーのユーザーとやり取りすることはできません。
|
||||
*/
|
||||
"federationDisabled": string;
|
||||
/**
|
||||
* このメディアをセンシティブとして設定しますか?
|
||||
*/
|
||||
"markAsSensitiveConfirm": string;
|
||||
/**
|
||||
* このメディアのセンシティブ指定を解除しますか?
|
||||
*/
|
||||
"unmarkAsSensitiveConfirm": string;
|
||||
"_accountSettings": {
|
||||
/**
|
||||
* コンテンツの表示にログインを必須にする
|
||||
|
|
|
@ -1309,6 +1309,8 @@ availableRoles: "利用可能なロール"
|
|||
acknowledgeNotesAndEnable: "注意事項を理解した上でオンにします。"
|
||||
federationSpecified: "このサーバーはホワイトリスト連合で運用されています。管理者が指定したサーバー以外とやり取りすることはできません。"
|
||||
federationDisabled: "このサーバーは連合が無効化されています。他のサーバーのユーザーとやり取りすることはできません。"
|
||||
markAsSensitiveConfirm: "このメディアをセンシティブとして設定しますか?"
|
||||
unmarkAsSensitiveConfirm: "このメディアのセンシティブ指定を解除しますか?"
|
||||
|
||||
_accountSettings:
|
||||
requireSigninToViewContents: "コンテンツの表示にログインを必須にする"
|
||||
|
|
|
@ -247,7 +247,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', {
|
||||
fileId: file.id,
|
||||
isSensitive: !file.isSensitive,
|
||||
|
|
|
@ -124,11 +124,21 @@ function showMenu(ev: MouseEvent) {
|
|||
|
||||
if (iAmModerator) {
|
||||
menuItems.push({
|
||||
text: i18n.ts.markAsSensitive,
|
||||
text: props.image.isSensitive ? i18n.ts.unmarkAsSensitive : i18n.ts.markAsSensitive,
|
||||
icon: 'ti ti-eye-exclamation',
|
||||
danger: true,
|
||||
action: () => {
|
||||
os.apiWithDialog('drive/files/update', { fileId: props.image.id, isSensitive: true });
|
||||
action: async () => {
|
||||
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,
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
@ -272,7 +272,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', {
|
||||
fileId: file.id,
|
||||
isSensitive: !file.isSensitive,
|
||||
|
|
|
@ -36,8 +36,11 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkA v-if="file.user" class="user" :to="`/admin/user/${file.user.id}`">
|
||||
<MkUserCardMini :user="file.user"/>
|
||||
</MkA>
|
||||
|
||||
<div>
|
||||
<MkSwitch v-model="isSensitive" @update:modelValue="toggleIsSensitive">{{ i18n.ts.sensitive }}</MkSwitch>
|
||||
<MkButton danger @click="toggleSensitive">
|
||||
<i class="ti ti-eye-exclamation"></i> {{ isSensitive ? i18n.ts.unmarkAsSensitive : i18n.ts.markAsSensitive }}
|
||||
</MkButton>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
@ -117,9 +120,20 @@ async function del() {
|
|||
});
|
||||
}
|
||||
|
||||
async function toggleIsSensitive(v) {
|
||||
await misskeyApi('drive/files/update', { fileId: props.fileId, isSensitive: v });
|
||||
isSensitive.value = v;
|
||||
async function toggleSensitive() {
|
||||
if (!file.value) return;
|
||||
|
||||
const { canceled } = await os.confirm({
|
||||
type: 'warning',
|
||||
text: file.value.isSensitive ? i18n.ts.unmarkAsSensitiveConfirm : i18n.ts.markAsSensitiveConfirm,
|
||||
});
|
||||
|
||||
if (canceled) return;
|
||||
|
||||
os.apiWithDialog('drive/files/update', {
|
||||
fileId: file.value.id,
|
||||
isSensitive: !file.value.isSensitive,
|
||||
});
|
||||
}
|
||||
|
||||
const headerActions = computed(() => [{
|
||||
|
|
Loading…
Reference in New Issue