diff options
author | Chocobozzz <me@florianbigard.com> | 2019-01-16 16:05:40 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-01-17 10:38:18 +0100 |
commit | 457bb213b273a9b206cc5654eb085cede4e916ad (patch) | |
tree | 6b1a317872a4ca27b5d0dbe543452320b26aacff /client/src/app/+my-account | |
parent | 848f499def54db2dd36437ef0dfb74dd5041c23b (diff) | |
download | PeerTube-457bb213b273a9b206cc5654eb085cede4e916ad.tar.gz PeerTube-457bb213b273a9b206cc5654eb085cede4e916ad.tar.zst PeerTube-457bb213b273a9b206cc5654eb085cede4e916ad.zip |
Refactor how we use icons
Inject them in an angular component so we can easily change their color
Diffstat (limited to 'client/src/app/+my-account')
9 files changed, 26 insertions, 19 deletions
diff --git a/client/src/app/+my-account/my-account-history/my-account-history.component.scss b/client/src/app/+my-account/my-account-history/my-account-history.component.scss index 82150cbe3..e7c6863f1 100644 --- a/client/src/app/+my-account/my-account-history/my-account-history.component.scss +++ b/client/src/app/+my-account/my-account-history/my-account-history.component.scss | |||
@@ -65,10 +65,10 @@ | |||
65 | text-overflow: ellipsis; | 65 | text-overflow: ellipsis; |
66 | white-space: nowrap; | 66 | white-space: nowrap; |
67 | font-size: 14px; | 67 | font-size: 14px; |
68 | color: #585858; | 68 | color: $grey-foreground-color; |
69 | 69 | ||
70 | &:hover { | 70 | &:hover { |
71 | color: #303030; | 71 | color: $grey-foreground-hover-color; |
72 | } | 72 | } |
73 | } | 73 | } |
74 | } | 74 | } |
diff --git a/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.html b/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.html index b98a1087e..d518b22ec 100644 --- a/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.html +++ b/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.html | |||
@@ -1,7 +1,13 @@ | |||
1 | <div class="header"> | 1 | <div class="header"> |
2 | <a routerLink="/my-account/settings" fragment="notifications" i18n>Notification preferences</a> | 2 | <a routerLink="/my-account/settings" fragment="notifications" i18n> |
3 | <my-global-icon iconName="cog"></my-global-icon> | ||
4 | Notification preferences | ||
5 | </a> | ||
3 | 6 | ||
4 | <button (click)="markAllAsRead()" i18n>Mark all as read</button> | 7 | <button (click)="markAllAsRead()" i18n> |
8 | <my-global-icon iconName="circle-tick"></my-global-icon> | ||
9 | Mark all as read | ||
10 | </button> | ||
5 | </div> | 11 | </div> |
6 | 12 | ||
7 | <my-user-notifications #userNotification></my-user-notifications> | 13 | <my-user-notifications #userNotification></my-user-notifications> |
diff --git a/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.scss b/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.scss index 86ac094c5..43d1f82ab 100644 --- a/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.scss +++ b/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.scss | |||
@@ -5,16 +5,18 @@ | |||
5 | display: flex; | 5 | display: flex; |
6 | justify-content: space-between; | 6 | justify-content: space-between; |
7 | font-size: 15px; | 7 | font-size: 15px; |
8 | margin-bottom: 10px; | 8 | margin-bottom: 20px; |
9 | 9 | ||
10 | a { | 10 | a { |
11 | @include peertube-button-link; | 11 | @include peertube-button-link; |
12 | @include grey-button; | 12 | @include grey-button; |
13 | @include button-with-icon(18px, 3px, -1px); | ||
13 | } | 14 | } |
14 | 15 | ||
15 | button { | 16 | button { |
16 | @include peertube-button; | 17 | @include peertube-button; |
17 | @include grey-button; | 18 | @include grey-button; |
19 | @include button-with-icon(20px, 3px, -1px); | ||
18 | } | 20 | } |
19 | } | 21 | } |
20 | 22 | ||
diff --git a/client/src/app/+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component.html b/client/src/app/+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component.html index fd7d7d23b..674a4e8a2 100644 --- a/client/src/app/+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component.html +++ b/client/src/app/+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component.html | |||
@@ -1,7 +1,8 @@ | |||
1 | <ng-template #modal let-close="close" let-dismiss="dismiss"> | 1 | <ng-template #modal let-close="close" let-dismiss="dismiss"> |
2 | <div class="modal-header"> | 2 | <div class="modal-header"> |
3 | <h4 i18n class="modal-title">Accept ownership</h4> | 3 | <h4 i18n class="modal-title">Accept ownership</h4> |
4 | <span class="close" aria-label="Close" role="button" (click)="dismiss()"></span> | 4 | |
5 | <my-global-icon iconName="cross" aria-label="Close" role="button" (click)="dismiss()"></my-global-icon> | ||
5 | </div> | 6 | </div> |
6 | 7 | ||
7 | <div class="modal-body" [formGroup]="form"> | 8 | <div class="modal-body" [formGroup]="form"> |
diff --git a/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.html b/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.html index df74b19b6..51db2e75d 100644 --- a/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.html +++ b/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.html | |||
@@ -1,6 +1,6 @@ | |||
1 | <div class="video-channels-header"> | 1 | <div class="video-channels-header"> |
2 | <a class="create-button" routerLink="create"> | 2 | <a class="create-button" routerLink="create"> |
3 | <span class="icon icon-add"></span> | 3 | <my-global-icon iconName="add"></my-global-icon> |
4 | <ng-container i18n>Create another video channel</ng-container> | 4 | <ng-container i18n>Create another video channel</ng-container> |
5 | </a> | 5 | </a> |
6 | </div> | 6 | </div> |
diff --git a/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.scss b/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.scss index 472cbb723..77fce138b 100644 --- a/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.scss +++ b/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.scss | |||
@@ -2,7 +2,7 @@ | |||
2 | @import '_mixins'; | 2 | @import '_mixins'; |
3 | 3 | ||
4 | .create-button { | 4 | .create-button { |
5 | @include create-button('../../../assets/images/global/add.svg'); | 5 | @include create-button; |
6 | } | 6 | } |
7 | 7 | ||
8 | /deep/ .action-button { | 8 | /deep/ .action-button { |
diff --git a/client/src/app/+my-account/my-account-videos/my-account-videos.component.html b/client/src/app/+my-account/my-account-videos/my-account-videos.component.html index a6911e4bf..69748ef37 100644 --- a/client/src/app/+my-account/my-account-videos/my-account-videos.component.html +++ b/client/src/app/+my-account/my-account-videos/my-account-videos.component.html | |||
@@ -32,7 +32,7 @@ | |||
32 | </span> | 32 | </span> |
33 | 33 | ||
34 | <span class="action-button action-button-delete-selection" (click)="deleteSelectedVideos()"> | 34 | <span class="action-button action-button-delete-selection" (click)="deleteSelectedVideos()"> |
35 | <span class="icon icon-delete-white"></span> | 35 | <my-global-icon iconName="delete"></my-global-icon> |
36 | <ng-container i18n>Delete</ng-container> | 36 | <ng-container i18n>Delete</ng-container> |
37 | </span> | 37 | </span> |
38 | </div> | 38 | </div> |
@@ -45,7 +45,7 @@ | |||
45 | 45 | ||
46 | <my-button i18n-label label="Change ownership" | 46 | <my-button i18n-label label="Change ownership" |
47 | className="action-button-change-ownership" | 47 | className="action-button-change-ownership" |
48 | icon="icon-im-with-her" | 48 | icon="im-with-her" |
49 | (click)="changeOwnership($event, video)" | 49 | (click)="changeOwnership($event, video)" |
50 | ></my-button> | 50 | ></my-button> |
51 | </div> | 51 | </div> |
@@ -53,4 +53,4 @@ | |||
53 | </div> | 53 | </div> |
54 | </div> | 54 | </div> |
55 | 55 | ||
56 | <my-video-change-ownership #videoChangeOwnershipModal></my-video-change-ownership> \ No newline at end of file | 56 | <my-video-change-ownership #videoChangeOwnershipModal></my-video-change-ownership> |
diff --git a/client/src/app/+my-account/my-account-videos/my-account-videos.component.scss b/client/src/app/+my-account/my-account-videos/my-account-videos.component.scss index a735562f8..39d0cf2f7 100644 --- a/client/src/app/+my-account/my-account-videos/my-account-videos.component.scss +++ b/client/src/app/+my-account/my-account-videos/my-account-videos.component.scss | |||
@@ -23,14 +23,11 @@ | |||
23 | .action-button-delete-selection { | 23 | .action-button-delete-selection { |
24 | @include peertube-button; | 24 | @include peertube-button; |
25 | @include orange-button; | 25 | @include orange-button; |
26 | } | 26 | @include button-with-icon(21px); |
27 | |||
28 | .icon.icon-delete-white { | ||
29 | @include icon(21px); | ||
30 | 27 | ||
31 | position: relative; | 28 | my-global-icon { |
32 | top: -2px; | 29 | @include apply-svg-color(#fff); |
33 | background-image: url('../../../assets/images/global/delete-white.svg'); | 30 | } |
34 | } | 31 | } |
35 | } | 32 | } |
36 | } | 33 | } |
diff --git a/client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.html b/client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.html index 7c0df850d..22f127904 100644 --- a/client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.html +++ b/client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.html | |||
@@ -1,7 +1,8 @@ | |||
1 | <ng-template #modal let-close="close" let-dismiss="dismiss"> | 1 | <ng-template #modal let-close="close" let-dismiss="dismiss"> |
2 | <div class="modal-header"> | 2 | <div class="modal-header"> |
3 | <h4 i18n class="modal-title">Change ownership</h4> | 3 | <h4 i18n class="modal-title">Change ownership</h4> |
4 | <span class="close" aria-label="Close" role="button" (click)="dismiss()"></span> | 4 | |
5 | <my-global-icon iconName="cross" aria-label="Close" role="button" (click)="dismiss()"></my-global-icon> | ||
5 | </div> | 6 | </div> |
6 | 7 | ||
7 | <div class="modal-body" [formGroup]="form"> | 8 | <div class="modal-body" [formGroup]="form"> |