Cleanup some client FIXME

pull/2438/head
Chocobozzz 2020-01-29 16:00:28 +01:00
parent 75ba887d10
commit 14aa85562c
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
13 changed files with 44 additions and 45 deletions

View 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",

View File

@ -7,7 +7,7 @@ textarea {
.form-control {
&, &:focus {
background-color: var(--inputColor);
background-color: var(--inputBackgroundColor);
color: var(--mainForegroundColor);
}
}

View 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

View 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,

View 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

View 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'
}

View 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 })

View 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),

View 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()"

View 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 {

View 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;
@ -254,7 +254,7 @@
width: $width;
border-radius: 3px;
overflow: hidden;
background: var(--inputColor);
background: var(--inputBackgroundColor);
position: relative;
font-size: 15px;

View File

@ -81,7 +81,7 @@ $variables: (
--menuForegroundColor: var(--menuForegroundColor),
--submenuColor: var(--submenuColor),
--inputColor: var(--inputColor),
--inputBackgroundColor: var(--inputBackgroundColor),
--inputPlaceholderColor: var(--inputPlaceholderColor),
--actionButtonColor: var(--actionButtonColor),

View File

@ -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"