diff options
author | Chocobozzz <me@florianbigard.com> | 2020-01-29 16:00:28 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-01-29 16:00:28 +0100 |
commit | 14aa85562cb83559d20105b4ddb4bf8b2340578a (patch) | |
tree | a49bdcbe0dd7368c001e7c897169f598eb476846 | |
parent | 75ba887d10eacb9cd1392e62f68617c7643c9add (diff) | |
download | PeerTube-14aa85562cb83559d20105b4ddb4bf8b2340578a.tar.gz PeerTube-14aa85562cb83559d20105b4ddb4bf8b2340578a.tar.zst PeerTube-14aa85562cb83559d20105b4ddb4bf8b2340578a.zip |
Cleanup some client FIXME
-rw-r--r-- | client/package.json | 2 | ||||
-rw-r--r-- | client/src/app/+admin/follows/following-add/following-add.component.scss | 2 | ||||
-rw-r--r-- | client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.ts | 2 | ||||
-rw-r--r-- | client/src/app/app.module.ts | 2 | ||||
-rw-r--r-- | client/src/app/shared/buttons/button.component.scss | 23 | ||||
-rw-r--r-- | client/src/app/shared/menu/top-menu-dropdown.component.ts | 3 | ||||
-rw-r--r-- | client/src/app/shared/renderer/markdown.service.ts | 4 | ||||
-rw-r--r-- | client/src/app/shared/video/infinite-scroller.directive.ts | 4 | ||||
-rw-r--r-- | client/src/app/shared/video/video-miniature.component.html | 2 | ||||
-rw-r--r-- | client/src/sass/application.scss | 24 | ||||
-rw-r--r-- | client/src/sass/include/_mixins.scss | 4 | ||||
-rw-r--r-- | client/src/sass/include/_variables.scss | 2 | ||||
-rw-r--r-- | client/yarn.lock | 15 |
13 files changed, 44 insertions, 45 deletions
diff --git a/client/package.json b/client/package.json index e9c74787c..ef0e8c03f 100644 --- a/client/package.json +++ b/client/package.json | |||
@@ -65,7 +65,7 @@ | |||
65 | "@types/jschannel": "^1.0.0", | 65 | "@types/jschannel": "^1.0.0", |
66 | "@types/linkifyjs": "^2.1.2", | 66 | "@types/linkifyjs": "^2.1.2", |
67 | "@types/lodash-es": "^4.17.0", | 67 | "@types/lodash-es": "^4.17.0", |
68 | "@types/markdown-it": "^0.0.5", | 68 | "@types/markdown-it": "^0.0.9", |
69 | "@types/node": "^10.9.2", | 69 | "@types/node": "^10.9.2", |
70 | "@types/sanitize-html": "1.18.0", | 70 | "@types/sanitize-html": "1.18.0", |
71 | "@types/socket.io-client": "^1.4.32", | 71 | "@types/socket.io-client": "^1.4.32", |
diff --git a/client/src/app/+admin/follows/following-add/following-add.component.scss b/client/src/app/+admin/follows/following-add/following-add.component.scss index 1baddc95f..df104c14e 100644 --- a/client/src/app/+admin/follows/following-add/following-add.component.scss +++ b/client/src/app/+admin/follows/following-add/following-add.component.scss | |||
@@ -7,7 +7,7 @@ textarea { | |||
7 | 7 | ||
8 | .form-control { | 8 | .form-control { |
9 | &, &:focus { | 9 | &, &:focus { |
10 | background-color: var(--inputColor); | 10 | background-color: var(--inputBackgroundColor); |
11 | color: var(--mainForegroundColor); | 11 | color: var(--mainForegroundColor); |
12 | } | 12 | } |
13 | } | 13 | } |
diff --git a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.ts b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.ts index 7479442d1..355cb4f55 100644 --- a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.ts +++ b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.ts | |||
@@ -9,7 +9,7 @@ export abstract class MyAccountVideoChannelEdit extends FormReactive { | |||
9 | abstract isCreation (): boolean | 9 | abstract isCreation (): boolean |
10 | abstract getFormButtonTitle (): string | 10 | abstract getFormButtonTitle (): string |
11 | 11 | ||
12 | // FIXME: We need this method so angular does not complain in the child template | 12 | // We need this method so angular does not complain in child template that doesn't need this |
13 | onAvatarChange (formData: FormData) { /* empty */ } | 13 | onAvatarChange (formData: FormData) { /* empty */ } |
14 | 14 | ||
15 | // Should be implemented by the child | 15 | // Should be implemented by the child |
diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts index dda705811..62915ec54 100644 --- a/client/src/app/app.module.ts +++ b/client/src/app/app.module.ts | |||
@@ -48,8 +48,6 @@ export function metaFactory (serverService: ServerService): MetaLoader { | |||
48 | ], | 48 | ], |
49 | imports: [ | 49 | imports: [ |
50 | BrowserModule, | 50 | BrowserModule, |
51 | // FIXME: https://github.com/maxisam/ngx-clipboard/issues/133 | ||
52 | ClipboardModule, | ||
53 | 51 | ||
54 | CoreModule, | 52 | CoreModule, |
55 | SharedModule, | 53 | SharedModule, |
diff --git a/client/src/app/shared/buttons/button.component.scss b/client/src/app/shared/buttons/button.component.scss index 2a8cfc748..3ccfefd7e 100644 --- a/client/src/app/shared/buttons/button.component.scss +++ b/client/src/app/shared/buttons/button.component.scss | |||
@@ -10,11 +10,26 @@ my-small-loader ::ng-deep .root { | |||
10 | .action-button { | 10 | .action-button { |
11 | @include peertube-button-link; | 11 | @include peertube-button-link; |
12 | @include button-with-icon(21px, 0, -2px); | 12 | @include button-with-icon(21px, 0, -2px); |
13 | } | ||
13 | 14 | ||
14 | // FIXME: Firefox does not apply global .orange-button icon color | 15 | .orange-button { |
15 | &.orange-button { | 16 | @include peertube-button; |
16 | @include apply-svg-color(#fff) | 17 | @include orange-button; |
17 | } | 18 | } |
19 | |||
20 | .orange-button-link { | ||
21 | @include peertube-button-link; | ||
22 | @include orange-button; | ||
23 | } | ||
24 | |||
25 | .grey-button { | ||
26 | @include peertube-button; | ||
27 | @include grey-button; | ||
28 | } | ||
29 | |||
30 | .grey-button-link { | ||
31 | @include peertube-button-link; | ||
32 | @include grey-button; | ||
18 | } | 33 | } |
19 | 34 | ||
20 | // In a table, try to minimize the space taken by this button | 35 | // In a table, try to minimize the space taken by this button |
diff --git a/client/src/app/shared/menu/top-menu-dropdown.component.ts b/client/src/app/shared/menu/top-menu-dropdown.component.ts index 5ccdafb54..24a083654 100644 --- a/client/src/app/shared/menu/top-menu-dropdown.component.ts +++ b/client/src/app/shared/menu/top-menu-dropdown.component.ts | |||
@@ -49,8 +49,7 @@ export class TopMenuDropdownComponent implements OnInit, OnDestroy { | |||
49 | e => e.children && e.children.some(c => !!c.iconName) | 49 | e => e.children && e.children.some(c => !!c.iconName) |
50 | ) | 50 | ) |
51 | 51 | ||
52 | // FIXME: We have to set body for the container to avoid because of scroll overflow on mobile view | 52 | // We have to set body for the container to avoid scroll overflow on mobile view |
53 | // But this break our hovering system | ||
54 | if (this.screen.isInMobileView()) { | 53 | if (this.screen.isInMobileView()) { |
55 | this.container = 'body' | 54 | this.container = 'body' |
56 | } | 55 | } |
diff --git a/client/src/app/shared/renderer/markdown.service.ts b/client/src/app/shared/renderer/markdown.service.ts index 0d3fde537..f0c87326f 100644 --- a/client/src/app/shared/renderer/markdown.service.ts +++ b/client/src/app/shared/renderer/markdown.service.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Injectable } from '@angular/core' | 1 | import { Injectable } from '@angular/core' |
2 | import { MarkdownIt } from 'markdown-it' | ||
3 | import { buildVideoLink } from '../../../assets/player/utils' | 2 | import { buildVideoLink } from '../../../assets/player/utils' |
4 | import { HtmlRendererService } from '@app/shared/renderer/html-renderer.service' | 3 | import { HtmlRendererService } from '@app/shared/renderer/html-renderer.service' |
4 | import * as MarkdownIt from 'markdown-it' | ||
5 | 5 | ||
6 | type MarkdownParsers = { | 6 | type MarkdownParsers = { |
7 | textMarkdownIt: MarkdownIt | 7 | textMarkdownIt: MarkdownIt |
@@ -100,7 +100,7 @@ export class MarkdownService { | |||
100 | } | 100 | } |
101 | 101 | ||
102 | private async createMarkdownIt (config: MarkdownConfig) { | 102 | private async createMarkdownIt (config: MarkdownConfig) { |
103 | // FIXME: import('...') returns a struct module, containing a "default" field corresponding to our sanitizeHtml function | 103 | // FIXME: import('...') returns a struct module, containing a "default" field |
104 | const MarkdownItClass: typeof import ('markdown-it') = (await import('markdown-it') as any).default | 104 | const MarkdownItClass: typeof import ('markdown-it') = (await import('markdown-it') as any).default |
105 | 105 | ||
106 | const markdownIt = new MarkdownItClass('zero', { linkify: true, breaks: true, html: config.html }) | 106 | const markdownIt = new MarkdownItClass('zero', { linkify: true, breaks: true, html: config.html }) |
diff --git a/client/src/app/shared/video/infinite-scroller.directive.ts b/client/src/app/shared/video/infinite-scroller.directive.ts index 9f613c5fa..f09c3d1fc 100644 --- a/client/src/app/shared/video/infinite-scroller.directive.ts +++ b/client/src/app/shared/video/infinite-scroller.directive.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { distinctUntilChanged, filter, map, share, startWith, tap, throttleTime } from 'rxjs/operators' | 1 | import { distinctUntilChanged, filter, map, share, startWith, throttleTime } from 'rxjs/operators' |
2 | import { AfterContentChecked, Directive, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core' | 2 | import { AfterContentChecked, Directive, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core' |
3 | import { fromEvent, Observable, Subscription } from 'rxjs' | 3 | import { fromEvent, Observable, Subscription } from 'rxjs' |
4 | 4 | ||
@@ -53,7 +53,7 @@ export class InfiniteScrollerDirective implements OnInit, OnDestroy, AfterConten | |||
53 | const scrollableElement = this.onItself ? this.container : window | 53 | const scrollableElement = this.onItself ? this.container : window |
54 | const scrollObservable = fromEvent(scrollableElement, 'scroll') | 54 | const scrollObservable = fromEvent(scrollableElement, 'scroll') |
55 | .pipe( | 55 | .pipe( |
56 | startWith(null as string), // FIXME: typings | 56 | startWith(true), |
57 | throttleTime(200, undefined, throttleOptions), | 57 | throttleTime(200, undefined, throttleOptions), |
58 | map(() => this.getScrollInfo()), | 58 | map(() => this.getScrollInfo()), |
59 | distinctUntilChanged((o1, o2) => o1.current === o2.current), | 59 | distinctUntilChanged((o1, o2) => o1.current === o2.current), |
diff --git a/client/src/app/shared/video/video-miniature.component.html b/client/src/app/shared/video/video-miniature.component.html index 46c49c15b..819be6d48 100644 --- a/client/src/app/shared/video/video-miniature.component.html +++ b/client/src/app/shared/video/video-miniature.component.html | |||
@@ -50,7 +50,7 @@ | |||
50 | </div> | 50 | </div> |
51 | 51 | ||
52 | <div class="video-actions"> | 52 | <div class="video-actions"> |
53 | <!-- FIXME: remove bottom placement when overflow is fixed in bootstrap dropdown --> | 53 | <!-- FIXME: remove bottom placement when overflow is fixed in bootstrap dropdown: https://github.com/ng-bootstrap/ng-bootstrap/issues/3495 --> |
54 | <my-video-actions-dropdown | 54 | <my-video-actions-dropdown |
55 | *ngIf="showActions" [video]="video" [displayOptions]="videoActionsDisplayOptions" placement="bottom-left bottom-right left" | 55 | *ngIf="showActions" [video]="video" [displayOptions]="videoActionsDisplayOptions" placement="bottom-left bottom-right left" |
56 | (videoRemoved)="onVideoRemoved()" (videoBlacklisted)="onVideoBlacklisted()" (videoUnblacklisted)="onVideoUnblacklisted()" | 56 | (videoRemoved)="onVideoRemoved()" (videoBlacklisted)="onVideoBlacklisted()" (videoUnblacklisted)="onVideoUnblacklisted()" |
diff --git a/client/src/sass/application.scss b/client/src/sass/application.scss index 5dacdd73b..fa2452231 100644 --- a/client/src/sass/application.scss +++ b/client/src/sass/application.scss | |||
@@ -32,7 +32,7 @@ body { | |||
32 | --menuForegroundColor: #{$menu-color}; | 32 | --menuForegroundColor: #{$menu-color}; |
33 | --submenuColor: #{$sub-menu-color}; | 33 | --submenuColor: #{$sub-menu-color}; |
34 | 34 | ||
35 | --inputColor: #{$input-background-color}; | 35 | --inputBackgroundColor: #{$input-background-color}; |
36 | --inputPlaceholderColor: #{$input-placeholder-color}; | 36 | --inputPlaceholderColor: #{$input-placeholder-color}; |
37 | 37 | ||
38 | --actionButtonColor: #{$grey-foreground-color}; | 38 | --actionButtonColor: #{$grey-foreground-color}; |
@@ -61,7 +61,7 @@ strong { | |||
61 | 61 | ||
62 | input.readonly { | 62 | input.readonly { |
63 | /* Force blank on readonly inputs */ | 63 | /* Force blank on readonly inputs */ |
64 | background-color: var(--inputColor) !important; | 64 | background-color: var(--inputBackgroundColor) !important; |
65 | } | 65 | } |
66 | 66 | ||
67 | input, textarea { | 67 | input, textarea { |
@@ -202,26 +202,6 @@ label { | |||
202 | to { transform: scale(1) rotate(360deg);} | 202 | to { transform: scale(1) rotate(360deg);} |
203 | } | 203 | } |
204 | 204 | ||
205 | .orange-button { | ||
206 | @include peertube-button; | ||
207 | @include orange-button; | ||
208 | } | ||
209 | |||
210 | .orange-button-link { | ||
211 | @include peertube-button-link; | ||
212 | @include orange-button; | ||
213 | } | ||
214 | |||
215 | .grey-button { | ||
216 | @include peertube-button; | ||
217 | @include grey-button; | ||
218 | } | ||
219 | |||
220 | .grey-button-link { | ||
221 | @include peertube-button-link; | ||
222 | @include grey-button; | ||
223 | } | ||
224 | |||
225 | // In tables, don't have a hover different background | 205 | // In tables, don't have a hover different background |
226 | table { | 206 | table { |
227 | .action-button-edit, .action-button-delete { | 207 | .action-button-edit, .action-button-delete { |
diff --git a/client/src/sass/include/_mixins.scss b/client/src/sass/include/_mixins.scss index 136eddd3a..ee86a32d4 100644 --- a/client/src/sass/include/_mixins.scss +++ b/client/src/sass/include/_mixins.scss | |||
@@ -81,7 +81,7 @@ | |||
81 | display: inline-block; | 81 | display: inline-block; |
82 | height: $button-height; | 82 | height: $button-height; |
83 | width: $width; | 83 | width: $width; |
84 | background: var(--inputColor); | 84 | background: var(--inputBackgroundColor); |
85 | border: 1px solid #C6C6C6; | 85 | border: 1px solid #C6C6C6; |
86 | border-radius: 3px; | 86 | border-radius: 3px; |
87 | padding-left: 15px; | 87 | padding-left: 15px; |
@@ -254,7 +254,7 @@ | |||
254 | width: $width; | 254 | width: $width; |
255 | border-radius: 3px; | 255 | border-radius: 3px; |
256 | overflow: hidden; | 256 | overflow: hidden; |
257 | background: var(--inputColor); | 257 | background: var(--inputBackgroundColor); |
258 | position: relative; | 258 | position: relative; |
259 | font-size: 15px; | 259 | font-size: 15px; |
260 | 260 | ||
diff --git a/client/src/sass/include/_variables.scss b/client/src/sass/include/_variables.scss index 5b5ac9adc..e087a2548 100644 --- a/client/src/sass/include/_variables.scss +++ b/client/src/sass/include/_variables.scss | |||
@@ -81,7 +81,7 @@ $variables: ( | |||
81 | --menuForegroundColor: var(--menuForegroundColor), | 81 | --menuForegroundColor: var(--menuForegroundColor), |
82 | --submenuColor: var(--submenuColor), | 82 | --submenuColor: var(--submenuColor), |
83 | 83 | ||
84 | --inputColor: var(--inputColor), | 84 | --inputBackgroundColor: var(--inputBackgroundColor), |
85 | --inputPlaceholderColor: var(--inputPlaceholderColor), | 85 | --inputPlaceholderColor: var(--inputPlaceholderColor), |
86 | 86 | ||
87 | --actionButtonColor: var(--actionButtonColor), | 87 | --actionButtonColor: var(--actionButtonColor), |
diff --git a/client/yarn.lock b/client/yarn.lock index 20ff5c3c8..98b7e58a7 100644 --- a/client/yarn.lock +++ b/client/yarn.lock | |||
@@ -1045,6 +1045,11 @@ | |||
1045 | resolved "https://registry.yarnpkg.com/@types/jschannel/-/jschannel-1.0.1.tgz#79d582ccf42554c8457230526a3054d018d559f0" | 1045 | resolved "https://registry.yarnpkg.com/@types/jschannel/-/jschannel-1.0.1.tgz#79d582ccf42554c8457230526a3054d018d559f0" |
1046 | integrity sha512-S34NuOoOOKXbft3f9GDeLKp777ABCGArZaqUWOuu1Xn+1S75Osmk8kCeqmw5x2TuASyjE082DwDAuoaXNIRCTw== | 1046 | integrity sha512-S34NuOoOOKXbft3f9GDeLKp777ABCGArZaqUWOuu1Xn+1S75Osmk8kCeqmw5x2TuASyjE082DwDAuoaXNIRCTw== |
1047 | 1047 | ||
1048 | "@types/linkify-it@*": | ||
1049 | version "2.1.0" | ||
1050 | resolved "https://registry.yarnpkg.com/@types/linkify-it/-/linkify-it-2.1.0.tgz#ea3dd64c4805597311790b61e872cbd1ed2cd806" | ||
1051 | integrity sha512-Q7DYAOi9O/+cLLhdaSvKdaumWyHbm7HAk/bFwwyTuU0arR5yyCeW5GOoqt4tJTpDRxhpx9Q8kQL6vMpuw9hDSw== | ||
1052 | |||
1048 | "@types/linkifyjs@^2.1.2": | 1053 | "@types/linkifyjs@^2.1.2": |
1049 | version "2.1.2" | 1054 | version "2.1.2" |
1050 | resolved "https://registry.yarnpkg.com/@types/linkifyjs/-/linkifyjs-2.1.2.tgz#8244f4e6d7be65359cc25a34da8977fce87a7b2e" | 1055 | resolved "https://registry.yarnpkg.com/@types/linkifyjs/-/linkifyjs-2.1.2.tgz#8244f4e6d7be65359cc25a34da8977fce87a7b2e" |
@@ -1071,10 +1076,12 @@ | |||
1071 | dependencies: | 1076 | dependencies: |
1072 | "@types/node" "*" | 1077 | "@types/node" "*" |
1073 | 1078 | ||
1074 | "@types/markdown-it@^0.0.5": | 1079 | "@types/markdown-it@^0.0.9": |
1075 | version "0.0.5" | 1080 | version "0.0.9" |
1076 | resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-0.0.5.tgz#5cdcbe08e81075d5dbf15466b311359b02a30c2b" | 1081 | resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-0.0.9.tgz#a5d552f95216c478e0a27a5acc1b28dcffd989ce" |
1077 | integrity sha512-Bhc4jTJ3g+WU+dBvyhwwssHifjqapauyjV+0cTWVWRjwDAaK9PebZBFpLJmoOCp47qlkDeeT1Y9sV9LyyaG02w== | 1082 | integrity sha512-IFSepyZXbF4dgSvsk8EsgaQ/8Msv1I5eTL0BZ0X3iGO9jw6tCVtPG8HchIPm3wrkmGdqZOD42kE0zplVi1gYDA== |
1083 | dependencies: | ||
1084 | "@types/linkify-it" "*" | ||
1078 | 1085 | ||
1079 | "@types/minimatch@*": | 1086 | "@types/minimatch@*": |
1080 | version "3.0.3" | 1087 | version "3.0.3" |