feat: 絵文字のホーム通知
This commit is contained in:
parent
b7f9ad1944
commit
da83bc315a
3
locales/index.d.ts
vendored
3
locales/index.d.ts
vendored
|
@ -282,6 +282,7 @@ export interface Locale {
|
|||
"messaging": string;
|
||||
"upload": string;
|
||||
"keepOriginalUploading": string;
|
||||
"isNotifyIsHome": string;
|
||||
"keepOriginalUploadingDescription": string;
|
||||
"fromDrive": string;
|
||||
"fromUrl": string;
|
||||
|
@ -1716,8 +1717,8 @@ export interface Locale {
|
|||
"gtlAvailable": string;
|
||||
"ltlAvailable": string;
|
||||
"canPublicNote": string;
|
||||
"canScheduleNote": string;
|
||||
"canEditNote": string;
|
||||
"canScheduleNote": string;
|
||||
"canInvite": string;
|
||||
"inviteLimit": string;
|
||||
"inviteLimitCycle": string;
|
||||
|
|
|
@ -279,6 +279,7 @@ saved: "保存しました"
|
|||
messaging: "チャット"
|
||||
upload: "アップロード"
|
||||
keepOriginalUploading: "オリジナル画像を保持"
|
||||
isNotifyIsHome: "ホーム投稿で通知する"
|
||||
keepOriginalUploadingDescription: "画像をアップロードする時にオリジナル版を保持します。オフにするとアップロード時にブラウザでWeb公開用画像を生成します。"
|
||||
fromDrive: "ドライブから"
|
||||
fromUrl: "URLから"
|
||||
|
|
|
@ -38,6 +38,7 @@ export const paramDef = {
|
|||
fileId: { type: 'string', format: 'misskey:id' },
|
||||
isSensitive: { type: 'boolean' },
|
||||
localOnly: { type: 'boolean' },
|
||||
isNotifyIsHome: { type: 'boolean', default: false },
|
||||
},
|
||||
required: ['name', 'fileId'],
|
||||
} as const;
|
||||
|
@ -84,6 +85,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||
if (EmojiBotToken){
|
||||
const data_Miss = {
|
||||
'i': EmojiBotToken,
|
||||
'visibility': ps.isNotifyIsHome ? 'home' : 'public',
|
||||
'text':
|
||||
'絵文字名 : :' + ps.name + ':\n' +
|
||||
'カテゴリ : ' + ps.category + '\n' +
|
||||
|
|
|
@ -66,9 +66,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</MkFolder>
|
||||
<MkSwitch v-model="isSensitive">{{ i18n.ts.isSensitive }}</MkSwitch>
|
||||
<MkSwitch v-model="localOnly">{{ i18n.ts.localOnly }}</MkSwitch>
|
||||
<MkSwitch v-if="!isRequest" v-model="draft" :disabled="isRequest">
|
||||
<MkSwitch v-model="isNotifyIsHome">
|
||||
{{ i18n.ts.isNotifyIsHome }}
|
||||
</MkSwitch>
|
||||
<MkSwitch v-if="!isRequest" v-model="draft" >
|
||||
{{ i18n.ts.draft }}
|
||||
</MkSwitch>
|
||||
|
||||
</div>
|
||||
</MkSpacer>
|
||||
<div :class="$style.footer">
|
||||
|
@ -116,6 +120,7 @@ let file = $ref<Misskey.entities.DriveFile>();
|
|||
let chooseFile: DriveFile|null = $ref(null);
|
||||
let draft = $ref(props.emoji ? props.emoji.draft : false);
|
||||
let isRequest = $ref(props.isRequest);
|
||||
let isNotifyIsHome = $ref(false);
|
||||
let url;
|
||||
|
||||
watch($$(roleIdsThatCanBeUsedThisEmojiAsReaction), async () => {
|
||||
|
@ -148,6 +153,7 @@ async function add() {
|
|||
aliases: aliases.split(' '),
|
||||
license: license === '' ? null : license,
|
||||
fileId: chooseFile.id,
|
||||
isNotifyIsHome: isNotifyIsHome,
|
||||
});
|
||||
|
||||
emit('done', {
|
||||
|
@ -220,6 +226,7 @@ async function done() {
|
|||
isSensitive,
|
||||
localOnly,
|
||||
roleIdsThatCanBeUsedThisEmojiAsReaction: rolesThatCanBeUsedThisEmojiAsReaction.map(x => x.id),
|
||||
isNotifyIsHome,
|
||||
};
|
||||
|
||||
if (file) {
|
||||
|
|
|
@ -49,7 +49,6 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkSwitch v-model="showNoteActionsOnlyHover">{{ i18n.ts.showNoteActionsOnlyHover }}</MkSwitch>
|
||||
<MkSwitch v-model="showClipButtonInNoteFooter">{{ i18n.ts.showClipButtonInNoteFooter }}</MkSwitch>
|
||||
<MkSwitch v-model="collapseRenotes">{{ i18n.ts.collapseRenotes }}</MkSwitch>
|
||||
<MkSwitch v-model="hideMutedNotes">{{ i18n.ts.hideMutedNotes }}</MkSwitch>
|
||||
<MkSwitch v-model="showVisibilityColor">{{ i18n.ts.showVisibilityColor}}</MkSwitch>
|
||||
<MkColorInput v-if="showVisibilityColor" v-model="homeColor">
|
||||
<template #label>{{ i18n.ts._visibility.home }}</template>
|
||||
|
@ -139,10 +138,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkSwitch v-model="useSystemFont">{{ i18n.ts.useSystemFont }}</MkSwitch>
|
||||
<MkSwitch v-model="disableDrawer">{{ i18n.ts.disableDrawer }}</MkSwitch>
|
||||
<MkSwitch v-model="forceShowAds">{{ i18n.ts.forceShowAds }}</MkSwitch>
|
||||
<MkSwitch :disabled="enableUltimateDataSaverMode || enableCellularWithUltimateDataSaver" v-model="enableDataSaverMode">{{ i18n.ts.dataSaver }}</MkSwitch>
|
||||
<MkSwitch :disabled="enableUltimateDataSaverMode || enableCellularWithUltimateDataSaver" v-model="enableCellularWithDataSaver">{{ i18n.ts.cellularWithDataSaver }}</MkSwitch>
|
||||
<MkSwitch v-model="enableUltimateDataSaverMode">{{ i18n.ts.UltimateDataSaver }}</MkSwitch>
|
||||
<MkSwitch v-model="enableCellularWithUltimateDataSaver">{{ i18n.ts.cellularWithUltimateDataSaver }}</MkSwitch>
|
||||
<MkSwitch v-model="enableDataSaverMode">{{ i18n.ts.dataSaver }}</MkSwitch>
|
||||
<MkSwitch v-model="enableCellularWithDataSaver">{{ i18n.ts.cellularWithDataSaver }}</MkSwitch>
|
||||
<MkSwitch v-model="enableGamingMode">{{ i18n.ts.gamingMode }} <template #caption>{{ i18n.ts.gamingModeInfo }} </template></MkSwitch>
|
||||
<MkSwitch v-model="enableonlyAndWithSave">{{ i18n.ts.onlyAndWithSave}}<template #caption>{{ i18n.ts.onlyAndWithSaveInfo }} </template></MkSwitch>
|
||||
<MkSwitch v-model="enablehanntenn">{{ i18n.ts.hanntenn }}<template #caption>{{ i18n.ts.hanntennInfo }} </template></MkSwitch>
|
||||
|
@ -258,7 +255,6 @@ const showClipButtonInNoteFooter = computed(defaultStore.makeGetterSetter('showC
|
|||
const reactionsDisplaySize = computed(defaultStore.makeGetterSetter('reactionsDisplaySize'));
|
||||
const limitWidthOfReaction = computed(defaultStore.makeGetterSetter('limitWidthOfReaction'));
|
||||
const collapseRenotes = computed(defaultStore.makeGetterSetter('collapseRenotes'));
|
||||
const hideMutedNotes = computed(defaultStore.makeGetterSetter('hideMutedNotes'));
|
||||
const reduceAnimation = computed(defaultStore.makeGetterSetter('animation', v => !v, v => !v));
|
||||
const useBlurEffectForModal = computed(defaultStore.makeGetterSetter('useBlurEffectForModal'));
|
||||
const useBlurEffect = computed(defaultStore.makeGetterSetter('useBlurEffect'));
|
||||
|
@ -271,8 +267,6 @@ const disableShowingAnimatedImages = computed(defaultStore.makeGetterSetter('dis
|
|||
const forceShowAds = computed(defaultStore.makeGetterSetter('forceShowAds'));
|
||||
const loadRawImages = computed(defaultStore.makeGetterSetter('loadRawImages'));
|
||||
const enableCellularWithDataSaver = computed(defaultStore.makeGetterSetter('enableCellularWithDataSaver'));
|
||||
const enableUltimateDataSaverMode = computed(defaultStore.makeGetterSetter('enableUltimateDataSaverMode'))
|
||||
const enableCellularWithUltimateDataSaver = computed(defaultStore.makeGetterSetter('enableCellularWithUltimateDataSaver'));
|
||||
const highlightSensitiveMedia = computed(defaultStore.makeGetterSetter('highlightSensitiveMedia'));
|
||||
const enableDataSaverMode = computed(defaultStore.makeGetterSetter('enableDataSaverMode'));
|
||||
const imageNewTab = computed(defaultStore.makeGetterSetter('imageNewTab'));
|
||||
|
@ -301,7 +295,6 @@ const showMediaTimeline = computed(defaultStore.makeGetterSetter('showMediaTimel
|
|||
const showGlobalTimeline = computed(defaultStore.makeGetterSetter('showGlobalTimeline'));
|
||||
const showVisibilityColor = computed(defaultStore.makeGetterSetter('showVisibilityColor'))
|
||||
const FeaturedOrNote = computed(defaultStore.makeGetterSetter('FeaturedOrNote'))
|
||||
const defaultWithReplies = computed(defaultStore.makeGetterSetter('defaultWithReplies'));
|
||||
const disableStreamingTimeline = computed(defaultStore.makeGetterSetter('disableStreamingTimeline'));
|
||||
const useGroupedNotifications = computed(defaultStore.makeGetterSetter('useGroupedNotifications'));
|
||||
const indicatorCounterToggle = computed(defaultStore.makeGetterSetter('indicatorCounterToggle'));
|
||||
|
|
|
@ -234,18 +234,10 @@ export const defaultStore = markRaw(new Storage('base', {
|
|||
where: 'device',
|
||||
default: false,
|
||||
},
|
||||
enableUltimateDataSaverMode: {
|
||||
where: 'device',
|
||||
default: false,
|
||||
},
|
||||
enableCellularWithDataSaver: {
|
||||
where: 'device',
|
||||
default: false,
|
||||
},
|
||||
enableCellularWithUltimateDataSaver: {
|
||||
where: 'device',
|
||||
default: false,
|
||||
},
|
||||
disableShowingAnimatedImages: {
|
||||
where: 'device',
|
||||
default: window.matchMedia('(prefers-reduced-motion)').matches,
|
||||
|
|
Loading…
Reference in a new issue