Skip to content

Commit 60614a1

Browse files
Merge branch 'develop' into fix-check-connect-1
2 parents 2df1f21 + a77ad7a commit 60614a1

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
-
55

66
### Client
7-
-
7+
- Fix: 画面サイズが変わった際にナビゲーションバーが自動で折りたたまれない問題を修正
88

99
### Server
10+
- Fix: ユーザーのプロフィール画面をアドレス入力などで直接表示した際に概要タブの描画に失敗する問題の修正( #15032 )
1011
- Fix: 起動前の疎通チェックが機能しなくなっていた問題を修正
1112
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/737)
1213

packages/backend/src/server/web/ClientServerService.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,10 @@ export class ClientServerService {
585585
reply.header('X-Robots-Tag', 'noai');
586586
}
587587

588-
const _user = await this.userEntityService.pack(user);
588+
const _user = await this.userEntityService.pack(user, null, {
589+
schema: 'UserDetailed',
590+
userProfile: profile,
591+
});
589592

590593
return await reply.view('user', {
591594
user, profile, me,

packages/frontend/src/ui/_common_/navbar.vue

+12-10
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ SPDX-License-Identifier: AGPL-3.0-only
3636
</component>
3737
</template>
3838
<div :class="$style.divider"></div>
39-
<MkA v-if="$i.isAdmin || $i.isModerator" v-tooltip.noDelay.right="i18n.ts.controlPanel" :class="$style.item" :activeClass="$style.active" to="/admin">
39+
<MkA v-if="$i != null && ($i.isAdmin || $i.isModerator)" v-tooltip.noDelay.right="i18n.ts.controlPanel" :class="$style.item" :activeClass="$style.active" to="/admin">
4040
<i :class="$style.itemIcon" class="ti ti-dashboard ti-fw"></i><span :class="$style.itemText">{{ i18n.ts.controlPanel }}</span>
4141
</MkA>
4242
<button class="_button" :class="$style.item" @click="more">
@@ -48,10 +48,10 @@ SPDX-License-Identifier: AGPL-3.0-only
4848
</MkA>
4949
</div>
5050
<div :class="$style.bottom">
51-
<button v-tooltip.noDelay.right="i18n.ts.note" class="_button" :class="[$style.post]" data-cy-open-post-form @click="os.post">
51+
<button v-tooltip.noDelay.right="i18n.ts.note" class="_button" :class="[$style.post]" data-cy-open-post-form @click="() => { os.post(); }">
5252
<i class="ti ti-pencil ti-fw" :class="$style.postIcon"></i><span :class="$style.postText">{{ i18n.ts.note }}</span>
5353
</button>
54-
<button v-tooltip.noDelay.right="`${i18n.ts.account}: @${$i.username}`" class="_button" :class="[$style.account]" @click="openAccountMenu">
54+
<button v-if="$i != null" v-tooltip.noDelay.right="`${i18n.ts.account}: @${$i.username}`" class="_button" :class="[$style.account]" @click="openAccountMenu">
5555
<MkAvatar :user="$i" :class="$style.avatar"/><MkAcct class="_nowrap" :class="$style.acct" :user="$i"/>
5656
</button>
5757
</div>
@@ -83,8 +83,12 @@ import { $i, openAccountMenu as openAccountMenu_ } from '@/account.js';
8383
import { defaultStore } from '@/store.js';
8484
import { i18n } from '@/i18n.js';
8585
import { instance } from '@/instance.js';
86+
import { getHTMLElementOrNull } from '@/scripts/get-dom-node-or-null.js';
8687

87-
const iconOnly = ref(false);
88+
const forceIconOnly = ref(window.innerWidth <= 1279);
89+
const iconOnly = computed(() => {
90+
return forceIconOnly.value || (defaultStore.reactiveState.menuDisplay.value === 'sideIcon');
91+
});
8892

8993
const menu = computed(() => defaultStore.state.menu);
9094
const otherMenuItemIndicated = computed(() => {
@@ -95,14 +99,10 @@ const otherMenuItemIndicated = computed(() => {
9599
return false;
96100
});
97101

98-
const forceIconOnly = window.innerWidth <= 1279;
99-
100102
function calcViewState() {
101-
iconOnly.value = forceIconOnly || (defaultStore.state.menuDisplay === 'sideIcon');
103+
forceIconOnly.value = window.innerWidth <= 1279;
102104
}
103105

104-
calcViewState();
105-
106106
window.addEventListener('resize', calcViewState);
107107

108108
watch(defaultStore.reactiveState.menuDisplay, () => {
@@ -120,8 +120,10 @@ function openAccountMenu(ev: MouseEvent) {
120120
}
121121

122122
function more(ev: MouseEvent) {
123+
const target = getHTMLElementOrNull(ev.currentTarget ?? ev.target);
124+
if (!target) return;
123125
const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkLaunchPad.vue')), {
124-
src: ev.currentTarget ?? ev.target,
126+
src: target,
125127
}, {
126128
closed: () => dispose(),
127129
});

0 commit comments

Comments
 (0)