diff options
Diffstat (limited to 'client/src/app/shared/shared-main')
22 files changed, 81 insertions, 62 deletions
diff --git a/client/src/app/shared/shared-main/account/account.model.ts b/client/src/app/shared/shared-main/account/account.model.ts index 65e6798d4..6d9f0ee65 100644 --- a/client/src/app/shared/shared-main/account/account.model.ts +++ b/client/src/app/shared/shared-main/account/account.model.ts | |||
@@ -14,7 +14,7 @@ export class Account extends Actor implements ServerAccount { | |||
14 | userId?: number | 14 | userId?: number |
15 | 15 | ||
16 | static GET_ACTOR_AVATAR_URL (actor: { avatar?: { url?: string, path: string } }) { | 16 | static GET_ACTOR_AVATAR_URL (actor: { avatar?: { url?: string, path: string } }) { |
17 | return Actor.GET_ACTOR_AVATAR_URL(actor) || this.GET_DEFAULT_AVATAR_URL() | 17 | return Actor.GET_ACTOR_AVATAR_URL(actor) |
18 | } | 18 | } |
19 | 19 | ||
20 | static GET_DEFAULT_AVATAR_URL () { | 20 | static GET_DEFAULT_AVATAR_URL () { |
@@ -24,8 +24,6 @@ export class Account extends Actor implements ServerAccount { | |||
24 | constructor (hash: ServerAccount) { | 24 | constructor (hash: ServerAccount) { |
25 | super(hash) | 25 | super(hash) |
26 | 26 | ||
27 | this.updateComputedAttributes() | ||
28 | |||
29 | this.displayName = hash.displayName | 27 | this.displayName = hash.displayName |
30 | this.description = hash.description | 28 | this.description = hash.description |
31 | this.userId = hash.userId | 29 | this.userId = hash.userId |
@@ -40,16 +38,9 @@ export class Account extends Actor implements ServerAccount { | |||
40 | 38 | ||
41 | updateAvatar (newAvatar: ActorImage) { | 39 | updateAvatar (newAvatar: ActorImage) { |
42 | this.avatar = newAvatar | 40 | this.avatar = newAvatar |
43 | |||
44 | this.updateComputedAttributes() | ||
45 | } | 41 | } |
46 | 42 | ||
47 | resetAvatar () { | 43 | resetAvatar () { |
48 | this.avatar = null | 44 | this.avatar = null |
49 | this.avatarUrl = Account.GET_DEFAULT_AVATAR_URL() | ||
50 | } | ||
51 | |||
52 | private updateComputedAttributes () { | ||
53 | this.avatarUrl = Account.GET_ACTOR_AVATAR_URL(this) | ||
54 | } | 45 | } |
55 | } | 46 | } |
diff --git a/client/src/app/shared/shared-main/account/actor.model.ts b/client/src/app/shared/shared-main/account/actor.model.ts index 4b036341f..6ba0bb09e 100644 --- a/client/src/app/shared/shared-main/account/actor.model.ts +++ b/client/src/app/shared/shared-main/account/actor.model.ts | |||
@@ -15,7 +15,6 @@ export abstract class Actor implements ServerActor { | |||
15 | updatedAt: Date | string | 15 | updatedAt: Date | string |
16 | 16 | ||
17 | avatar: ActorImage | 17 | avatar: ActorImage |
18 | avatarUrl: string | ||
19 | 18 | ||
20 | isLocal: boolean | 19 | isLocal: boolean |
21 | 20 | ||
diff --git a/client/src/app/shared/shared-main/buttons/action-dropdown.component.scss b/client/src/app/shared/shared-main/buttons/action-dropdown.component.scss index 724a04efc..b9a4d46dc 100644 --- a/client/src/app/shared/shared-main/buttons/action-dropdown.component.scss +++ b/client/src/app/shared/shared-main/buttons/action-dropdown.component.scss | |||
@@ -8,6 +8,9 @@ | |||
8 | .action-button { | 8 | .action-button { |
9 | @include peertube-button; | 9 | @include peertube-button; |
10 | 10 | ||
11 | display: inline-block; | ||
12 | padding: 0 10px; | ||
13 | |||
11 | &.button-styled { | 14 | &.button-styled { |
12 | 15 | ||
13 | &.grey { | 16 | &.grey { |
@@ -18,14 +21,13 @@ | |||
18 | @include orange-button; | 21 | @include orange-button; |
19 | } | 22 | } |
20 | 23 | ||
21 | &:hover, &:active, &:focus { | 24 | &:hover, |
25 | &:active, | ||
26 | &:focus { | ||
22 | background-color: $grey-background-color; | 27 | background-color: $grey-background-color; |
23 | } | 28 | } |
24 | } | 29 | } |
25 | 30 | ||
26 | display: inline-block; | ||
27 | padding: 0 10px; | ||
28 | |||
29 | &::after { | 31 | &::after { |
30 | display: none; | 32 | display: none; |
31 | } | 33 | } |
@@ -64,7 +66,8 @@ | |||
64 | @include dropdown-with-icon-item; | 66 | @include dropdown-with-icon-item; |
65 | } | 67 | } |
66 | 68 | ||
67 | a, span { | 69 | a, |
70 | span { | ||
68 | display: block; | 71 | display: block; |
69 | width: 100%; | 72 | width: 100%; |
70 | } | 73 | } |
diff --git a/client/src/app/shared/shared-main/buttons/button.component.scss b/client/src/app/shared/shared-main/buttons/button.component.scss index f73b7b808..09b5f95d7 100644 --- a/client/src/app/shared/shared-main/buttons/button.component.scss +++ b/client/src/app/shared/shared-main/buttons/button.component.scss | |||
@@ -1,6 +1,16 @@ | |||
1 | @import '_variables'; | 1 | @import '_variables'; |
2 | @import '_mixins'; | 2 | @import '_mixins'; |
3 | 3 | ||
4 | @mixin responsive-label { | ||
5 | .action-button { | ||
6 | padding: 0 13px; | ||
7 | } | ||
8 | |||
9 | .button-label { | ||
10 | display: none; | ||
11 | } | ||
12 | } | ||
13 | |||
4 | :host { | 14 | :host { |
5 | outline: none; | 15 | outline: none; |
6 | } | 16 | } |
@@ -46,12 +56,12 @@ span[class$=-button] { | |||
46 | // In a table, try to minimize the space taken by this button | 56 | // In a table, try to minimize the space taken by this button |
47 | @media screen and (max-width: 1400px) { | 57 | @media screen and (max-width: 1400px) { |
48 | :host-context(td) { | 58 | :host-context(td) { |
49 | .action-button { | 59 | @include responsive-label; |
50 | padding: 0 13px; | 60 | } |
51 | } | 61 | } |
52 | 62 | ||
53 | .button-label { | 63 | @media screen and (max-width: $small-view) { |
54 | display: none; | 64 | .responsive-label { |
55 | } | 65 | @include responsive-label; |
56 | } | 66 | } |
57 | } | 67 | } |
diff --git a/client/src/app/shared/shared-main/buttons/button.component.ts b/client/src/app/shared/shared-main/buttons/button.component.ts index 1d2be0bf9..ee74b3d12 100644 --- a/client/src/app/shared/shared-main/buttons/button.component.ts +++ b/client/src/app/shared/shared-main/buttons/button.component.ts | |||
@@ -3,7 +3,7 @@ import { GlobalIconName } from '@app/shared/shared-icons' | |||
3 | 3 | ||
4 | @Component({ | 4 | @Component({ |
5 | selector: 'my-button', | 5 | selector: 'my-button', |
6 | styleUrls: ['./button.component.scss'], | 6 | styleUrls: [ './button.component.scss' ], |
7 | templateUrl: './button.component.html' | 7 | templateUrl: './button.component.html' |
8 | }) | 8 | }) |
9 | 9 | ||
@@ -14,6 +14,7 @@ export class ButtonComponent { | |||
14 | @Input() title: string = undefined | 14 | @Input() title: string = undefined |
15 | @Input() loading = false | 15 | @Input() loading = false |
16 | @Input() disabled = false | 16 | @Input() disabled = false |
17 | @Input() responsiveLabel = false | ||
17 | 18 | ||
18 | getTitle () { | 19 | getTitle () { |
19 | return this.title || this.label | 20 | return this.title || this.label |
@@ -22,7 +23,8 @@ export class ButtonComponent { | |||
22 | getClasses () { | 23 | getClasses () { |
23 | return { | 24 | return { |
24 | [this.className]: true, | 25 | [this.className]: true, |
25 | disabled: this.disabled | 26 | disabled: this.disabled, |
27 | 'responsive-label': this.responsiveLabel | ||
26 | } | 28 | } |
27 | } | 29 | } |
28 | } | 30 | } |
diff --git a/client/src/app/shared/shared-main/buttons/delete-button.component.html b/client/src/app/shared/shared-main/buttons/delete-button.component.html index c94d8d0c9..d7a6702a7 100644 --- a/client/src/app/shared/shared-main/buttons/delete-button.component.html +++ b/client/src/app/shared/shared-main/buttons/delete-button.component.html | |||
@@ -1,4 +1,7 @@ | |||
1 | <span class="action-button action-button-delete grey-button" [ngbTooltip]="title" role="button" tabindex="0"> | 1 | <span |
2 | class="action-button action-button-delete grey-button" | ||
3 | [ngClass]="{ 'responsive-label': responsiveLabel }" [ngbTooltip]="title" role="button" tabindex="0" | ||
4 | > | ||
2 | <my-global-icon iconName="delete" aria-hidden="true"></my-global-icon> | 5 | <my-global-icon iconName="delete" aria-hidden="true"></my-global-icon> |
3 | 6 | ||
4 | <span class="button-label" *ngIf="label">{{ label }}</span> | 7 | <span class="button-label" *ngIf="label">{{ label }}</span> |
diff --git a/client/src/app/shared/shared-main/buttons/delete-button.component.ts b/client/src/app/shared/shared-main/buttons/delete-button.component.ts index 18995422a..c091f5309 100644 --- a/client/src/app/shared/shared-main/buttons/delete-button.component.ts +++ b/client/src/app/shared/shared-main/buttons/delete-button.component.ts | |||
@@ -9,6 +9,7 @@ import { Component, Input, OnInit } from '@angular/core' | |||
9 | export class DeleteButtonComponent implements OnInit { | 9 | export class DeleteButtonComponent implements OnInit { |
10 | @Input() label: string | 10 | @Input() label: string |
11 | @Input() title: string | 11 | @Input() title: string |
12 | @Input() responsiveLabel = false | ||
12 | 13 | ||
13 | ngOnInit () { | 14 | ngOnInit () { |
14 | // <my-delete-button /> No label | 15 | // <my-delete-button /> No label |
diff --git a/client/src/app/shared/shared-main/buttons/edit-button.component.html b/client/src/app/shared/shared-main/buttons/edit-button.component.html index ecb709be1..8beeee6c4 100644 --- a/client/src/app/shared/shared-main/buttons/edit-button.component.html +++ b/client/src/app/shared/shared-main/buttons/edit-button.component.html | |||
@@ -1,4 +1,7 @@ | |||
1 | <a class="action-button action-button-edit grey-button" [routerLink]="routerLink" [ngbTooltip]="title"> | 1 | <a |
2 | class="action-button action-button-edit grey-button" | ||
3 | [ngClass]="{ 'responsive-label': responsiveLabel }" [routerLink]="routerLink" [ngbTooltip]="title" | ||
4 | > | ||
2 | <my-global-icon iconName="edit" aria-hidden="true"></my-global-icon> | 5 | <my-global-icon iconName="edit" aria-hidden="true"></my-global-icon> |
3 | 6 | ||
4 | <span class="button-label" *ngIf="label">{{ label }}</span> | 7 | <span class="button-label" *ngIf="label">{{ label }}</span> |
diff --git a/client/src/app/shared/shared-main/buttons/edit-button.component.ts b/client/src/app/shared/shared-main/buttons/edit-button.component.ts index 4b76551ca..24c8625ff 100644 --- a/client/src/app/shared/shared-main/buttons/edit-button.component.ts +++ b/client/src/app/shared/shared-main/buttons/edit-button.component.ts | |||
@@ -5,11 +5,11 @@ import { Component, Input, OnInit } from '@angular/core' | |||
5 | styleUrls: [ './button.component.scss' ], | 5 | styleUrls: [ './button.component.scss' ], |
6 | templateUrl: './edit-button.component.html' | 6 | templateUrl: './edit-button.component.html' |
7 | }) | 7 | }) |
8 | |||
9 | export class EditButtonComponent implements OnInit { | 8 | export class EditButtonComponent implements OnInit { |
10 | @Input() label: string | 9 | @Input() label: string |
11 | @Input() title: string | 10 | @Input() title: string |
12 | @Input() routerLink: string[] | string = [] | 11 | @Input() routerLink: string[] | string = [] |
12 | @Input() responsiveLabel = false | ||
13 | 13 | ||
14 | ngOnInit () { | 14 | ngOnInit () { |
15 | // <my-edit-button /> No label | 15 | // <my-edit-button /> No label |
diff --git a/client/src/app/shared/shared-main/date/date-toggle.component.scss b/client/src/app/shared/shared-main/date/date-toggle.component.scss index 86700d1d4..b87f7c475 100644 --- a/client/src/app/shared/shared-main/date/date-toggle.component.scss +++ b/client/src/app/shared/shared-main/date/date-toggle.component.scss | |||
@@ -1,5 +1,5 @@ | |||
1 | .date-toggle { | 1 | .date-toggle { |
2 | &:hover { | 2 | &:hover { |
3 | cursor: default | 3 | cursor: default; |
4 | } | 4 | } |
5 | } | 5 | } |
diff --git a/client/src/app/shared/shared-main/feeds/feed.component.scss b/client/src/app/shared/shared-main/feeds/feed.component.scss index b655ee708..d39f31d70 100644 --- a/client/src/app/shared/shared-main/feeds/feed.component.scss +++ b/client/src/app/shared/shared-main/feeds/feed.component.scss | |||
@@ -5,14 +5,14 @@ | |||
5 | width: 100%; | 5 | width: 100%; |
6 | 6 | ||
7 | a { | 7 | a { |
8 | color: black; | 8 | color: #000; |
9 | display: block; | 9 | display: block; |
10 | } | 10 | } |
11 | } | 11 | } |
12 | 12 | ||
13 | my-global-icon { | 13 | my-global-icon { |
14 | @include apply-svg-color(pvar(--mainForegroundColor)); | ||
15 | |||
14 | cursor: pointer; | 16 | cursor: pointer; |
15 | width: 100%; | 17 | width: 100%; |
16 | |||
17 | @include apply-svg-color(pvar(--mainForegroundColor)) | ||
18 | } | 18 | } |
diff --git a/client/src/app/shared/shared-main/loaders/loader.component.scss b/client/src/app/shared/shared-main/loaders/loader.component.scss index ffac9c707..64138afe4 100644 --- a/client/src/app/shared/shared-main/loaders/loader.component.scss +++ b/client/src/app/shared/shared-main/loaders/loader.component.scss | |||
@@ -20,7 +20,7 @@ | |||
20 | border: 4px solid; | 20 | border: 4px solid; |
21 | border-radius: 50%; | 21 | border-radius: 50%; |
22 | animation: loader 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite; | 22 | animation: loader 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite; |
23 | border-color: #999999 transparent transparent transparent; | 23 | border-color: #999999 transparent transparent; |
24 | } | 24 | } |
25 | 25 | ||
26 | .loader div:nth-child(1) { | 26 | .loader div:nth-child(1) { |
diff --git a/client/src/app/shared/shared-main/misc/help.component.scss b/client/src/app/shared/shared-main/misc/help.component.scss index ccc91ffab..68d7ad48f 100644 --- a/client/src/app/shared/shared-main/misc/help.component.scss +++ b/client/src/app/shared/shared-main/misc/help.component.scss | |||
@@ -2,20 +2,19 @@ | |||
2 | @import '_mixins'; | 2 | @import '_mixins'; |
3 | 3 | ||
4 | .help-tooltip-button { | 4 | .help-tooltip-button { |
5 | cursor: pointer; | 5 | @include disable-outline; |
6 | border: none; | ||
7 | 6 | ||
7 | cursor: pointer; | ||
8 | border: 0; | ||
8 | margin: 5px; | 9 | margin: 5px; |
9 | 10 | ||
10 | my-global-icon { | 11 | my-global-icon { |
12 | @include apply-svg-color(pvar(--greyForegroundColor)); | ||
13 | |||
11 | width: 17px; | 14 | width: 17px; |
12 | position: relative; | 15 | position: relative; |
13 | top: -1px; | 16 | top: -1px; |
14 | |||
15 | @include apply-svg-color(pvar(--greyForegroundColor)) | ||
16 | } | 17 | } |
17 | |||
18 | @include disable-outline; | ||
19 | } | 18 | } |
20 | 19 | ||
21 | ::ng-deep { | 20 | ::ng-deep { |
diff --git a/client/src/app/shared/shared-main/misc/list-overflow.component.html b/client/src/app/shared/shared-main/misc/list-overflow.component.html index 986572801..b2e0982f1 100644 --- a/client/src/app/shared/shared-main/misc/list-overflow.component.html +++ b/client/src/app/shared/shared-main/misc/list-overflow.component.html | |||
@@ -2,19 +2,19 @@ | |||
2 | <span [id]="getId(id)" #itemsRendered *ngFor="let item of items; index as id"> | 2 | <span [id]="getId(id)" #itemsRendered *ngFor="let item of items; index as id"> |
3 | <ng-container *ngTemplateOutlet="itemTemplate; context: {item: item}"></ng-container> | 3 | <ng-container *ngTemplateOutlet="itemTemplate; context: {item: item}"></ng-container> |
4 | </span> | 4 | </span> |
5 | 5 | ||
6 | <ng-container *ngIf="isMenuDisplayed()"> | 6 | <ng-container *ngIf="isMenuDisplayed()"> |
7 | <button *ngIf="isInMobileView" class="btn btn-outline-secondary btn-sm list-overflow-menu" (click)="toggleModal()"> | 7 | <button *ngIf="isInMobileView" class="btn btn-outline-secondary btn-sm list-overflow-menu" (click)="toggleModal()"> |
8 | <span class="glyphicon glyphicon-chevron-down"></span> | 8 | <span class="glyphicon glyphicon-chevron-down"></span> |
9 | </button> | 9 | </button> |
10 | 10 | ||
11 | <div *ngIf="!isInMobileView" class="list-overflow-menu" ngbDropdown container="body" #dropdown="ngbDropdown" (mouseleave)="closeDropdownIfHovered(dropdown)" (mouseenter)="openDropdownOnHover(dropdown)"> | 11 | <div *ngIf="!isInMobileView" class="list-overflow-menu" ngbDropdown container="body" #dropdown="ngbDropdown" (mouseleave)="closeDropdownIfHovered(dropdown)" (mouseenter)="openDropdownOnHover(dropdown)"> |
12 | <button class="btn btn-outline-secondary btn-sm" [ngClass]="{ routeActive: active }" | 12 | <button class="btn btn-outline-secondary btn-sm" [ngClass]="{ 'route-active': active }" |
13 | ngbDropdownAnchor (click)="dropdownAnchorClicked(dropdown)" role="button" | 13 | ngbDropdownAnchor (click)="dropdownAnchorClicked(dropdown)" role="button" |
14 | > | 14 | > |
15 | <span class="glyphicon glyphicon-chevron-down"></span> | 15 | <span class="glyphicon glyphicon-chevron-down"></span> |
16 | </button> | 16 | </button> |
17 | 17 | ||
18 | <div ngbDropdownMenu> | 18 | <div ngbDropdownMenu> |
19 | <a *ngFor="let item of items | slice:showItemsUntilIndexExcluded:items.length" | 19 | <a *ngFor="let item of items | slice:showItemsUntilIndexExcluded:items.length" |
20 | [routerLink]="item.routerLink" routerLinkActive="active" class="dropdown-item"> | 20 | [routerLink]="item.routerLink" routerLinkActive="active" class="dropdown-item"> |
diff --git a/client/src/app/shared/shared-main/misc/list-overflow.component.scss b/client/src/app/shared/shared-main/misc/list-overflow.component.scss index 1ec044489..7e31d3850 100644 --- a/client/src/app/shared/shared-main/misc/list-overflow.component.scss +++ b/client/src/app/shared/shared-main/misc/list-overflow.component.scss | |||
@@ -15,13 +15,13 @@ | |||
15 | 15 | ||
16 | button { | 16 | button { |
17 | width: 30px; | 17 | width: 30px; |
18 | border: none; | 18 | border: 0; |
19 | 19 | ||
20 | &::after { | 20 | &::after { |
21 | display: none; | 21 | display: none; |
22 | } | 22 | } |
23 | 23 | ||
24 | &.routeActive { | 24 | &.route-active { |
25 | &::after { | 25 | &::after { |
26 | display: inherit; | 26 | display: inherit; |
27 | border: 2px solid pvar(--mainColor); | 27 | border: 2px solid pvar(--mainColor); |
@@ -36,7 +36,7 @@ button { | |||
36 | margin-top: 0 !important; | 36 | margin-top: 0 !important; |
37 | position: static; | 37 | position: static; |
38 | right: auto; | 38 | right: auto; |
39 | bottom: auto | 39 | bottom: auto; |
40 | } | 40 | } |
41 | 41 | ||
42 | .modal-body { | 42 | .modal-body { |
diff --git a/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.scss b/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.scss index 84dd7dce3..ffabb3646 100644 --- a/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.scss +++ b/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.scss | |||
@@ -11,12 +11,12 @@ | |||
11 | } | 11 | } |
12 | } | 12 | } |
13 | 13 | ||
14 | ::ng-deep .dropdown-toggle::after { | 14 | .sub-menu ::ng-deep .dropdown-toggle::after { |
15 | position: relative; | 15 | position: relative; |
16 | top: 2px; | 16 | top: 2px; |
17 | } | 17 | } |
18 | 18 | ||
19 | ::ng-deep .dropdown-menu { | 19 | .sub-menu ::ng-deep .dropdown-menu { |
20 | margin-top: 0 !important; | 20 | margin-top: 0 !important; |
21 | } | 21 | } |
22 | 22 | ||
diff --git a/client/src/app/shared/shared-main/users/user-notification.model.ts b/client/src/app/shared/shared-main/users/user-notification.model.ts index 88a4811da..ed5791794 100644 --- a/client/src/app/shared/shared-main/users/user-notification.model.ts +++ b/client/src/app/shared/shared-main/users/user-notification.model.ts | |||
@@ -258,10 +258,10 @@ export class UserNotification implements UserNotificationServer { | |||
258 | } | 258 | } |
259 | 259 | ||
260 | private setAccountAvatarUrl (actor: { avatarUrl?: string, avatar?: { url?: string, path: string } }) { | 260 | private setAccountAvatarUrl (actor: { avatarUrl?: string, avatar?: { url?: string, path: string } }) { |
261 | actor.avatarUrl = Account.GET_ACTOR_AVATAR_URL(actor) | 261 | actor.avatarUrl = Account.GET_ACTOR_AVATAR_URL(actor) || Account.GET_DEFAULT_AVATAR_URL() |
262 | } | 262 | } |
263 | 263 | ||
264 | private setVideoChannelAvatarUrl (actor: { avatarUrl?: string, avatar?: { url?: string, path: string } }) { | 264 | private setVideoChannelAvatarUrl (actor: { avatarUrl?: string, avatar?: { url?: string, path: string } }) { |
265 | actor.avatarUrl = VideoChannel.GET_ACTOR_AVATAR_URL(actor) | 265 | actor.avatarUrl = VideoChannel.GET_ACTOR_AVATAR_URL(actor) || VideoChannel.GET_DEFAULT_AVATAR_URL() |
266 | } | 266 | } |
267 | } | 267 | } |
diff --git a/client/src/app/shared/shared-main/users/user-notifications.component.scss b/client/src/app/shared/shared-main/users/user-notifications.component.scss index 5166bd559..b69d4b5d6 100644 --- a/client/src/app/shared/shared-main/users/user-notifications.component.scss +++ b/client/src/app/shared/shared-main/users/user-notifications.component.scss | |||
@@ -21,16 +21,19 @@ | |||
21 | } | 21 | } |
22 | 22 | ||
23 | my-global-icon { | 23 | my-global-icon { |
24 | @include apply-svg-color(#333); | ||
25 | |||
24 | width: 24px; | 26 | width: 24px; |
25 | margin-right: 11px; | 27 | margin-right: 11px; |
26 | margin-left: 3px; | 28 | margin-left: 3px; |
27 | |||
28 | @include apply-svg-color(#333); | ||
29 | } | 29 | } |
30 | 30 | ||
31 | .avatar { | 31 | .avatar { |
32 | @include avatar(30px); | 32 | width: 30px; |
33 | 33 | height: 30px; | |
34 | min-width: 30px; | ||
35 | min-height: 30px; | ||
36 | border-radius: 5px; | ||
34 | margin-right: 10px; | 37 | margin-right: 10px; |
35 | } | 38 | } |
36 | 39 | ||
diff --git a/client/src/app/shared/shared-main/users/user-quota.component.scss b/client/src/app/shared/shared-main/users/user-quota.component.scss index c670559d3..c06cafe29 100644 --- a/client/src/app/shared/shared-main/users/user-quota.component.scss +++ b/client/src/app/shared/shared-main/users/user-quota.component.scss | |||
@@ -11,7 +11,8 @@ label { | |||
11 | margin-right: 5px; | 11 | margin-right: 5px; |
12 | } | 12 | } |
13 | 13 | ||
14 | &, .progress { | 14 | &, |
15 | .progress { | ||
15 | width: 100% !important; | 16 | width: 100% !important; |
16 | } | 17 | } |
17 | 18 | ||
diff --git a/client/src/app/shared/shared-main/video-channel/video-channel.model.ts b/client/src/app/shared/shared-main/video-channel/video-channel.model.ts index 1ba3fcc0e..c40dd5311 100644 --- a/client/src/app/shared/shared-main/video-channel/video-channel.model.ts +++ b/client/src/app/shared/shared-main/video-channel/video-channel.model.ts | |||
@@ -18,14 +18,13 @@ export class VideoChannel extends Actor implements ServerVideoChannel { | |||
18 | 18 | ||
19 | ownerAccount?: ServerAccount | 19 | ownerAccount?: ServerAccount |
20 | ownerBy?: string | 20 | ownerBy?: string |
21 | ownerAvatarUrl?: string | ||
22 | 21 | ||
23 | videosCount?: number | 22 | videosCount?: number |
24 | 23 | ||
25 | viewsPerDay?: ViewsPerDate[] | 24 | viewsPerDay?: ViewsPerDate[] |
26 | 25 | ||
27 | static GET_ACTOR_AVATAR_URL (actor: object) { | 26 | static GET_ACTOR_AVATAR_URL (actor: object) { |
28 | return Actor.GET_ACTOR_AVATAR_URL(actor) || this.GET_DEFAULT_AVATAR_URL() | 27 | return Actor.GET_ACTOR_AVATAR_URL(actor) |
29 | } | 28 | } |
30 | 29 | ||
31 | static GET_ACTOR_BANNER_URL (channel: ServerVideoChannel) { | 30 | static GET_ACTOR_BANNER_URL (channel: ServerVideoChannel) { |
@@ -67,7 +66,6 @@ export class VideoChannel extends Actor implements ServerVideoChannel { | |||
67 | if (hash.ownerAccount) { | 66 | if (hash.ownerAccount) { |
68 | this.ownerAccount = hash.ownerAccount | 67 | this.ownerAccount = hash.ownerAccount |
69 | this.ownerBy = Actor.CREATE_BY_STRING(hash.ownerAccount.name, hash.ownerAccount.host) | 68 | this.ownerBy = Actor.CREATE_BY_STRING(hash.ownerAccount.name, hash.ownerAccount.host) |
70 | this.ownerAvatarUrl = Account.GET_ACTOR_AVATAR_URL(this.ownerAccount) | ||
71 | } | 69 | } |
72 | 70 | ||
73 | this.updateComputedAttributes() | 71 | this.updateComputedAttributes() |
@@ -94,7 +92,6 @@ export class VideoChannel extends Actor implements ServerVideoChannel { | |||
94 | } | 92 | } |
95 | 93 | ||
96 | updateComputedAttributes () { | 94 | updateComputedAttributes () { |
97 | this.avatarUrl = VideoChannel.GET_ACTOR_AVATAR_URL(this) | ||
98 | this.bannerUrl = VideoChannel.GET_ACTOR_BANNER_URL(this) | 95 | this.bannerUrl = VideoChannel.GET_ACTOR_BANNER_URL(this) |
99 | } | 96 | } |
100 | } | 97 | } |
diff --git a/client/src/app/shared/shared-main/video/video.model.ts b/client/src/app/shared/shared-main/video/video.model.ts index 14c507295..526d10e32 100644 --- a/client/src/app/shared/shared-main/video/video.model.ts +++ b/client/src/app/shared/shared-main/video/video.model.ts | |||
@@ -20,8 +20,6 @@ export class Video implements VideoServerModel { | |||
20 | byVideoChannel: string | 20 | byVideoChannel: string |
21 | byAccount: string | 21 | byAccount: string |
22 | 22 | ||
23 | videoChannelAvatarUrl: string | ||
24 | |||
25 | createdAt: Date | 23 | createdAt: Date |
26 | updatedAt: Date | 24 | updatedAt: Date |
27 | publishedAt: Date | 25 | publishedAt: Date |
@@ -143,7 +141,6 @@ export class Video implements VideoServerModel { | |||
143 | 141 | ||
144 | this.byAccount = Actor.CREATE_BY_STRING(hash.account.name, hash.account.host) | 142 | this.byAccount = Actor.CREATE_BY_STRING(hash.account.name, hash.account.host) |
145 | this.byVideoChannel = Actor.CREATE_BY_STRING(hash.channel.name, hash.channel.host) | 143 | this.byVideoChannel = Actor.CREATE_BY_STRING(hash.channel.name, hash.channel.host) |
146 | this.videoChannelAvatarUrl = VideoChannel.GET_ACTOR_AVATAR_URL(this.channel) | ||
147 | 144 | ||
148 | this.category.label = peertubeTranslate(this.category.label, translations) | 145 | this.category.label = peertubeTranslate(this.category.label, translations) |
149 | this.licence.label = peertubeTranslate(this.licence.label, translations) | 146 | this.licence.label = peertubeTranslate(this.licence.label, translations) |
diff --git a/client/src/app/shared/shared-main/video/video.service.ts b/client/src/app/shared/shared-main/video/video.service.ts index 0b708b692..7b17bd2ab 100644 --- a/client/src/app/shared/shared-main/video/video.service.ts +++ b/client/src/app/shared/shared-main/video/video.service.ts | |||
@@ -124,7 +124,17 @@ export class VideoService implements VideosProvider { | |||
124 | 124 | ||
125 | let params = new HttpParams() | 125 | let params = new HttpParams() |
126 | params = this.restService.addRestGetParams(params, pagination, sort) | 126 | params = this.restService.addRestGetParams(params, pagination, sort) |
127 | params = this.restService.addObjectParams(params, { search }) | 127 | |
128 | if (search) { | ||
129 | const filters = this.restService.parseQueryStringFilter(search, { | ||
130 | isLive: { | ||
131 | prefix: 'isLive:', | ||
132 | isBoolean: true | ||
133 | } | ||
134 | }) | ||
135 | |||
136 | params = this.restService.addObjectParams(params, filters) | ||
137 | } | ||
128 | 138 | ||
129 | return this.authHttp | 139 | return this.authHttp |
130 | .get<ResultList<Video>>(UserService.BASE_USERS_URL + 'me/videos', { params }) | 140 | .get<ResultList<Video>>(UserService.BASE_USERS_URL + 'me/videos', { params }) |