なんかもう色々変えた
This commit is contained in:
parent
984c8b73cc
commit
62b70f85f0
11 changed files with 43 additions and 7 deletions
|
|
@ -130,6 +130,18 @@ const DESKTOP_THRESHOLD = 1100;
|
|||
const MOBILE_THRESHOLD = 500;
|
||||
|
||||
onMounted(() => {
|
||||
if (
|
||||
window.navigator.connection.type === "cellular" &&
|
||||
!defaultStore.state.enableUltimateDataSaverMode &&
|
||||
defaultStore.state.enableCellularWithUltimateDataSaver
|
||||
) {
|
||||
defaultStore.state.enableDataSaverMode = true;
|
||||
defaultStore.state.enableUltimateDataSaverMode = true;
|
||||
} else if (window.navigator.connection.type !== "cellular" && window.navigator.connection.type !== "undefined" && defaultStore.state.enableDataSaverMode && defaultStore.state.enableCellularWithDataSaver) {
|
||||
defaultStore.state.enableDataSaverMode = false;
|
||||
defaultStore.state.enableUltimateDataSaverMode = true;
|
||||
}
|
||||
|
||||
if (
|
||||
window.navigator.connection.type === "cellular" &&
|
||||
!defaultStore.state.enableDataSaverMode &&
|
||||
|
|
@ -140,6 +152,9 @@ onMounted(() => {
|
|||
} else if (window.navigator.connection.type !== "cellular" && window.navigator.connection.type !== "undefined" && defaultStore.state.enableDataSaverMode && defaultStore.state.enableCellularWithDataSaver) {
|
||||
defaultStore.state.enableDataSaverMode = false;
|
||||
}
|
||||
if (defaultStore.state.enableUltimateDataSaverMode) {
|
||||
defaultStore.state.enableDataSaverMode = true;
|
||||
}
|
||||
});
|
||||
// デスクトップでウィンドウを狭くしたときモバイルUIが表示されて欲しいことはあるので deviceKind === 'desktop' の判定は行わない
|
||||
const isDesktop = ref(window.innerWidth >= DESKTOP_THRESHOLD);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue