fix: stop scrollbar from pushing content on windows
This commit is contained in:
parent
85d5687631
commit
fff56645cc
4 changed files with 39 additions and 6 deletions
8
client/package-lock.json
generated
8
client/package-lock.json
generated
|
@ -13,7 +13,8 @@
|
||||||
"material-icons": "^1.13.12",
|
"material-icons": "^1.13.12",
|
||||||
"material-symbols": "^0.15.0",
|
"material-symbols": "^0.15.0",
|
||||||
"socket.io-client": "^4.7.4",
|
"socket.io-client": "^4.7.4",
|
||||||
"svelte-french-toast": "^1.2.0"
|
"svelte-french-toast": "^1.2.0",
|
||||||
|
"svrollbar": "^0.12.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@svelte-plugins/tooltips": "^3.0.0",
|
"@svelte-plugins/tooltips": "^3.0.0",
|
||||||
|
@ -2938,6 +2939,11 @@
|
||||||
"svelte": "^3.2.1 || ^4.0.0-next.1"
|
"svelte": "^3.2.1 || ^4.0.0-next.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/svrollbar": {
|
||||||
|
"version": "0.12.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/svrollbar/-/svrollbar-0.12.0.tgz",
|
||||||
|
"integrity": "sha512-okH0sz8bGtw+tgOfN1mpEtbveifxROcE3mbUMBJ1RQz8Q+1rVr+nVG7EAJ9b0G80cGDu7dskjAWuzj3iru0k5g=="
|
||||||
|
},
|
||||||
"node_modules/tailwindcss": {
|
"node_modules/tailwindcss": {
|
||||||
"version": "3.4.1",
|
"version": "3.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.1.tgz",
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
"material-icons": "^1.13.12",
|
"material-icons": "^1.13.12",
|
||||||
"material-symbols": "^0.15.0",
|
"material-symbols": "^0.15.0",
|
||||||
"socket.io-client": "^4.7.4",
|
"socket.io-client": "^4.7.4",
|
||||||
"svelte-french-toast": "^1.2.0"
|
"svelte-french-toast": "^1.2.0",
|
||||||
|
"svrollbar": "^0.12.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
import Loading from './lib/Loading/Loading.svelte'
|
import Loading from './lib/Loading/Loading.svelte'
|
||||||
import { settingsStore } from './lib/stores/settingsStore'
|
import { settingsStore } from './lib/stores/settingsStore'
|
||||||
import getSettings from './lib/utils/getSettings'
|
import getSettings from './lib/utils/getSettings'
|
||||||
|
import { Svrollbar } from 'svrollbar'
|
||||||
|
|
||||||
let activeApp: App = 'camera'
|
let activeApp: App = 'camera'
|
||||||
let topics: TelemetryTopics = {
|
let topics: TelemetryTopics = {
|
||||||
|
@ -43,10 +44,15 @@
|
||||||
initializationSequence()
|
initializationSequence()
|
||||||
}, 3000)
|
}, 3000)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let infotainmentViewport: Element
|
||||||
|
let infotainmentContent: Element
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<Svrollbar />
|
||||||
|
|
||||||
<main
|
<main
|
||||||
class="select-none transition-opacity duration-300"
|
class="select-none transition-opacity duration-300 overflow-x-hidden"
|
||||||
class:opacity-0={loading}
|
class:opacity-0={loading}
|
||||||
>
|
>
|
||||||
<!-- driver dashboard -->
|
<!-- driver dashboard -->
|
||||||
|
@ -54,12 +60,18 @@
|
||||||
<Dashboard />
|
<Dashboard />
|
||||||
</div>
|
</div>
|
||||||
<!-- the infotainment system -->
|
<!-- the infotainment system -->
|
||||||
<div class="min-h-screen w-[65vw] right-0 absolute infotainment-container">
|
<Svrollbar viewport={infotainmentViewport} contents={infotainmentContent} />
|
||||||
|
<div
|
||||||
|
class="min-h-screen w-[65vw] right-0 absolute infotainment-container overflow-x-hidden"
|
||||||
|
bind:this={infotainmentViewport}
|
||||||
|
>
|
||||||
<!-- dynamic app system (edit appList.ts to add new apps) -->
|
<!-- dynamic app system (edit appList.ts to add new apps) -->
|
||||||
<div class="mx-10 mt-10">
|
<div class="mx-10 mt-10 overflow-x-hidden" bind:this={infotainmentContent}>
|
||||||
<svelte:component this={appList[activeApp].component} />
|
<svelte:component this={appList[activeApp].component} />
|
||||||
</div>
|
</div>
|
||||||
<div class="fixed w-[65vw] flex justify-center right-0 bottom-0 mb-4">
|
<div
|
||||||
|
class="fixed w-[65vw] flex justify-center right-0 bottom-0 mb-4 overflow-x-hidden"
|
||||||
|
>
|
||||||
<AppBar bind:activeApp {appList} />
|
<AppBar bind:activeApp {appList} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -90,5 +102,13 @@
|
||||||
#2c3e50,
|
#2c3e50,
|
||||||
#fd746c
|
#fd746c
|
||||||
); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
|
); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
|
||||||
|
/* hide scrollbar */
|
||||||
|
-ms-overflow-style: none;
|
||||||
|
scrollbar-width: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.infotainment-container::-webkit-scrollbar {
|
||||||
|
/* hide scrollbar */
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -15,6 +15,12 @@
|
||||||
|
|
||||||
body {
|
body {
|
||||||
@apply bg-black text-white;
|
@apply bg-black text-white;
|
||||||
|
/* hide scrollbar */
|
||||||
|
-ms-overflow-style: none;
|
||||||
|
scrollbar-width: none;
|
||||||
|
}
|
||||||
|
body::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue