diff options
author | kimsible <kimsible@users.noreply.github.com> | 2020-08-10 23:28:31 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-08-11 08:03:28 +0200 |
commit | 7034b3c908e96e3e26aaa66299b75290adc98f02 (patch) | |
tree | 93a1e08ec555de097805228f4dbb8166ebb82608 /client/src/app/+my-account | |
parent | 30bc55c88b3b7416c2224925e88639694fd32746 (diff) | |
download | PeerTube-7034b3c908e96e3e26aaa66299b75290adc98f02.tar.gz PeerTube-7034b3c908e96e3e26aaa66299b75290adc98f02.tar.zst PeerTube-7034b3c908e96e3e26aaa66299b75290adc98f02.zip |
Refactor - improve offset content handling with fixed sub-menu and broadcast-message
Diffstat (limited to 'client/src/app/+my-account')
-rw-r--r-- | client/src/app/+my-account/my-account.component.html | 2 | ||||
-rw-r--r-- | client/src/app/+my-account/my-account.component.scss | 4 | ||||
-rw-r--r-- | client/src/app/+my-account/my-account.component.ts | 7 |
3 files changed, 7 insertions, 6 deletions
diff --git a/client/src/app/+my-account/my-account.component.html b/client/src/app/+my-account/my-account.component.html index d885eb243..b465d0156 100644 --- a/client/src/app/+my-account/my-account.component.html +++ b/client/src/app/+my-account/my-account.component.html | |||
@@ -1,7 +1,7 @@ | |||
1 | <div class="row"> | 1 | <div class="row"> |
2 | <my-top-menu-dropdown [menuEntries]="menuEntries"></my-top-menu-dropdown> | 2 | <my-top-menu-dropdown [menuEntries]="menuEntries"></my-top-menu-dropdown> |
3 | 3 | ||
4 | <div class="margin-content pb-5"> | 4 | <div class="margin-content pb-5" [ngClass]="{ 'offset-content': !isBroadcastMessageDisplayed }"> |
5 | <router-outlet></router-outlet> | 5 | <router-outlet></router-outlet> |
6 | </div> | 6 | </div> |
7 | </div> | 7 | </div> |
diff --git a/client/src/app/+my-account/my-account.component.scss b/client/src/app/+my-account/my-account.component.scss index 6c1d9519c..a5bb499b4 100644 --- a/client/src/app/+my-account/my-account.component.scss +++ b/client/src/app/+my-account/my-account.component.scss | |||
@@ -11,7 +11,3 @@ | |||
11 | 11 | ||
12 | @include sub-menu-h1; | 12 | @include sub-menu-h1; |
13 | } | 13 | } |
14 | |||
15 | ::ng-deep .anchor { | ||
16 | top: #{-($header-height + $sub-menu-height + 20px)}; // offsetTop scrollToAnchor | ||
17 | } | ||
diff --git a/client/src/app/+my-account/my-account.component.ts b/client/src/app/+my-account/my-account.component.ts index a49db56fa..56373e5f1 100644 --- a/client/src/app/+my-account/my-account.component.ts +++ b/client/src/app/+my-account/my-account.component.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { AuthService, ServerService, AuthUser } from '@app/core' | 2 | import { AuthService, ScreenService, ServerService, AuthUser } from '@app/core' |
3 | import { I18n } from '@ngx-translate/i18n-polyfill' | 3 | import { I18n } from '@ngx-translate/i18n-polyfill' |
4 | import { ServerConfig } from '@shared/models' | 4 | import { ServerConfig } from '@shared/models' |
5 | import { TopMenuDropdownParam } from '../shared/shared-main/misc/top-menu-dropdown.component' | 5 | import { TopMenuDropdownParam } from '../shared/shared-main/misc/top-menu-dropdown.component' |
@@ -18,9 +18,14 @@ export class MyAccountComponent implements OnInit { | |||
18 | constructor ( | 18 | constructor ( |
19 | private serverService: ServerService, | 19 | private serverService: ServerService, |
20 | private authService: AuthService, | 20 | private authService: AuthService, |
21 | private screenService: ScreenService, | ||
21 | private i18n: I18n | 22 | private i18n: I18n |
22 | ) { } | 23 | ) { } |
23 | 24 | ||
25 | get isBroadcastMessageDisplayed () { | ||
26 | return this.screenService.isBroadcastMessageDisplayed | ||
27 | } | ||
28 | |||
24 | ngOnInit (): void { | 29 | ngOnInit (): void { |
25 | this.serverConfig = this.serverService.getTmpConfig() | 30 | this.serverConfig = this.serverService.getTmpConfig() |
26 | this.serverService.getConfig() | 31 | this.serverService.getConfig() |