This commit is contained in:
オスカー、 2024-07-20 22:31:27 +09:00
parent 7d4383c449
commit b04ffe870b
Signed by: SWREI
GPG Key ID: 139D6573F92DA9F7
5 changed files with 125 additions and 9 deletions

58
locales/index.d.ts vendored
View File

@ -5095,6 +5095,22 @@ export interface Locale extends ILocale {
*
*/
"credits": string;
/**
*
*/
"timeWillCome": string;
/**
*
*/
"thankYou": string;
/**
*
*/
"hideSensitiveInformation": string;
/**
* '' .
*/
"youAreHidingSensitiveInformation": string;
"_bubbleGame": {
/**
*
@ -10377,6 +10393,48 @@ export interface Locale extends ILocale {
*/
"nRequests": ParameterizedString<"n">;
};
"_hideSensitiveInformation": {
/**
*
*/
"use": string;
/**
*
*/
"about": string;
/**
*
*/
"itsHidden": string;
/**
*
*/
"itsNotHidden": string;
/**
*
*/
"directMessages": string;
/**
*
*/
"directMessagesUse": string;
/**
*
*/
"directMessagesDescription": string;
/**
*
*/
"moderationLog": string;
/**
*
*/
"moderationLogUse": string;
/**
*
*/
"moderationLogDescription": string;
};
}
declare const locales: {
[lang: string]: Locale;

View File

@ -1271,6 +1271,8 @@ here: "こちら"
credits: "スタッフロール"
timeWillCome: "いつかこの欄にあなたの名前が書かれる日が来るのでしょうか?"
thankYou: "オスカーはあなたと一緒にサーフィンします。 いつまでも。"
hideSensitiveInformation: "민감한 정보 숨기기"
youAreHidingSensitiveInformation: "이 노트는 ''에 의해 숨겨졌습니다."
_bubbleGame:
howToPlay: "遊び方"
@ -2762,3 +2764,15 @@ _skebStatus:
yenX: "{x}円"
nWorks: "納品実績 {n}件"
nRequests: "取引実績 {n}件"
_hideSensitiveInformation:
use: ""
about: ""
itsHidden: "숨겨짐"
itsNotHidden: "표시됨"
directMessages: ""
directMessagesUse: ""
directMessagesDescription: ""
moderationLog: ""
moderationLogUse: ""
moderationLogDescription: ""

View File

@ -128,7 +128,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<button v-if="defaultStore.state.showClipButtonInNoteFooter" ref="clipButton" :class="$style.footerButton" class="_button" @mousedown="clip()">
<i class="ti ti-paperclip"></i>
</button>
<button v-if="defaultStore.state.showTranslateButtonInNoteFooter" ref="translateButton" :class="$style.footerButton" class="_button" @mousedown="translate()">
<button v-if="defaultStore.state.showTranslateButtonInNoteFooter && $i?.policies.canUseTranslator" ref="translateButton" :class="$style.footerButton" class="_button" @mousedown="translate()">
<i class="ti ti-language-hiragana"></i>
</button>
<button ref="menuButton" :class="$style.footerButton" class="_button" @mousedown="showMenu()">
@ -196,7 +196,7 @@ import MkRippleEffect from '@/components/MkRippleEffect.vue';
import { showMovedDialog } from '@/scripts/show-moved-dialog.js';
import { shouldCollapsed } from '@/scripts/collapsed.js';
import { isEnabledUrlPreview } from '@/instance.js';
import { miLocalStorage } from "@/local-storage.js";
import { miLocalStorage } from '@/local-storage.js';
const props = withDefaults(defineProps<{
note: Misskey.entities.Note;
@ -247,6 +247,11 @@ const isRenote = (
note.value.fileIds && note.value.fileIds.length === 0 &&
note.value.poll == null
);
const isRedacted = (
defaultStore.state.hideDirectMessages &&
defaultStore.state.hideSensitiveInformation &&
note.value.visibility === 'specified'
);
const rootEl = shallowRef<HTMLElement>();
const menuButton = shallowRef<HTMLElement>();

View File

@ -46,7 +46,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<FormSection>
<div class="_gaps_m">
<MkSwitch v-model="rememberNoteVisibility" @update:modelValue="save()">{{ i18n.ts.rememberNoteVisibility }}</MkSwitch>
<MkSwitch v-model="rememberNoteVisibility">{{ i18n.ts.rememberNoteVisibility }}</MkSwitch>
<MkFolder v-if="!rememberNoteVisibility">
<template #label>{{ i18n.ts.defaultNoteVisibility }}</template>
<template v-if="defaultNoteVisibility === 'public'" #suffix>{{ i18n.ts._visibility.public }}</template>
@ -72,13 +72,46 @@ SPDX-License-Identifier: AGPL-3.0-only
<template #label>{{ i18n.ts.hideSensitiveInformation }}</template>
<div class="_gaps_m">
<MkSwitch v-model="hideDirectMessages">
{{ i18n.ts.flagAsCat }}
<template #caption>{{ i18n.ts.flagAsCatDescription }}</template>
<MkSwitch v-model="hideSensitiveInformation">
{{ i18n.ts._hideSensitiveInformation.use }}
<template #caption>{{ i18n.ts._hideSensitiveInformation.about }}</template>
</MkSwitch>
</div>
<div class="_gaps_m">
<MkFolder v-if="hideSensitiveInformation">
<template #label>{{ i18n.ts._hideSensitiveInformation.directMessages }}</template>
<template v-if="hideDirectMessages" #suffix>{{ i18n.ts._hideSensitiveInformation.itsHidden }}</template>
<template v-else #suffix>{{ i18n.ts._hideSensitiveInformation.itsNotHidden }}</template>
<MkSwitch v-model="hideDirectMessages">
{{ i18n.ts._hideSensitiveInformation.directMessagesUse }}
<template #caption>{{ i18n.ts._hideSensitiveInformation.directMessagesDescription }}</template>
</MkSwitch>
</MkFolder>
<MkFolder v-if="hideSensitiveInformation">
<template #label>{{ i18n.ts._hideSensitiveInformation.drive }}</template>
<template v-if="hideDirectMessages" #suffix>{{ i18n.ts._hideSensitiveInformation.itsHidden }}</template>
<template v-else #suffix>{{ i18n.ts._hideSensitiveInformation.itsNotHidden }}</template>
<MkSwitch v-model="hideDirectMessages">
{{ i18n.ts._hideSensitiveInformation.driveUse }}
<template #caption>{{ i18n.ts._hideSensitiveInformation.driveDescription }}</template>
</MkSwitch>
</MkFolder>
<MkFolder v-if="hideSensitiveInformation && $i.isModerator">
<template #label>{{ i18n.ts._hideSensitiveInformation.moderationLog }}</template>
<template v-if="hideDirectMessages" #suffix>{{ i18n.ts._hideSensitiveInformation.itsHidden }}</template>
<template v-else #suffix>{{ i18n.ts._hideSensitiveInformation.itsNotHidden }}</template>
<MkSwitch v-model="hideDirectMessages">
{{ i18n.ts._hideSensitiveInformation.moderationLogUse }}
<template #caption>{{ i18n.ts._hideSensitiveInformation.moderationLogDescription }}</template>
</MkSwitch>
</MkFolder>
<MkFolder v-if="hideSensitiveInformation && $i.isModerator">
<template #label>{{ i18n.ts._hideSensitiveInformation.roles }}</template>
<template v-if="hideDirectMessages" #suffix>{{ i18n.ts._hideSensitiveInformation.itsHidden }}</template>
<template v-else #suffix>{{ i18n.ts._hideSensitiveInformation.itsNotHidden }}</template>
<MkSwitch v-model="hideDirectMessages">
{{ i18n.ts._hideSensitiveInformation.rolesUse }}
<template #caption>{{ i18n.ts._hideSensitiveInformation.rolesDescription }}</template>
</MkSwitch>
</MkFolder>
</div>
</FormSection>
</div>
@ -112,6 +145,7 @@ const defaultNoteVisibility = computed(defaultStore.makeGetterSetter('defaultNot
const defaultNoteLocalOnly = computed(defaultStore.makeGetterSetter('defaultNoteLocalOnly'));
const rememberNoteVisibility = computed(defaultStore.makeGetterSetter('rememberNoteVisibility'));
const keepCw = computed(defaultStore.makeGetterSetter('keepCw'));
const hideSensitiveInformation = computed(defaultStore.makeGetterSetter('hideSensitiveInformation'));
const hideDirectMessages = computed(defaultStore.makeGetterSetter('hideDirectMessages'));
function save() {

View File

@ -5,6 +5,7 @@
import * as Misskey from 'misskey-js';
import { i18n } from '@/i18n.js';
import { defaultStore } from "@/store.js";
/**
* 稿
@ -23,6 +24,10 @@ export const getNoteSummary = (note?: Misskey.entities.Note | null): string => {
return `(${i18n.ts.invisibleNote})`;
}
if (note.visibility === 'specified' && defaultStore.state.hideDirectMessages) {
return `(${i18n.ts.youAreHidingSensitiveInformation})`;
}
let summary = '';
// 本文