ActivityPub-federated video streaming platform using P2P directly in your web browser
Cleanup some client FIXME
Chocobozzz14aa85562cb8
diff --git a/client/package.json b/client/package.jsonindex e9c74787c5..ef0e8c03fa 100644--- a/client/package.json+++ b/client/package.json@@ -65,7 +65,7 @@"@types/jschannel": "^1.0.0","@types/linkifyjs": "^2.1.2","@types/lodash-es": "^4.17.0",- "@types/markdown-it": "^0.0.5",+ "@types/markdown-it": "^0.0.9","@types/node": "^10.9.2","@types/sanitize-html": "1.18.0","@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.scssindex 1baddc95fe..df104c14ec 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 {.form-control {&, &:focus {- background-color: var(--inputColor);+ background-color: var(--inputBackgroundColor);color: var(--mainForegroundColor);}}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.tsindex 7479442d1f..355cb4f55b 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 {abstract isCreation (): booleanabstract getFormButtonTitle (): string- // FIXME: We need this method so angular does not complain in the child template+ // We need this method so angular does not complain in child template that doesn't need thisonAvatarChange (formData: FormData) { /* empty */ }// Should be implemented by the childdiff --git a/client/src/app/app.module.ts b/client/src/app/app.module.tsindex dda705811f..62915ec540 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 {],imports: [BrowserModule,- // FIXME: https://github.com/maxisam/ngx-clipboard/issues/133- ClipboardModule,CoreModule,SharedModule,diff --git a/client/src/app/shared/buttons/button.component.scss b/client/src/app/shared/buttons/button.component.scssindex 2a8cfc7483..3ccfefd7e0 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 {.action-button {@include peertube-button-link;@include button-with-icon(21px, 0, -2px);+}- // FIXME: Firefox does not apply global .orange-button icon color- &.orange-button {- @include apply-svg-color(#fff)- }+.orange-button {+ @include peertube-button;+ @include orange-button;+}++.orange-button-link {+ @include peertube-button-link;+ @include orange-button;+}++.grey-button {+ @include peertube-button;+ @include grey-button;+}++.grey-button-link {+ @include peertube-button-link;+ @include grey-button;}// In a table, try to minimize the space taken by this buttondiff --git a/client/src/app/shared/menu/top-menu-dropdown.component.ts b/client/src/app/shared/menu/top-menu-dropdown.component.tsindex 5ccdafb548..24a083654e 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 {e => e.children && e.children.some(c => !!c.iconName))- // FIXME: We have to set body for the container to avoid because of scroll overflow on mobile view- // But this break our hovering system+ // We have to set body for the container to avoid scroll overflow on mobile viewif (this.screen.isInMobileView()) {this.container = 'body'}diff --git a/client/src/app/shared/renderer/markdown.service.ts b/client/src/app/shared/renderer/markdown.service.tsindex 0d3fde5377..f0c87326f4 100644--- a/client/src/app/shared/renderer/markdown.service.ts+++ b/client/src/app/shared/renderer/markdown.service.ts@@ -1,7 +1,7 @@import { Injectable } from '@angular/core'-import { MarkdownIt } from 'markdown-it'import { buildVideoLink } from '../../../assets/player/utils'import { HtmlRendererService } from '@app/shared/renderer/html-renderer.service'+import * as MarkdownIt from 'markdown-it'type MarkdownParsers = {textMarkdownIt: MarkdownIt@@ -100,7 +100,7 @@ export class MarkdownService {}private async createMarkdownIt (config: MarkdownConfig) {- // FIXME: import('...') returns a struct module, containing a "default" field corresponding to our sanitizeHtml function+ // FIXME: import('...') returns a struct module, containing a "default" fieldconst MarkdownItClass: typeof import ('markdown-it') = (await import('markdown-it') as any).defaultconst 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.tsindex 9f613c5fa8..f09c3d1fc6 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 @@-import { distinctUntilChanged, filter, map, share, startWith, tap, throttleTime } from 'rxjs/operators'+import { distinctUntilChanged, filter, map, share, startWith, throttleTime } from 'rxjs/operators'import { AfterContentChecked, Directive, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core'import { fromEvent, Observable, Subscription } from 'rxjs'@@ -53,7 +53,7 @@ export class InfiniteScrollerDirective implements OnInit, OnDestroy, AfterContenconst scrollableElement = this.onItself ? this.container : windowconst scrollObservable = fromEvent(scrollableElement, 'scroll').pipe(- startWith(null as string), // FIXME: typings+ startWith(true),throttleTime(200, undefined, throttleOptions),map(() => this.getScrollInfo()),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.htmlindex 46c49c15b9..819be6d483 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 @@</div><div class="video-actions">- <!-- FIXME: remove bottom placement when overflow is fixed in bootstrap dropdown -->+ <!-- FIXME: remove bottom placement when overflow is fixed in bootstrap dropdown: https://github.com/ng-bootstrap/ng-bootstrap/issues/3495 --><my-video-actions-dropdown*ngIf="showActions" [video]="video" [displayOptions]="videoActionsDisplayOptions" placement="bottom-left bottom-right left"(videoRemoved)="onVideoRemoved()" (videoBlacklisted)="onVideoBlacklisted()" (videoUnblacklisted)="onVideoUnblacklisted()"diff --git a/client/src/sass/application.scss b/client/src/sass/application.scssindex 5dacdd73b1..fa24522311 100644--- a/client/src/sass/application.scss+++ b/client/src/sass/application.scss@@ -32,7 +32,7 @@ body {--menuForegroundColor: #{$menu-color};--submenuColor: #{$sub-menu-color};- --inputColor: #{$input-background-color};+ --inputBackgroundColor: #{$input-background-color};--inputPlaceholderColor: #{$input-placeholder-color};--actionButtonColor: #{$grey-foreground-color};@@ -61,7 +61,7 @@ strong {input.readonly {/* Force blank on readonly inputs */- background-color: var(--inputColor) !important;+ background-color: var(--inputBackgroundColor) !important;}input, textarea {@@ -202,26 +202,6 @@ label {to { transform: scale(1) rotate(360deg);}}-.orange-button {- @include peertube-button;- @include orange-button;-}--.orange-button-link {- @include peertube-button-link;- @include orange-button;-}--.grey-button {- @include peertube-button;- @include grey-button;-}--.grey-button-link {- @include peertube-button-link;- @include grey-button;-}-// In tables, don't have a hover different backgroundtable {.action-button-edit, .action-button-delete {diff --git a/client/src/sass/include/_mixins.scss b/client/src/sass/include/_mixins.scssindex 136eddd3aa..ee86a32d46 100644--- a/client/src/sass/include/_mixins.scss+++ b/client/src/sass/include/_mixins.scss@@ -81,7 +81,7 @@display: inline-block;height: $button-height;width: $width;- background: var(--inputColor);+ background: var(--inputBackgroundColor);border: 1px solid #C6C6C6;border-radius: 3px;padding-left: 15px;@@ -254,7 +254,7 @@width: $width;border-radius: 3px;overflow: hidden;- background: var(--inputColor);+ background: var(--inputBackgroundColor);position: relative;font-size: 15px;diff --git a/client/src/sass/include/_variables.scss b/client/src/sass/include/_variables.scssindex 5b5ac9adce..e087a25482 100644--- a/client/src/sass/include/_variables.scss+++ b/client/src/sass/include/_variables.scss@@ -81,7 +81,7 @@ $variables: (--menuForegroundColor: var(--menuForegroundColor),--submenuColor: var(--submenuColor),- --inputColor: var(--inputColor),+ --inputBackgroundColor: var(--inputBackgroundColor),--inputPlaceholderColor: var(--inputPlaceholderColor),--actionButtonColor: var(--actionButtonColor),diff --git a/client/yarn.lock b/client/yarn.lockindex 20ff5c3c8d..98b7e58a73 100644--- a/client/yarn.lock+++ b/client/yarn.lock@@ -1045,6 +1045,11 @@resolved "https://registry.yarnpkg.com/@types/jschannel/-/jschannel-1.0.1.tgz#79d582ccf42554c8457230526a3054d018d559f0"integrity sha512-S34NuOoOOKXbft3f9GDeLKp777ABCGArZaqUWOuu1Xn+1S75Osmk8kCeqmw5x2TuASyjE082DwDAuoaXNIRCTw==+"@types/linkify-it@*":+ version "2.1.0"+ resolved "https://registry.yarnpkg.com/@types/linkify-it/-/linkify-it-2.1.0.tgz#ea3dd64c4805597311790b61e872cbd1ed2cd806"+ integrity sha512-Q7DYAOi9O/+cLLhdaSvKdaumWyHbm7HAk/bFwwyTuU0arR5yyCeW5GOoqt4tJTpDRxhpx9Q8kQL6vMpuw9hDSw==+"@types/linkifyjs@^2.1.2":version "2.1.2"resolved "https://registry.yarnpkg.com/@types/linkifyjs/-/linkifyjs-2.1.2.tgz#8244f4e6d7be65359cc25a34da8977fce87a7b2e"@@ -1071,10 +1076,12 @@dependencies:"@types/node" "*"-"@types/markdown-it@^0.0.5":- version "0.0.5"- resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-0.0.5.tgz#5cdcbe08e81075d5dbf15466b311359b02a30c2b"- integrity sha512-Bhc4jTJ3g+WU+dBvyhwwssHifjqapauyjV+0cTWVWRjwDAaK9PebZBFpLJmoOCp47qlkDeeT1Y9sV9LyyaG02w==+"@types/markdown-it@^0.0.9":+ version "0.0.9"+ resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-0.0.9.tgz#a5d552f95216c478e0a27a5acc1b28dcffd989ce"+ integrity sha512-IFSepyZXbF4dgSvsk8EsgaQ/8Msv1I5eTL0BZ0X3iGO9jw6tCVtPG8HchIPm3wrkmGdqZOD42kE0zplVi1gYDA==+ dependencies:+ "@types/linkify-it" "*""@types/minimatch@*":version "3.0.3"