Cleanup some client FIXME
authorChocobozzz <me@florianbigard.com>
Wed, 29 Jan 2020 15:00:28 +0000 (16:00 +0100)
committerChocobozzz <me@florianbigard.com>
Wed, 29 Jan 2020 15:00:28 +0000 (16:00 +0100)
13 files changed:
client/package.json
client/src/app/+admin/follows/following-add/following-add.component.scss
client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.ts
client/src/app/app.module.ts
client/src/app/shared/buttons/button.component.scss
client/src/app/shared/menu/top-menu-dropdown.component.ts
client/src/app/shared/renderer/markdown.service.ts
client/src/app/shared/video/infinite-scroller.directive.ts
client/src/app/shared/video/video-miniature.component.html
client/src/sass/application.scss
client/src/sass/include/_mixins.scss
client/src/sass/include/_variables.scss
client/yarn.lock

index e9c74787c53192dfb217aca2aab28968fb4c83db..ef0e8c03fac7692c6635302ae385e66a3fb23a29 100644 (file)
@@ -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",
index 1baddc95febde960d96de1fcd34770937fcf33c0..df104c14eca1143ee9d1dbebc3cd46cf730de3c5 100644 (file)
@@ -7,7 +7,7 @@ textarea {
 
 .form-control {
   &, &:focus {
-    background-color: var(--inputColor);
+    background-color: var(--inputBackgroundColor);
     color: var(--mainForegroundColor);
   }
 }
index 7479442d1f1beb285e54cbc1f97be63d01b49e9d..355cb4f55b4e8f188b2648cfe3a515054b4139be 100644 (file)
@@ -9,7 +9,7 @@ export abstract class MyAccountVideoChannelEdit extends FormReactive {
   abstract isCreation (): boolean
   abstract 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 this
   onAvatarChange (formData: FormData) { /* empty */ }
 
   // Should be implemented by the child
index dda705811fb8bc8b8867081ad37b6f94139a0dd9..62915ec54048637acb426829796429bd2e289a4c 100644 (file)
@@ -48,8 +48,6 @@ export function metaFactory (serverService: ServerService): MetaLoader {
   ],
   imports: [
     BrowserModule,
-    // FIXME: https://github.com/maxisam/ngx-clipboard/issues/133
-    ClipboardModule,
 
     CoreModule,
     SharedModule,
index 2a8cfc74834ced5d1534ab63d603bd44285d53c2..3ccfefd7e022eedadabc5ab51daf54de53c31e18 100644 (file)
@@ -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 button
index 5ccdafb5480b772fc240ee8322ac4f8356c8f34d..24a083654ee5dcaecdc105f3f88a6f36a3604571 100644 (file)
@@ -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 view
     if (this.screen.isInMobileView()) {
       this.container = 'body'
     }
index 0d3fde537704f8373aec8c60d711b33e92d5881e..f0c87326f4defc13f7e2987a1db3f188839e6e6f 100644 (file)
@@ -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" field
     const MarkdownItClass: typeof import ('markdown-it') = (await import('markdown-it') as any).default
 
     const markdownIt = new MarkdownItClass('zero', { linkify: true, breaks: true, html: config.html })
index 9f613c5fa8b16d364e262e736de7505f1e6fc457..f09c3d1fc62742244f934b3383d3a67a85a93e3c 100644 (file)
@@ -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, AfterConten
     const scrollableElement = this.onItself ? this.container : window
     const 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),
index 46c49c15b93b24d540ca083cee2d683e45391f44..819be6d483c1cf014e7b4bbe8ee893f5ba00ea8f 100644 (file)
@@ -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()"
index 5dacdd73b1e4fa626eb049e41c7ebda7a8d9370d..fa245223113a01e7536d109cae0cb439d329a27f 100644 (file)
@@ -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 background
 table {
   .action-button-edit, .action-button-delete {
index 136eddd3aafa07ac6d090b1377b7f17187d9a131..ee86a32d4670b478d958f49d99ddc22c51508cbb 100644 (file)
@@ -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;
   width: $width;
   border-radius: 3px;
   overflow: hidden;
-  background: var(--inputColor);
+  background: var(--inputBackgroundColor);
   position: relative;
   font-size: 15px;
 
index 5b5ac9adce25823b3ebc1f3139870c13525bfb55..e087a25482e654e5181afb4b52969345ff23aa1d 100644 (file)
@@ -81,7 +81,7 @@ $variables: (
   --menuForegroundColor: var(--menuForegroundColor),
   --submenuColor: var(--submenuColor),
 
-  --inputColor: var(--inputColor),
+  --inputBackgroundColor: var(--inputBackgroundColor),
   --inputPlaceholderColor: var(--inputPlaceholderColor),
 
   --actionButtonColor: var(--actionButtonColor),
index 20ff5c3c8d52837713b1a5757a45e334b178ce35..98b7e58a7376c60cfb063c838b326c48319b5bcf 100644 (file)
   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"
   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"