feat: フラグを設定出来るように
This commit is contained in:
parent
bc8250b53f
commit
6216235743
|
@ -425,6 +425,7 @@ antennaExcludeBots: "Exclude bot accounts"
|
||||||
antennaKeywordsDescription: "Separate with spaces for an AND condition or with line breaks for an OR condition."
|
antennaKeywordsDescription: "Separate with spaces for an AND condition or with line breaks for an OR condition."
|
||||||
notifyAntenna: "Notify about new notes"
|
notifyAntenna: "Notify about new notes"
|
||||||
withFileAntenna: "Only notes with files"
|
withFileAntenna: "Only notes with files"
|
||||||
|
hideNotesInSensitiveChannel: "Hide notes in sensitive channels"
|
||||||
enableServiceworker: "Enable Push-Notifications for your Browser"
|
enableServiceworker: "Enable Push-Notifications for your Browser"
|
||||||
antennaUsersDescription: "List one username per line"
|
antennaUsersDescription: "List one username per line"
|
||||||
caseSensitive: "Case sensitive"
|
caseSensitive: "Case sensitive"
|
||||||
|
|
|
@ -1718,6 +1718,10 @@ export interface Locale extends ILocale {
|
||||||
* ファイルが添付されたノートのみ
|
* ファイルが添付されたノートのみ
|
||||||
*/
|
*/
|
||||||
"withFileAntenna": string;
|
"withFileAntenna": string;
|
||||||
|
/**
|
||||||
|
* センシティブなチャンネルのノートを非表示
|
||||||
|
*/
|
||||||
|
"hideNotesInSensitiveChannel": string;
|
||||||
/**
|
/**
|
||||||
* ブラウザへのプッシュ通知を有効にする
|
* ブラウザへのプッシュ通知を有効にする
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -425,6 +425,7 @@ antennaExcludeBots: "Botアカウントを除外"
|
||||||
antennaKeywordsDescription: "スペースで区切るとAND指定になり、改行で区切るとOR指定になります"
|
antennaKeywordsDescription: "スペースで区切るとAND指定になり、改行で区切るとOR指定になります"
|
||||||
notifyAntenna: "新しいノートを通知する"
|
notifyAntenna: "新しいノートを通知する"
|
||||||
withFileAntenna: "ファイルが添付されたノートのみ"
|
withFileAntenna: "ファイルが添付されたノートのみ"
|
||||||
|
hideNotesInSensitiveChannel: "センシティブなチャンネルのノートを非表示"
|
||||||
enableServiceworker: "ブラウザへのプッシュ通知を有効にする"
|
enableServiceworker: "ブラウザへのプッシュ通知を有効にする"
|
||||||
antennaUsersDescription: "ユーザー名を改行で区切って指定します"
|
antennaUsersDescription: "ユーザー名を改行で区切って指定します"
|
||||||
caseSensitive: "大文字小文字を区別する"
|
caseSensitive: "大文字小文字を区別する"
|
||||||
|
|
|
@ -41,6 +41,7 @@ export class AntennaEntityService {
|
||||||
excludeBots: antenna.excludeBots,
|
excludeBots: antenna.excludeBots,
|
||||||
withReplies: antenna.withReplies,
|
withReplies: antenna.withReplies,
|
||||||
withFile: antenna.withFile,
|
withFile: antenna.withFile,
|
||||||
|
hideNotesInSensitiveChannel: antenna.hideNotesInSensitiveChannel,
|
||||||
isActive: antenna.isActive,
|
isActive: antenna.isActive,
|
||||||
hasUnreadNote: false, // TODO
|
hasUnreadNote: false, // TODO
|
||||||
notify: false, // 後方互換性のため
|
notify: false, // 後方互換性のため
|
||||||
|
|
|
@ -100,5 +100,10 @@ export const packedAntennaSchema = {
|
||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
hideNotesInSensitiveChannel: {
|
||||||
|
type: 'boolean',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
|
@ -72,6 +72,7 @@ export const paramDef = {
|
||||||
excludeBots: { type: 'boolean' },
|
excludeBots: { type: 'boolean' },
|
||||||
withReplies: { type: 'boolean' },
|
withReplies: { type: 'boolean' },
|
||||||
withFile: { type: 'boolean' },
|
withFile: { type: 'boolean' },
|
||||||
|
hideNotesInSensitiveChannel: { type: 'boolean' },
|
||||||
},
|
},
|
||||||
required: ['antennaId'],
|
required: ['antennaId'],
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -129,6 +130,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
excludeBots: ps.excludeBots,
|
excludeBots: ps.excludeBots,
|
||||||
withReplies: ps.withReplies,
|
withReplies: ps.withReplies,
|
||||||
withFile: ps.withFile,
|
withFile: ps.withFile,
|
||||||
|
hideNotesInSensitiveChannel: ps.hideNotesInSensitiveChannel,
|
||||||
isActive: true,
|
isActive: true,
|
||||||
lastUsedAt: new Date(),
|
lastUsedAt: new Date(),
|
||||||
});
|
});
|
||||||
|
|
|
@ -39,7 +39,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkSwitch v-model="localOnly">{{ i18n.ts.localOnly }}</MkSwitch>
|
<MkSwitch v-model="localOnly">{{ i18n.ts.localOnly }}</MkSwitch>
|
||||||
<MkSwitch v-model="caseSensitive">{{ i18n.ts.caseSensitive }}</MkSwitch>
|
<MkSwitch v-model="caseSensitive">{{ i18n.ts.caseSensitive }}</MkSwitch>
|
||||||
<MkSwitch v-model="withFile">{{ i18n.ts.withFileAntenna }}</MkSwitch>
|
<MkSwitch v-model="withFile">{{ i18n.ts.withFileAntenna }}</MkSwitch>
|
||||||
<MkSwitch v-model="withFile">{{ i18n.ts.withFileAntenna }}</MkSwitch>
|
<MkSwitch v-model="hideNotesInSensitiveChannel">{{ i18n.ts.hideNotesInSensitiveChannel }}</MkSwitch>
|
||||||
</div>
|
</div>
|
||||||
<div :class="$style.actions">
|
<div :class="$style.actions">
|
||||||
<div class="_buttons">
|
<div class="_buttons">
|
||||||
|
@ -110,6 +110,7 @@ const localOnly = ref<boolean>(initialAntenna.localOnly);
|
||||||
const excludeBots = ref<boolean>(initialAntenna.excludeBots);
|
const excludeBots = ref<boolean>(initialAntenna.excludeBots);
|
||||||
const withReplies = ref<boolean>(initialAntenna.withReplies);
|
const withReplies = ref<boolean>(initialAntenna.withReplies);
|
||||||
const withFile = ref<boolean>(initialAntenna.withFile);
|
const withFile = ref<boolean>(initialAntenna.withFile);
|
||||||
|
const hideNotesInSensitiveChannel = ref<boolean>(initialAntenna.hideNotesInSensitiveChannel);
|
||||||
const userLists = ref<Misskey.entities.UserList[] | null>(null);
|
const userLists = ref<Misskey.entities.UserList[] | null>(null);
|
||||||
|
|
||||||
watch(() => src.value, async () => {
|
watch(() => src.value, async () => {
|
||||||
|
@ -126,6 +127,7 @@ async function saveAntenna() {
|
||||||
excludeBots: excludeBots.value,
|
excludeBots: excludeBots.value,
|
||||||
withReplies: withReplies.value,
|
withReplies: withReplies.value,
|
||||||
withFile: withFile.value,
|
withFile: withFile.value,
|
||||||
|
hideNotesInSensitiveChannel: hideNotesInSensitiveChannel.value,
|
||||||
caseSensitive: caseSensitive.value,
|
caseSensitive: caseSensitive.value,
|
||||||
localOnly: localOnly.value,
|
localOnly: localOnly.value,
|
||||||
users: users.value.trim().split('\n').map(x => x.trim()),
|
users: users.value.trim().split('\n').map(x => x.trim()),
|
||||||
|
|
|
@ -4654,6 +4654,8 @@ export type components = {
|
||||||
hasUnreadNote: boolean;
|
hasUnreadNote: boolean;
|
||||||
/** @default false */
|
/** @default false */
|
||||||
notify: boolean;
|
notify: boolean;
|
||||||
|
/** @default false */
|
||||||
|
hideNotesInSensitiveChannel: boolean;
|
||||||
};
|
};
|
||||||
Clip: {
|
Clip: {
|
||||||
/**
|
/**
|
||||||
|
@ -10918,6 +10920,7 @@ export type operations = {
|
||||||
excludeBots?: boolean;
|
excludeBots?: boolean;
|
||||||
withReplies: boolean;
|
withReplies: boolean;
|
||||||
withFile: boolean;
|
withFile: boolean;
|
||||||
|
hideNotesInSensitiveChannel?: boolean;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue