Compare commits
7 Commits
356d0e7da0
...
e8011c07df
Author | SHA1 | Date |
---|---|---|
MattyaDaihuku | e8011c07df | |
zawa-ch. | 763c708253 | |
MattyaDaihuku | e9e2e3c6b3 | |
MattyaDaihuku | 1368f58b96 | |
MattyaDaihuku | 8c1dfab195 | |
MattyaDaihuku | 40ac246e5b | |
MattyaDaihuku | 2dcd9118e9 |
|
@ -64,6 +64,7 @@
|
|||
- Fix: FTT無効時にユーザーリストタイムラインが使用できない問題を修正
|
||||
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/709)
|
||||
- Fix: User Webhookテスト機能のMock Payloadを修正
|
||||
- Fix: アカウント削除のモデレーションログが動作していないのを修正 (#14996)
|
||||
|
||||
### Misskey.js
|
||||
- Fix: Stream初期化時、別途WebSocketを指定する場合の型定義を修正
|
||||
|
|
|
@ -7458,6 +7458,14 @@ export interface Locale extends ILocale {
|
|||
* 常に表示
|
||||
*/
|
||||
"always": string;
|
||||
/**
|
||||
* リモートユーザーに表示(アイコンのみ)
|
||||
*/
|
||||
"remoteIcon": string;
|
||||
/**
|
||||
* 常に表示(アイコンのみ)
|
||||
*/
|
||||
"alwaysIcon": string;
|
||||
};
|
||||
"_serverDisconnectedBehavior": {
|
||||
/**
|
||||
|
|
|
@ -1947,6 +1947,8 @@ _instanceTicker:
|
|||
none: "表示しない"
|
||||
remote: "リモートユーザーに表示"
|
||||
always: "常に表示"
|
||||
remoteIcon: "リモートユーザーに表示(アイコンのみ)"
|
||||
alwaysIcon: "常に表示(アイコンのみ)"
|
||||
|
||||
_serverDisconnectedBehavior:
|
||||
reload: "自動でリロード"
|
||||
|
|
|
@ -46,7 +46,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
throw new Error('cannot delete a root account');
|
||||
}
|
||||
|
||||
await this.deleteAccoountService.deleteAccount(user);
|
||||
await this.deleteAccoountService.deleteAccount(user, me);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,13 +33,13 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
|
||||
private deleteAccountService: DeleteAccountService,
|
||||
) {
|
||||
super(meta, paramDef, async (ps) => {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
const user = await this.usersRepository.findOneByOrFail({ id: ps.userId });
|
||||
if (user.isDeleted) {
|
||||
return;
|
||||
}
|
||||
|
||||
await this.deleteAccountService.deleteAccount(user);
|
||||
await this.deleteAccountService.deleteAccount(user, me);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</div>
|
||||
<article v-else :class="$style.article" @contextmenu.stop="onContextmenu">
|
||||
<div v-if="appearNote.channel" :class="$style.colorBar" :style="{ background: appearNote.channel.color }"></div>
|
||||
<MkAvatar :class="$style.avatar" :user="appearNote.user" :link="!mock" :preview="!mock"/>
|
||||
<MkAvatar :class="$style.avatar" :user="appearNote.user" :link="!mock" :preview="!mock" :showInstance="showInstanceIcon && !showTicker"/>
|
||||
<div :class="$style.main">
|
||||
<MkNoteHeader :note="appearNote" :mini="true"/>
|
||||
<MkInstanceTicker v-if="showTicker" :instance="appearNote.user.instance"/>
|
||||
|
@ -275,6 +275,7 @@ const hardMuted = ref(props.withHardMute && checkMute(appearNote.value, $i?.hard
|
|||
const translation = ref<Misskey.entities.NotesTranslateResponse | null>(null);
|
||||
const translating = ref(false);
|
||||
const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.value.user.instance);
|
||||
const showInstanceIcon = (defaultStore.state.instanceTicker === 'alwaysIcon') || (defaultStore.state.instanceTicker === 'remoteIcon' && appearNote.value.user.instance);
|
||||
const canRenote = computed(() => ['public', 'home'].includes(appearNote.value.visibility) || (appearNote.value.visibility === 'followers' && appearNote.value.userId === $i?.id));
|
||||
const renoteCollapsed = ref(
|
||||
defaultStore.state.collapseRenotes && isRenote && (
|
||||
|
|
|
@ -70,7 +70,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<img v-for="(role, i) in appearNote.user.badgeRoles" :key="i" v-tooltip="role.name" :class="$style.noteHeaderBadgeRole" :src="role.iconUrl!"/>
|
||||
</div>
|
||||
</div>
|
||||
<MkInstanceTicker v-if="showTicker" :instance="appearNote.user.instance"/>
|
||||
<MkInstanceTicker v-if="showTicker || showInstanceIcon" :instance="appearNote.user.instance"/>
|
||||
</div>
|
||||
</header>
|
||||
<div :class="$style.noteContent">
|
||||
|
@ -302,6 +302,7 @@ const translating = ref(false);
|
|||
const parsed = appearNote.value.text ? mfm.parse(appearNote.value.text) : null;
|
||||
const urls = parsed ? extractUrlFromMfm(parsed).filter((url) => appearNote.value.renote?.url !== url && appearNote.value.renote?.uri !== url) : null;
|
||||
const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.value.user.instance);
|
||||
const showInstanceIcon = (defaultStore.state.instanceTicker === 'alwaysIcon') || (defaultStore.state.instanceTicker === 'remoteIcon' && appearNote.value.user.instance);
|
||||
const conversation = ref<Misskey.entities.Note[]>([]);
|
||||
const replies = ref<Misskey.entities.Note[]>([]);
|
||||
const canRenote = computed(() => ['public', 'home'].includes(appearNote.value.visibility) || appearNote.value.userId === $i?.id);
|
||||
|
|
|
@ -23,6 +23,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="showInstance">
|
||||
<img v-if="faviconUrl" :class="$style.instanceIcon" :src="faviconUrl" :title="instance.name ?? undefined"/>
|
||||
</div>
|
||||
<template v-if="showDecoration">
|
||||
<img
|
||||
v-for="decoration in decorations ?? user.avatarDecorations"
|
||||
|
@ -42,10 +45,12 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<script lang="ts" setup>
|
||||
import { watch, ref, computed } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { instanceName } from '@@/js/config.js';
|
||||
import { extractAvgColorFromBlurhash } from '@@/js/extract-avg-color-from-blurhash.js';
|
||||
import MkImgWithBlurhash from '../MkImgWithBlurhash.vue';
|
||||
import MkA from './MkA.vue';
|
||||
import { getStaticImageUrl } from '@/scripts/media-proxy.js';
|
||||
import { instance as Instance } from '@/instance.js';
|
||||
import { getStaticImageUrl, getProxiedImageUrlNullable } from '@/scripts/media-proxy.js';
|
||||
import { acct, userPage } from '@/filters/user.js';
|
||||
import MkUserOnlineIndicator from '@/components/MkUserOnlineIndicator.vue';
|
||||
import { defaultStore } from '@/store.js';
|
||||
|
@ -62,6 +67,11 @@ const props = withDefaults(defineProps<{
|
|||
indicator?: boolean;
|
||||
decorations?: (Omit<Misskey.entities.UserDetailed['avatarDecorations'][number], 'id'> & { blink?: boolean; })[];
|
||||
forceShowDecoration?: boolean;
|
||||
showInstance?: boolean;
|
||||
instance?: {
|
||||
faviconUrl?: string | null,
|
||||
name?: string | null,
|
||||
};
|
||||
}>(), {
|
||||
target: null,
|
||||
link: false,
|
||||
|
@ -69,6 +79,8 @@ const props = withDefaults(defineProps<{
|
|||
indicator: false,
|
||||
decorations: undefined,
|
||||
forceShowDecoration: false,
|
||||
showInstance: false,
|
||||
instance: undefined,
|
||||
});
|
||||
|
||||
const emit = defineEmits<{
|
||||
|
@ -77,6 +89,12 @@ const emit = defineEmits<{
|
|||
|
||||
const showDecoration = props.forceShowDecoration || defaultStore.state.showAvatarDecorations;
|
||||
|
||||
const instance = props.instance ?? {
|
||||
name: instanceName,
|
||||
};
|
||||
|
||||
const faviconUrl = computed(() => props.instance ? getProxiedImageUrlNullable(props.instance.faviconUrl, 'preview') : getProxiedImageUrlNullable(Instance.iconUrl, 'preview') ?? '/favicon.ico');
|
||||
|
||||
const bound = computed(() => props.link
|
||||
? { to: userPage(props.user), target: props.target }
|
||||
: {});
|
||||
|
@ -343,4 +361,32 @@ watch(() => props.user.avatarBlurhash, () => {
|
|||
filter: brightness(1);
|
||||
}
|
||||
}
|
||||
|
||||
.instanceIcon {
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
border-radius: 50%;
|
||||
opacity: 0.65;
|
||||
z-index: 2;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
background: var(--MI_THEME-panel);
|
||||
box-shadow: 0 0 0 2px var(--MI_THEME-panel);
|
||||
|
||||
@container (max-width: 580px) {
|
||||
width: 21px;
|
||||
height: 21px;
|
||||
}
|
||||
|
||||
@container (max-width: 450px) {
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
}
|
||||
|
||||
@container (max-width: 300px) {
|
||||
width: 17px;
|
||||
height: 17px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -69,6 +69,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<option value="none">{{ i18n.ts._instanceTicker.none }}</option>
|
||||
<option value="remote">{{ i18n.ts._instanceTicker.remote }}</option>
|
||||
<option value="always">{{ i18n.ts._instanceTicker.always }}</option>
|
||||
<option value="remoteIcon">{{ i18n.ts._instanceTicker.remoteIcon }}</option>
|
||||
<option value="alwaysIcon">{{ i18n.ts._instanceTicker.alwaysIcon }}</option>
|
||||
</MkSelect>
|
||||
|
||||
<MkSelect v-model="nsfw">
|
||||
|
|
|
@ -296,7 +296,7 @@ export const defaultStore = markRaw(new Storage('base', {
|
|||
},
|
||||
instanceTicker: {
|
||||
where: 'device',
|
||||
default: 'remote' as 'none' | 'remote' | 'always',
|
||||
default: 'remote' as 'none' | 'remote' | 'always' | 'remoteIcon' | 'alwaysIcon',
|
||||
},
|
||||
emojiPickerScale: {
|
||||
where: 'device',
|
||||
|
|
Loading…
Reference in New Issue