fix(frontend/XHome): fall back to user.uri if user.url does not exist (#10313)

* fix(frontend/XHome): fall back to user.uri if user.url does not exist

* Update CHANGELOG.md
This commit is contained in:
Kagami Sascha Rosylight 2023-03-13 01:46:33 +01:00 committed by GitHub
parent 44213812b8
commit 0d2bee787d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 92 additions and 22 deletions

View file

@ -7,7 +7,7 @@
<!-- <div class="punished" v-if="user.isSilenced"><i class="ti ti-alert-triangle" style="margin-right: 8px;"></i> {{ i18n.ts.userSilenced }}</div> -->
<div class="profile _gaps">
<MkRemoteCaution v-if="user.host != null" :href="user.url" class="warn"/>
<MkRemoteCaution v-if="user.host != null" :href="user.url ?? user.uri!" class="warn"/>
<div :key="user.id" class="main _panel">
<div class="banner-container" :style="style">
@ -100,7 +100,7 @@
<XPhotos :key="user.id" :user="user"/>
<XActivity :key="user.id" :user="user"/>
</template>
<MkNotes :class="$style.tl" :no-gap="true" :pagination="pagination"/>
<MkNotes v-if="!disableNotes" :class="$style.tl" :no-gap="true" :pagination="pagination"/>
</div>
</div>
<div v-if="!narrow" class="sub _gaps" style="container-type: inline-size;">
@ -137,7 +137,10 @@ const XActivity = defineAsyncComponent(() => import('./index.activity.vue'));
const props = withDefaults(defineProps<{
user: misskey.entities.UserDetailed;
/** Test only; MkNotes currently causes problems in vitest */
disableNotes: boolean;
}>(), {
disableNotes: false,
});
const router = useRouter();