mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
chore(app): improved scrolling into view for main tabs
This commit is contained in:
+3
-2
@@ -74,13 +74,14 @@ const routes: Array<RouteRecordRaw> = [
|
||||
|
||||
const router = createRouter({
|
||||
scrollBehavior(to, from, savedPosition) {
|
||||
console.log(to.name);
|
||||
if (
|
||||
(to.name == 'SceneryView' || to.name == 'DriverView') &&
|
||||
(to.name == 'SceneryView' || to.name == 'DriverView' || to.name == 'PlayerProfileView') &&
|
||||
from.name !== to.name &&
|
||||
from.query['view'] === undefined &&
|
||||
!savedPosition
|
||||
)
|
||||
return { el: `.app_main`, behavior: 'instant', top: -13 };
|
||||
return { el: `.app_main`, behavior: 'smooth', top: 0 };
|
||||
|
||||
if (savedPosition) return savedPosition;
|
||||
},
|
||||
|
||||
@@ -47,6 +47,6 @@ const chosenTrain = computed(() =>
|
||||
margin: 0 auto;
|
||||
padding: 1em 0;
|
||||
max-width: var(--max-container-width);
|
||||
min-height: calc(100vh - 7em);
|
||||
min-height: 100vh;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -488,7 +488,7 @@ async function fetchPlayerJournal(playerId: string) {
|
||||
const response = await apiStore.client.get<API.PlayerJournal.Data>('api/getPlayerJournal', {
|
||||
params: {
|
||||
playerId: playerId,
|
||||
countLimit: 30
|
||||
dateScope: '14d'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -545,6 +545,8 @@ $tileColor: #181818;
|
||||
.profile-view {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
height: 100vh;
|
||||
min-height: 500px;
|
||||
}
|
||||
|
||||
.no-data-found {
|
||||
@@ -573,8 +575,6 @@ $tileColor: #181818;
|
||||
|
||||
max-width: var(--max-container-width);
|
||||
width: 100%;
|
||||
// height: calc(100vh - 0.5em);
|
||||
min-height: 900px;
|
||||
|
||||
padding: 1rem 0;
|
||||
text-align: center;
|
||||
@@ -582,8 +582,6 @@ $tileColor: #181818;
|
||||
|
||||
.view-container > div {
|
||||
position: relative;
|
||||
|
||||
// border-radius: 0.5em;
|
||||
}
|
||||
|
||||
.profile-sidebar {
|
||||
|
||||
@@ -135,6 +135,10 @@ function setViewMode(componentName: string) {
|
||||
&-view {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
height: 100vh;
|
||||
min-height: 500px;
|
||||
max-height: 2000px;
|
||||
}
|
||||
|
||||
&-offline {
|
||||
@@ -181,10 +185,6 @@ function setViewMode(componentName: string) {
|
||||
background-color: #181818;
|
||||
border-radius: 0.5em;
|
||||
padding: 1em 0.5em;
|
||||
|
||||
height: calc(100vh - 0.5em);
|
||||
min-height: 500px;
|
||||
max-height: 2000px;
|
||||
}
|
||||
|
||||
.scenery-left {
|
||||
|
||||
Reference in New Issue
Block a user