diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-04-02 11:39:14 +0200 |
---|---|---|
committer | Rigel Kent <sendmemail@rigelk.eu> | 2020-04-02 11:39:14 +0200 |
commit | a6d5ff7604a3c2a94ff8814e2df7ca7bb2b48634 (patch) | |
tree | d8b27f30741ae3c9a2a72c68210644c16cd8d9b3 /client/src/app/+admin | |
parent | 21973012ab06a93dd901821dbbe078eb793bac4d (diff) | |
download | PeerTube-a6d5ff7604a3c2a94ff8814e2df7ca7bb2b48634.tar.gz PeerTube-a6d5ff7604a3c2a94ff8814e2df7ca7bb2b48634.tar.zst PeerTube-a6d5ff7604a3c2a94ff8814e2df7ca7bb2b48634.zip |
Use form-control to display box-shadow on form inputs/selects upon focus
Diffstat (limited to 'client/src/app/+admin')
4 files changed, 26 insertions, 30 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html index bde27b206..4ce4c18fc 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html | |||
@@ -19,7 +19,7 @@ | |||
19 | <div class="form-group"> | 19 | <div class="form-group"> |
20 | <label i18n for="instanceName">Name</label> | 20 | <label i18n for="instanceName">Name</label> |
21 | <input | 21 | <input |
22 | type="text" id="instanceName" | 22 | type="text" id="instanceName" class="form-control" |
23 | formControlName="name" [ngClass]="{ 'input-error': formErrors.instance.name }" | 23 | formControlName="name" [ngClass]="{ 'input-error': formErrors.instance.name }" |
24 | > | 24 | > |
25 | <div *ngIf="formErrors.instance.name" class="form-error">{{ formErrors.instance.name }}</div> | 25 | <div *ngIf="formErrors.instance.name" class="form-error">{{ formErrors.instance.name }}</div> |
@@ -28,7 +28,7 @@ | |||
28 | <div class="form-group"> | 28 | <div class="form-group"> |
29 | <label i18n for="instanceShortDescription">Short description</label> | 29 | <label i18n for="instanceShortDescription">Short description</label> |
30 | <textarea | 30 | <textarea |
31 | id="instanceShortDescription" formControlName="shortDescription" class="small" | 31 | id="instanceShortDescription" formControlName="shortDescription" class="form-control small" |
32 | [ngClass]="{ 'input-error': formErrors['instance.shortDescription'] }" | 32 | [ngClass]="{ 'input-error': formErrors['instance.shortDescription'] }" |
33 | ></textarea> | 33 | ></textarea> |
34 | <div *ngIf="formErrors.instance.shortDescription" class="form-error">{{ formErrors.instance.shortDescription }}</div> | 34 | <div *ngIf="formErrors.instance.shortDescription" class="form-error">{{ formErrors.instance.shortDescription }}</div> |
@@ -107,7 +107,7 @@ | |||
107 | </my-help> | 107 | </my-help> |
108 | 108 | ||
109 | <div class="peertube-select-container"> | 109 | <div class="peertube-select-container"> |
110 | <select id="instanceDefaultNSFWPolicy" formControlName="defaultNSFWPolicy"> | 110 | <select id="instanceDefaultNSFWPolicy" formControlName="defaultNSFWPolicy" class="form-control"> |
111 | <option i18n value="do_not_list">Do not list</option> | 111 | <option i18n value="do_not_list">Do not list</option> |
112 | <option i18n value="blur">Blur thumbnails</option> | 112 | <option i18n value="blur">Blur thumbnails</option> |
113 | <option i18n value="display">Display</option> | 113 | <option i18n value="display">Display</option> |
@@ -172,7 +172,7 @@ | |||
172 | <div i18n class="label-small-info">To share your personal videos? To open registrations and allow people to upload what they want?</div> | 172 | <div i18n class="label-small-info">To share your personal videos? To open registrations and allow people to upload what they want?</div> |
173 | 173 | ||
174 | <textarea | 174 | <textarea |
175 | id="instanceCreationReason" formControlName="creationReason" class="small" | 175 | id="instanceCreationReason" formControlName="creationReason" class="small" class="form-control" |
176 | [ngClass]="{ 'input-error': formErrors['instance.creationReason'] }" | 176 | [ngClass]="{ 'input-error': formErrors['instance.creationReason'] }" |
177 | ></textarea> | 177 | ></textarea> |
178 | <div *ngIf="formErrors.instance.creationReason" class="form-error">{{ formErrors.instance.creationReason }}</div> | 178 | <div *ngIf="formErrors.instance.creationReason" class="form-error">{{ formErrors.instance.creationReason }}</div> |
@@ -183,7 +183,7 @@ | |||
183 | <div i18n class="label-small-info">It's important to know for users who want to register on your instance</div> | 183 | <div i18n class="label-small-info">It's important to know for users who want to register on your instance</div> |
184 | 184 | ||
185 | <textarea | 185 | <textarea |
186 | id="instanceMaintenanceLifetime" formControlName="maintenanceLifetime" class="small" | 186 | id="instanceMaintenanceLifetime" formControlName="maintenanceLifetime" class="form-control small" |
187 | [ngClass]="{ 'input-error': formErrors['instance.maintenanceLifetime'] }" | 187 | [ngClass]="{ 'input-error': formErrors['instance.maintenanceLifetime'] }" |
188 | ></textarea> | 188 | ></textarea> |
189 | <div *ngIf="formErrors.instance.maintenanceLifetime" class="form-error">{{ formErrors.instance.maintenanceLifetime }}</div> | 189 | <div *ngIf="formErrors.instance.maintenanceLifetime" class="form-error">{{ formErrors.instance.maintenanceLifetime }}</div> |
@@ -194,7 +194,7 @@ | |||
194 | <div i18n class="label-small-info">With your own funds? With user donations? Advertising?</div> | 194 | <div i18n class="label-small-info">With your own funds? With user donations? Advertising?</div> |
195 | 195 | ||
196 | <textarea | 196 | <textarea |
197 | id="instanceBusinessModel" formControlName="businessModel" class="small" | 197 | id="instanceBusinessModel" formControlName="businessModel" class="form-control small" |
198 | [ngClass]="{ 'input-error': formErrors['instance.businessModel'] }" | 198 | [ngClass]="{ 'input-error': formErrors['instance.businessModel'] }" |
199 | ></textarea> | 199 | ></textarea> |
200 | <div *ngIf="formErrors.instance.businessModel" class="form-error">{{ formErrors.instance.businessModel }}</div> | 200 | <div *ngIf="formErrors.instance.businessModel" class="form-error">{{ formErrors.instance.businessModel }}</div> |
@@ -249,7 +249,7 @@ | |||
249 | <label i18n for="themeDefault">Theme</label> | 249 | <label i18n for="themeDefault">Theme</label> |
250 | 250 | ||
251 | <div class="peertube-select-container"> | 251 | <div class="peertube-select-container"> |
252 | <select formControlName="default" id="themeDefault"> | 252 | <select formControlName="default" id="themeDefault" class="form-control"> |
253 | <option i18n value="default">default</option> | 253 | <option i18n value="default">default</option> |
254 | 254 | ||
255 | <option *ngFor="let theme of availableThemes" [value]="theme">{{ theme }}</option> | 255 | <option *ngFor="let theme of availableThemes" [value]="theme">{{ theme }}</option> |
@@ -261,7 +261,7 @@ | |||
261 | <div class="form-group" formGroupName="instance"> | 261 | <div class="form-group" formGroupName="instance"> |
262 | <label i18n for="instanceDefaultClientRoute">Landing page</label> | 262 | <label i18n for="instanceDefaultClientRoute">Landing page</label> |
263 | <div class="peertube-select-container"> | 263 | <div class="peertube-select-container"> |
264 | <select id="instanceDefaultClientRoute" formControlName="defaultClientRoute"> | 264 | <select id="instanceDefaultClientRoute" formControlName="defaultClientRoute" class="form-control"> |
265 | <option i18n value="/videos/overview">Discover videos</option> | 265 | <option i18n value="/videos/overview">Discover videos</option> |
266 | <option i18n value="/videos/trending">Trending videos</option> | 266 | <option i18n value="/videos/trending">Trending videos</option> |
267 | <option i18n value="/videos/most-liked">Most liked videos</option> | 267 | <option i18n value="/videos/most-liked">Most liked videos</option> |
@@ -303,7 +303,7 @@ | |||
303 | <div [ngClass]="{ 'disabled-checkbox-extra': !isSignupEnabled() }" class="mt-3"> | 303 | <div [ngClass]="{ 'disabled-checkbox-extra': !isSignupEnabled() }" class="mt-3"> |
304 | <label i18n for="signupLimit">Signup limit</label> | 304 | <label i18n for="signupLimit">Signup limit</label> |
305 | <input | 305 | <input |
306 | type="number" min="-1" id="signupLimit" | 306 | type="number" min="-1" id="signupLimit" class="form-control" |
307 | formControlName="limit" [ngClass]="{ 'input-error': formErrors['signup.limit'] }" | 307 | formControlName="limit" [ngClass]="{ 'input-error': formErrors['signup.limit'] }" |
308 | > | 308 | > |
309 | <div *ngIf="formErrors.signup.limit" class="form-error">{{ formErrors.signup.limit }}</div> | 309 | <div *ngIf="formErrors.signup.limit" class="form-error">{{ formErrors.signup.limit }}</div> |
@@ -318,7 +318,7 @@ | |||
318 | <div class="form-group"> | 318 | <div class="form-group"> |
319 | <label i18n for="userVideoQuota">Default video quota per user</label> | 319 | <label i18n for="userVideoQuota">Default video quota per user</label> |
320 | <div class="peertube-select-container"> | 320 | <div class="peertube-select-container"> |
321 | <select id="userVideoQuota" formControlName="videoQuota"> | 321 | <select id="userVideoQuota" formControlName="videoQuota" class="form-control"> |
322 | <option *ngFor="let videoQuotaOption of videoQuotaOptions" [value]="videoQuotaOption.value"> | 322 | <option *ngFor="let videoQuotaOption of videoQuotaOptions" [value]="videoQuotaOption.value"> |
323 | {{ videoQuotaOption.label }} | 323 | {{ videoQuotaOption.label }} |
324 | </option> | 324 | </option> |
@@ -330,7 +330,7 @@ | |||
330 | <div class="form-group"> | 330 | <div class="form-group"> |
331 | <label i18n for="userVideoQuotaDaily">Default daily upload limit per user</label> | 331 | <label i18n for="userVideoQuotaDaily">Default daily upload limit per user</label> |
332 | <div class="peertube-select-container"> | 332 | <div class="peertube-select-container"> |
333 | <select id="userVideoQuotaDaily" formControlName="videoQuotaDaily"> | 333 | <select id="userVideoQuotaDaily" formControlName="videoQuotaDaily" class="form-control"> |
334 | <option *ngFor="let videoQuotaDailyOption of videoQuotaDailyOptions" [value]="videoQuotaDailyOption.value"> | 334 | <option *ngFor="let videoQuotaDailyOption of videoQuotaDailyOptions" [value]="videoQuotaDailyOption.value"> |
335 | {{ videoQuotaDailyOption.label }} | 335 | {{ videoQuotaDailyOption.label }} |
336 | </option> | 336 | </option> |
@@ -451,7 +451,7 @@ | |||
451 | <div [ngClass]="{ 'disabled-checkbox-extra': !isAutoFollowIndexEnabled() }"> | 451 | <div [ngClass]="{ 'disabled-checkbox-extra': !isAutoFollowIndexEnabled() }"> |
452 | <label i18n for="followingsInstanceAutoFollowIndexUrl">Index URL</label> | 452 | <label i18n for="followingsInstanceAutoFollowIndexUrl">Index URL</label> |
453 | <input | 453 | <input |
454 | type="text" id="followingsInstanceAutoFollowIndexUrl" | 454 | type="text" id="followingsInstanceAutoFollowIndexUrl" class="form-control" |
455 | formControlName="indexUrl" [ngClass]="{ 'input-error': formErrors['followings.instance.autoFollowIndex.indexUrl'] }" | 455 | formControlName="indexUrl" [ngClass]="{ 'input-error': formErrors['followings.instance.autoFollowIndex.indexUrl'] }" |
456 | > | 456 | > |
457 | <div *ngIf="formErrors.followings.instance.autoFollowIndex.indexUrl" class="form-error">{{ formErrors.followings.instance.autoFollowIndex.indexUrl }}</div> | 457 | <div *ngIf="formErrors.followings.instance.autoFollowIndex.indexUrl" class="form-error">{{ formErrors.followings.instance.autoFollowIndex.indexUrl }}</div> |
@@ -477,7 +477,7 @@ | |||
477 | <div class="form-group" formGroupName="admin"> | 477 | <div class="form-group" formGroupName="admin"> |
478 | <label i18n for="adminEmail">Admin email</label> | 478 | <label i18n for="adminEmail">Admin email</label> |
479 | <input | 479 | <input |
480 | type="text" id="adminEmail" | 480 | type="text" id="adminEmail" class="form-control" |
481 | formControlName="email" [ngClass]="{ 'input-error': formErrors['admin.email'] }" | 481 | formControlName="email" [ngClass]="{ 'input-error': formErrors['admin.email'] }" |
482 | > | 482 | > |
483 | <div *ngIf="formErrors.admin.email" class="form-error">{{ formErrors.admin.email }}</div> | 483 | <div *ngIf="formErrors.admin.email" class="form-error">{{ formErrors.admin.email }}</div> |
@@ -518,7 +518,7 @@ | |||
518 | <label i18n for="signupLimit">Your Twitter username</label> | 518 | <label i18n for="signupLimit">Your Twitter username</label> |
519 | 519 | ||
520 | <input | 520 | <input |
521 | type="text" id="servicesTwitterUsername" | 521 | type="text" id="servicesTwitterUsername" class="form-control" |
522 | formControlName="username" [ngClass]="{ 'input-error': formErrors['services.twitter.username'] }" | 522 | formControlName="username" [ngClass]="{ 'input-error': formErrors['services.twitter.username'] }" |
523 | > | 523 | > |
524 | <div *ngIf="formErrors.services.twitter.username" class="form-error">{{ formErrors.services.twitter.username }}</div> | 524 | <div *ngIf="formErrors.services.twitter.username" class="form-error">{{ formErrors.services.twitter.username }}</div> |
@@ -656,7 +656,7 @@ | |||
656 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }"> | 656 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }"> |
657 | <label i18n for="transcodingThreads">Transcoding threads</label> | 657 | <label i18n for="transcodingThreads">Transcoding threads</label> |
658 | <div class="peertube-select-container"> | 658 | <div class="peertube-select-container"> |
659 | <select id="transcodingThreads" formControlName="threads"> | 659 | <select id="transcodingThreads" formControlName="threads" class="form-control"> |
660 | <option *ngFor="let transcodingThreadOption of transcodingThreadOptions" [value]="transcodingThreadOption.value"> | 660 | <option *ngFor="let transcodingThreadOption of transcodingThreadOptions" [value]="transcodingThreadOption.value"> |
661 | {{ transcodingThreadOption.label }} | 661 | {{ transcodingThreadOption.label }} |
662 | </option> | 662 | </option> |
@@ -707,7 +707,7 @@ | |||
707 | <div class="form-group" formGroupName="previews"> | 707 | <div class="form-group" formGroupName="previews"> |
708 | <label i18n for="cachePreviewsSize">Number of previews to keep in cache</label> | 708 | <label i18n for="cachePreviewsSize">Number of previews to keep in cache</label> |
709 | <input | 709 | <input |
710 | type="number" min="0" id="cachePreviewsSize" | 710 | type="number" min="0" id="cachePreviewsSize" class="form-control" |
711 | formControlName="size" [ngClass]="{ 'input-error': formErrors['cache.previews.size'] }" | 711 | formControlName="size" [ngClass]="{ 'input-error': formErrors['cache.previews.size'] }" |
712 | > | 712 | > |
713 | <div *ngIf="formErrors.cache.previews.size" class="form-error">{{ formErrors.cache.previews.size }}</div> | 713 | <div *ngIf="formErrors.cache.previews.size" class="form-error">{{ formErrors.cache.previews.size }}</div> |
@@ -716,7 +716,7 @@ | |||
716 | <div class="form-group" formGroupName="captions"> | 716 | <div class="form-group" formGroupName="captions"> |
717 | <label i18n for="cacheCaptionsSize">Number of video captions to keep in cache</label> | 717 | <label i18n for="cacheCaptionsSize">Number of video captions to keep in cache</label> |
718 | <input | 718 | <input |
719 | type="number" min="0" id="cacheCaptionsSize" | 719 | type="number" min="0" id="cacheCaptionsSize" class="form-control" |
720 | formControlName="size" [ngClass]="{ 'input-error': formErrors['cache.captions.size'] }" | 720 | formControlName="size" [ngClass]="{ 'input-error': formErrors['cache.captions.size'] }" |
721 | > | 721 | > |
722 | <div *ngIf="formErrors.cache.captions.size" class="form-error">{{ formErrors.cache.captions.size }}</div> | 722 | <div *ngIf="formErrors.cache.captions.size" class="form-error">{{ formErrors.cache.captions.size }}</div> |
@@ -750,7 +750,7 @@ | |||
750 | </my-help> | 750 | </my-help> |
751 | 751 | ||
752 | <textarea | 752 | <textarea |
753 | id="customizationJavascript" formControlName="javascript" | 753 | id="customizationJavascript" formControlName="javascript" class="form-control" |
754 | [ngClass]="{ 'input-error': formErrors['instance.customizations.javascript'] }" | 754 | [ngClass]="{ 'input-error': formErrors['instance.customizations.javascript'] }" |
755 | ></textarea> | 755 | ></textarea> |
756 | 756 | ||
@@ -780,7 +780,7 @@ | |||
780 | </my-help> | 780 | </my-help> |
781 | 781 | ||
782 | <textarea | 782 | <textarea |
783 | id="customizationCSS" formControlName="css" | 783 | id="customizationCSS" formControlName="css" class="form-control" |
784 | [ngClass]="{ 'input-error': formErrors['instance.customizations.css'] }" | 784 | [ngClass]="{ 'input-error': formErrors['instance.customizations.css'] }" |
785 | ></textarea> | 785 | ></textarea> |
786 | <div *ngIf="formErrors.instance.customizations.css" class="form-error">{{ formErrors.instance.customizations.css }}</div> | 786 | <div *ngIf="formErrors.instance.customizations.css" class="form-error">{{ formErrors.instance.customizations.css }}</div> |
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.scss index df104c14e..7594b502c 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 | |||
@@ -5,13 +5,6 @@ textarea { | |||
5 | height: 250px; | 5 | height: 250px; |
6 | } | 6 | } |
7 | 7 | ||
8 | .form-control { | ||
9 | &, &:focus { | ||
10 | background-color: var(--inputBackgroundColor); | ||
11 | color: var(--mainForegroundColor); | ||
12 | } | ||
13 | } | ||
14 | |||
15 | input[type=submit] { | 8 | input[type=submit] { |
16 | @include peertube-button; | 9 | @include peertube-button; |
17 | @include orange-button; | 10 | @include orange-button; |
diff --git a/client/src/app/+admin/moderation/video-abuse-list/moderation-comment-modal.component.html b/client/src/app/+admin/moderation/video-abuse-list/moderation-comment-modal.component.html index 303a788d2..8fbd33871 100644 --- a/client/src/app/+admin/moderation/video-abuse-list/moderation-comment-modal.component.html +++ b/client/src/app/+admin/moderation/video-abuse-list/moderation-comment-modal.component.html | |||
@@ -20,7 +20,10 @@ | |||
20 | </div> | 20 | </div> |
21 | 21 | ||
22 | <div class="form-group inputs"> | 22 | <div class="form-group inputs"> |
23 | <span i18n class="action-button action-button-cancel" (click)="hide()">Cancel</span> | 23 | <input |
24 | type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel" | ||
25 | (click)="hide()" (key.enter)="hide()" | ||
26 | > | ||
24 | 27 | ||
25 | <input | 28 | <input |
26 | type="submit" i18n-value value="Update this comment" class="action-button-submit" | 29 | type="submit" i18n-value value="Update this comment" class="action-button-submit" |
diff --git a/client/src/app/+admin/users/user-edit/user-edit.component.html b/client/src/app/+admin/users/user-edit/user-edit.component.html index 6c42fde57..070695e57 100644 --- a/client/src/app/+admin/users/user-edit/user-edit.component.html +++ b/client/src/app/+admin/users/user-edit/user-edit.component.html | |||
@@ -82,7 +82,7 @@ | |||
82 | <div class="form-group" *ngIf="isCreation()"> | 82 | <div class="form-group" *ngIf="isCreation()"> |
83 | <label i18n for="username">Username</label> | 83 | <label i18n for="username">Username</label> |
84 | <input | 84 | <input |
85 | type="text" id="username" i18n-placeholder placeholder="john" | 85 | type="text" id="username" i18n-placeholder placeholder="john" class="form-control" |
86 | formControlName="username" [ngClass]="{ 'input-error': formErrors['username'] }" | 86 | formControlName="username" [ngClass]="{ 'input-error': formErrors['username'] }" |
87 | > | 87 | > |
88 | <div *ngIf="formErrors.username" class="form-error"> | 88 | <div *ngIf="formErrors.username" class="form-error"> |
@@ -93,7 +93,7 @@ | |||
93 | <div class="form-group"> | 93 | <div class="form-group"> |
94 | <label i18n for="email">Email</label> | 94 | <label i18n for="email">Email</label> |
95 | <input | 95 | <input |
96 | type="text" id="email" i18n-placeholder placeholder="mail@example.com" | 96 | type="text" id="email" i18n-placeholder placeholder="mail@example.com" class="form-control" |
97 | formControlName="email" [ngClass]="{ 'input-error': formErrors['email'] }" | 97 | formControlName="email" [ngClass]="{ 'input-error': formErrors['email'] }" |
98 | autocomplete="off" | 98 | autocomplete="off" |
99 | > | 99 | > |
@@ -112,7 +112,7 @@ | |||
112 | </ng-template> | 112 | </ng-template> |
113 | </my-help> | 113 | </my-help> |
114 | <input | 114 | <input |
115 | type="password" id="password" autocomplete="new-password" | 115 | type="password" id="password" autocomplete="new-password" class="form-control" |
116 | formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }" | 116 | formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }" |
117 | > | 117 | > |
118 | <div *ngIf="formErrors.password" class="form-error"> | 118 | <div *ngIf="formErrors.password" class="form-error"> |