fix(client): patch widget sidebar
This commit is contained in:
parent
f0337595f6
commit
a2762e71ad
1 changed files with 8 additions and 3 deletions
|
@ -237,13 +237,18 @@ const DESKTOP_THRESHOLD = 1100;
|
|||
const MOBILE_THRESHOLD = 500;
|
||||
|
||||
// デスクトップでウィンドウを狭くしたときモバイルUIが表示されて欲しいことはあるので deviceKind === 'desktop' の判定は行わない
|
||||
const isDesktop = ref(window.innerWidth >= DESKTOP_THRESHOLD);
|
||||
const windowBlockSize = getComputedStyle(document.documentElement)[
|
||||
"writing-mode"
|
||||
].startsWith("vertical")
|
||||
? window.innerHeight
|
||||
: window.innerWidth;
|
||||
const isDesktop = ref(windowBlockSize >= DESKTOP_THRESHOLD);
|
||||
const isMobile = ref(
|
||||
deviceKind === "smartphone" || window.innerWidth <= MOBILE_THRESHOLD,
|
||||
deviceKind === "smartphone" || windowBlockSize <= MOBILE_THRESHOLD,
|
||||
);
|
||||
window.addEventListener("resize", () => {
|
||||
isMobile.value =
|
||||
deviceKind === "smartphone" || window.innerWidth <= MOBILE_THRESHOLD;
|
||||
deviceKind === "smartphone" || windowBlockSize <= MOBILE_THRESHOLD;
|
||||
});
|
||||
|
||||
const replaceChatButtonWithAccountButton =
|
||||
|
|
Loading…
Reference in a new issue