diff options
author | Kim <1877318+kimsible@users.noreply.github.com> | 2020-05-11 11:12:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-11 11:12:58 +0200 |
commit | 8544d8f561f6cd630973da041f36e46500fe95b7 (patch) | |
tree | 8a5b82d3e4b65308ce6584993cb3507450277f94 /client/src/app/shared/misc | |
parent | 70afd522ba3fc08fd407f622aad0f15e8e88b249 (diff) | |
download | PeerTube-8544d8f561f6cd630973da041f36e46500fe95b7.tar.gz PeerTube-8544d8f561f6cd630973da041f36e46500fe95b7.tar.zst PeerTube-8544d8f561f6cd630973da041f36e46500fe95b7.zip |
Fix regression my-account menu overflow-x on screen width < 800px (#2707)
* Fix: correct my-account menu overflow-x on touchscreens
* Add menuLeftDisplayed support for account-sub-menu
* Handle menu in screen service + clean top-menu-dropdown
* Add comment on menuWidth menu service to allow backtracking
Co-authored-by: Rigel Kent <par@rigelk.eu>
Co-authored-by: kimsible <kimsible@users.noreply.github.com>
Co-authored-by: Rigel Kent <par@rigelk.eu>
Diffstat (limited to 'client/src/app/shared/misc')
-rw-r--r-- | client/src/app/shared/misc/screen.service.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/client/src/app/shared/misc/screen.service.ts b/client/src/app/shared/misc/screen.service.ts index 9c71a8c83..fa9c71e5b 100644 --- a/client/src/app/shared/misc/screen.service.ts +++ b/client/src/app/shared/misc/screen.service.ts | |||
@@ -10,7 +10,12 @@ export class ScreenService { | |||
10 | this.refreshWindowInnerWidth() | 10 | this.refreshWindowInnerWidth() |
11 | } | 11 | } |
12 | 12 | ||
13 | isInSmallView () { | 13 | isInSmallView (marginLeft = 0) { |
14 | if (marginLeft > 0) { | ||
15 | const contentWidth = this.getWindowInnerWidth() - marginLeft | ||
16 | return contentWidth < 800 | ||
17 | } | ||
18 | |||
14 | return this.getWindowInnerWidth() < 800 | 19 | return this.getWindowInnerWidth() < 800 |
15 | } | 20 | } |
16 | 21 | ||