diff options
author | Chocobozzz <me@florianbigard.com> | 2020-02-17 10:27:00 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-02-17 10:27:00 +0100 |
commit | 4c1c17093461b58d3ee3f23f239e340d8dac1149 (patch) | |
tree | 236b724f1415a812a4274fd63b519124cba2e42f /client/src | |
parent | 45f1bd72a08998c60a9dd68ff069cea9de39161c (diff) | |
download | PeerTube-4c1c17093461b58d3ee3f23f239e340d8dac1149.tar.gz PeerTube-4c1c17093461b58d3ee3f23f239e340d8dac1149.tar.zst PeerTube-4c1c17093461b58d3ee3f23f239e340d8dac1149.zip |
Refactor email enabled function
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/app/+video-channels/video-channels.component.scss | 8 | ||||
-rw-r--r-- | client/src/app/header/search-typeahead.component.ts | 22 | ||||
-rw-r--r-- | client/src/sass/include/_variables.scss | 4 |
3 files changed, 12 insertions, 22 deletions
diff --git a/client/src/app/+video-channels/video-channels.component.scss b/client/src/app/+video-channels/video-channels.component.scss index aa26a7e7b..6470629f8 100644 --- a/client/src/app/+video-channels/video-channels.component.scss +++ b/client/src/app/+video-channels/video-channels.component.scss | |||
@@ -12,12 +12,10 @@ | |||
12 | display: grid !important; | 12 | display: grid !important; |
13 | grid-template-columns: 1fr auto; | 13 | grid-template-columns: 1fr auto; |
14 | grid-template-rows: 1fr auto / 1fr auto; | 14 | grid-template-rows: 1fr auto / 1fr auto; |
15 | grid-template-areas: "name buttons" | 15 | grid-template-areas: "name buttons" "lower buttons"; |
16 | "lower buttons"; | ||
17 | 16 | ||
18 | @media screen and (max-width: #{map-get($grid-breakpoints, lg)}) { | 17 | @media screen and (max-width: #{map-get($grid-breakpoints, lg)}) { |
19 | grid-template-areas: "name name" | 18 | grid-template-areas: "name name" "lower buttons"; |
20 | "lower buttons"; | ||
21 | } | 19 | } |
22 | } | 20 | } |
23 | 21 | ||
@@ -53,4 +51,4 @@ | |||
53 | my-subscribe-button { | 51 | my-subscribe-button { |
54 | height: min-content; | 52 | height: min-content; |
55 | } | 53 | } |
56 | } \ No newline at end of file | 54 | } |
diff --git a/client/src/app/header/search-typeahead.component.ts b/client/src/app/header/search-typeahead.component.ts index 210a1474c..372601fa8 100644 --- a/client/src/app/header/search-typeahead.component.ts +++ b/client/src/app/header/search-typeahead.component.ts | |||
@@ -1,17 +1,9 @@ | |||
1 | import { | 1 | import { Component, ElementRef, OnDestroy, OnInit, QueryList, ViewChild } from '@angular/core' |
2 | Component, | 2 | import { ActivatedRoute, Params, Router } from '@angular/router' |
3 | OnInit, | ||
4 | OnDestroy, | ||
5 | QueryList, | ||
6 | ViewChild, | ||
7 | ElementRef | ||
8 | } from '@angular/core' | ||
9 | import { Router, Params, ActivatedRoute } from '@angular/router' | ||
10 | import { AuthService, ServerService } from '@app/core' | 3 | import { AuthService, ServerService } from '@app/core' |
11 | import { first, tap } from 'rxjs/operators' | 4 | import { first, tap } from 'rxjs/operators' |
12 | import { ListKeyManager } from '@angular/cdk/a11y' | 5 | import { ListKeyManager } from '@angular/cdk/a11y' |
13 | import { UP_ARROW, DOWN_ARROW, ENTER } from '@angular/cdk/keycodes' | 6 | import { Result, SuggestionComponent } from './suggestion.component' |
14 | import { SuggestionComponent, Result } from './suggestion.component' | ||
15 | import { of } from 'rxjs' | 7 | import { of } from 'rxjs' |
16 | import { ServerConfig } from '@shared/models' | 8 | import { ServerConfig } from '@shared/models' |
17 | 9 | ||
@@ -145,13 +137,13 @@ export class SearchTypeaheadComponent implements OnInit, OnDestroy { | |||
145 | handleKeyUp (event: KeyboardEvent) { | 137 | handleKeyUp (event: KeyboardEvent) { |
146 | event.stopImmediatePropagation() | 138 | event.stopImmediatePropagation() |
147 | if (!this.keyboardEventsManager) return | 139 | if (!this.keyboardEventsManager) return |
148 | 140 | ||
149 | switch (event.key) { | 141 | switch (event.key) { |
150 | case "ArrowDown": | 142 | case 'ArrowDown': |
151 | case "ArrowUp": | 143 | case 'ArrowUp': |
152 | this.keyboardEventsManager.onKeydown(event) | 144 | this.keyboardEventsManager.onKeydown(event) |
153 | break | 145 | break |
154 | case "Enter": | 146 | case 'Enter': |
155 | this.newSearch = false | 147 | this.newSearch = false |
156 | this.doSearch() | 148 | this.doSearch() |
157 | break | 149 | break |
diff --git a/client/src/sass/include/_variables.scss b/client/src/sass/include/_variables.scss index d8db3f3f8..3fb8bb625 100644 --- a/client/src/sass/include/_variables.scss +++ b/client/src/sass/include/_variables.scss | |||
@@ -103,8 +103,8 @@ $variables: ( | |||
103 | 103 | ||
104 | $zindex: ( | 104 | $zindex: ( |
105 | header : 1000, | 105 | header : 1000, |
106 | /* header context */ | 106 | /* header context */ |
107 | headerLeft : 10, | 107 | headerLeft : 10, |
108 | menu : 11000, | 108 | menu : 11000, |
109 | dropdown : 12000, | 109 | dropdown : 12000, |
110 | loadbar : 13000, | 110 | loadbar : 13000, |