This commit is contained in:
syuilo 2025-08-27 09:46:31 +09:00
parent d2fd7460ed
commit 2e0a34300a
4 changed files with 8 additions and 5 deletions

View File

@ -481,6 +481,7 @@ export class UserEntityService implements OnModuleInit {
const notificationsInfo = isMe && isDetailed ? await this.getNotificationsInfo(user.id) : null; const notificationsInfo = isMe && isDetailed ? await this.getNotificationsInfo(user.id) : null;
// TODO: 例えば avatarUrl: true など間違った型を設定しても型エラーにならないのをどうにかする(ジェネリクス使わない方法で実装するしかなさそう?)
const packed = { const packed = {
id: user.id, id: user.id,
name: user.name, name: user.name,

View File

@ -65,7 +65,7 @@ export const packedUserLiteSchema = {
avatarUrl: { avatarUrl: {
type: 'string', type: 'string',
format: 'url', format: 'url',
nullable: true, optional: false, nullable: false, optional: false,
}, },
avatarBlurhash: { avatarBlurhash: {
type: 'string', type: 'string',

View File

@ -13,7 +13,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<Mfm class="summaryMfm" :text="flash.summary" :plain="true" :nowrap="true"/> <Mfm class="summaryMfm" :text="flash.summary" :plain="true" :nowrap="true"/>
</p> </p>
<footer> <footer>
<img v-if="flash.user.avatarUrl != null" class="icon" :src="flash.user.avatarUrl"/> <img class="icon" :src="flash.user.avatarUrl"/>
<p>{{ userName(flash.user) }}</p> <p>{{ userName(flash.user) }}</p>
</footer> </footer>
</article> </article>

View File

@ -30,19 +30,21 @@ const props = defineProps<{
router?: Router; router?: Router;
}>(); }>();
const router = props.router ?? inject(DI.router); const _router = props.router ?? inject(DI.router);
if (router == null) { if (_router == null) {
throw new Error('no router provided'); throw new Error('no router provided');
} }
const router = _router;
const viewId = randomId(); const viewId = randomId();
provide(DI.viewId, viewId); provide(DI.viewId, viewId);
const currentDepth = inject(DI.routerCurrentDepth, 0); const currentDepth = inject(DI.routerCurrentDepth, 0);
provide(DI.routerCurrentDepth, currentDepth + 1); provide(DI.routerCurrentDepth, currentDepth + 1);
const current = router.current!; const current = router.current;
const currentPageComponent = shallowRef('component' in current.route ? current.route.component : MkLoadingPage); const currentPageComponent = shallowRef('component' in current.route ? current.route.component : MkLoadingPage);
const currentPageProps = ref(current.props); const currentPageProps = ref(current.props);
let currentRoutePath = current.route.path; let currentRoutePath = current.route.path;