From 45d56009ab704b91e51f88fbb50c75e580f8a815 Mon Sep 17 00:00:00 2001 From: kimsible Date: Mon, 3 Aug 2020 03:03:45 +0200 Subject: [PATCH] Add anchors setting and handle offset with sub-meu --- client/src/app/app-routing.module.ts | 5 +++-- client/src/app/menu/menu.component.html | 8 ++++---- .../user-video-settings.component.html | 2 ++ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/client/src/app/app-routing.module.ts b/client/src/app/app-routing.module.ts index a39be17dcf05..53221f5d970d 100644 --- a/client/src/app/app-routing.module.ts +++ b/client/src/app/app-routing.module.ts @@ -67,9 +67,10 @@ const routes: Routes = [ imports: [ RouterModule.forRoot(routes, { useHash: Boolean(history.pushState) === false, - scrollPositionRestoration: 'disabled', + scrollPositionRestoration: 'enabled', preloadingStrategy: PreloadSelectedModulesList, - anchorScrolling: 'disabled' + anchorScrolling: 'enabled', + scrollOffset: [0, 81] // sub-menu-height }) ], providers: [ diff --git a/client/src/app/menu/menu.component.html b/client/src/app/menu/menu.component.html index 71fb2c15445d..213402381910 100644 --- a/client/src/app/menu/menu.component.html +++ b/client/src/app/menu/menu.component.html @@ -21,7 +21,7 @@ - + Account settings @@ -37,13 +37,13 @@ {{ language }} - + Videos: {{ videoLanguages.join(', ') }} - + Sensitive: @@ -56,7 +56,7 @@ - + More account settings diff --git a/client/src/app/shared/shared-user-settings/user-video-settings.component.html b/client/src/app/shared/shared-user-settings/user-video-settings.component.html index 0dda33af247b..bb9f5907055a 100644 --- a/client/src/app/shared/shared-user-settings/user-video-settings.component.html +++ b/client/src/app/shared/shared-user-settings/user-video-settings.component.html @@ -1,5 +1,6 @@
+
@@ -20,6 +21,7 @@
+