Normalize modal close buttons, and cancel/submit button styles
authorRigel Kent <sendmemail@rigelk.eu>
Fri, 6 Mar 2020 15:58:55 +0000 (16:58 +0100)
committerRigel Kent <sendmemail@rigelk.eu>
Fri, 6 Mar 2020 15:58:55 +0000 (16:58 +0100)
client/src/app/modal/quick-settings-modal.component.html
client/src/app/shared/confirm/confirm.component.ts
client/src/app/shared/forms/input-readonly-copy.component.html
client/src/app/shared/video-playlist/video-add-to-playlist.component.scss
client/src/app/shared/video/modals/video-blacklist.component.html
client/src/app/shared/video/video-actions-dropdown.component.ts
client/src/app/videos/+video-watch/comment/video-comment-add.component.html
client/src/app/videos/+video-watch/modal/video-share.component.scss
client/src/sass/bootstrap.scss
client/src/sass/include/_mixins.scss

index 8ee83e7dc40421824a6a5c41489534bae1e605a4..e2ea51b929845a2ff1d7738f0d52aeab31da2c3d 100644 (file)
@@ -1,6 +1,7 @@
 <ng-template #modal let-hide="close">
   <div class="modal-header">
     <h4 i18n class="modal-title">Settings</h4>
+    <my-global-icon iconName="cross" aria-label="Close" role="button" (click)="hide()"></my-global-icon>
   </div>
   
   <div class="modal-body">
index 763454c4f8c9c2d88ec7610d9e3306458facfbb1..d67d4f3c8c7eee890c713c0302fab2cbdc7d07b4 100644 (file)
@@ -60,7 +60,7 @@ export class ConfirmComponent implements OnInit {
   showModal () {
     this.inputValue = ''
 
-    this.openedModal = this.modalService.open(this.confirmModal)
+    this.openedModal = this.modalService.open(this.confirmModal, { centered: true })
 
     this.openedModal.result
         .then(() => this.confirmService.confirmResponse.next(true))
index b6a56ec441dfca1d0824dbdfb1f72b1ebff2e205..9566e97415f6e6c609dbe5822ce965ca3e0125e2 100644 (file)
@@ -1,4 +1,4 @@
-<div class="input-group">
+<div class="input-group input-group-sm">
   <input #urlInput (click)="urlInput.select()" type="text" class="form-control readonly" readonly [value]="value" />
 
   <div class="input-group-append">
index f1b6cd6011ff243575e456db9adf64b912143ce5..1724449e8a5f8607c37a05da679eba606b378a30 100644 (file)
@@ -4,7 +4,7 @@
 .header,
 .dropdown-item,
 .input-container {
-  padding: 6px 24px 10px 24px;
+  padding: 8px 24px;
 }
 
 .header {
 }
 
 .playlist {
-  display: flex;
+  display: inline-flex;
   cursor: pointer;
 
   my-peertube-checkbox {
     margin-right: 10px;
+    align-self: center;
   }
 
   .display-name {
index 1a87bdcd4235d2f0b06f858e5178ad45ad53b3be..857a4dcecd9dda334c82623745f934d408206e8d 100644 (file)
       <div class="form-group" *ngIf="video.isLocal">
         <my-peertube-checkbox
           inputName="unfederate" formControlName="unfederate"
-          i18n-labelText labelText="Unfederate the video (ask for its deletion from the remote instances)"
-        ></my-peertube-checkbox>
+          i18n-labelText labelText="Unfederate the video"
+        >
+          <ng-container ngProjectAs="description">
+            <span i18n>This will ask remote instances to delete it</span>
+          </ng-container>
+        </my-peertube-checkbox>
       </div>
 
       <div class="form-group inputs">
index 69f45346e38bcee82414bc48e657bea865bdcfca..67c4d6fbce31812216c95b00619f95aa48253682 100644 (file)
@@ -1,8 +1,7 @@
-import { AfterViewInit, Component, EventEmitter, Input, OnChanges, Output, ViewChild } from '@angular/core'
+import { Component, EventEmitter, Input, OnChanges, Output, ViewChild } from '@angular/core'
 import { I18n } from '@ngx-translate/i18n-polyfill'
 import { DropdownAction, DropdownButtonSize, DropdownDirection } from '@app/shared/buttons/action-dropdown.component'
-import { AuthService, ConfirmService, Notifier, ServerService } from '@app/core'
-import { BlocklistService } from '@app/shared/blocklist'
+import { AuthService, ConfirmService, Notifier } from '@app/core'
 import { Video } from '@app/shared/video/video.model'
 import { VideoService } from '@app/shared/video/video.service'
 import { VideoDetails } from '@app/shared/video/video-details.model'
@@ -73,10 +72,8 @@ export class VideoActionsDropdownComponent implements OnChanges {
     private notifier: Notifier,
     private confirmService: ConfirmService,
     private videoBlacklistService: VideoBlacklistService,
-    private serverService: ServerService,
     private screenService: ScreenService,
     private videoService: VideoService,
-    private blocklistService: BlocklistService,
     private redundancyService: RedundancyService,
     private i18n: I18n
   ) { }
index 3a9977df61ceba36edf259029dbdb2a098a8c32d..29c7a8bfa1d4ecee2bb53a05913a49f0529b4ab1 100644 (file)
 <ng-template #visitorModal let-modal>
   <div class="modal-header">
     <h4 class="modal-title" id="modal-basic-title" i18n>You are one step away from commenting</h4>
-    <button type="button" class="close" aria-label="Close" (click)="hideVisitorModal()"></button>
+    <my-global-icon iconName="cross" aria-label="Close" role="button" (click)="hideVisitorModal()"></my-global-icon>
   </div>
   <div class="modal-body">
     <span i18n>
-      If you have an account on this instance, you can login:
-    </span>
-    <span class="btn btn-sm mx-3" role="button" (click)="gotoLogin()" i18n>login to comment</span>
-    <span i18n>
-      Otherwise, you can comment using an account on any ActivityPub-compatible instance.
+      You can comment using an account on any ActivityPub-compatible instance.
       On most platforms, you can find the video by typing its URL in the search bar and then comment it
       from within the software's interface.
     </span>
     <span i18n class="action-button action-button-cancel" role="button" (click)="hideVisitorModal()">
       Cancel
     </span>
+
+    <input
+      type="submit" i18n-value value="Login to comment" class="action-button-submit"
+      (click)="gotoLogin()"
+    >
   </div>
 </ng-template>
index a5766d9838eed11cdd711fdfae5932c93fa18f90..11cbb8c0b83eb7ebf0d82d24735018da832d09de 100644 (file)
@@ -17,10 +17,6 @@ my-input-readonly-copy {
   @include peertube-select-container(200px);
 }
 
-.action-button-cancel {
-  margin-right: 0 !important;
-}
-
 .qr-code-group {
   text-align: center;
 }
index bb7b21274e147e9e0aaa679be694e066d556d07d..61f9d016bf04dae255edf1ac05e6df90c32667f5 100644 (file)
@@ -95,15 +95,15 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/';
     }
 
     my-global-icon {
-      @include icon(24px);
+      @include icon(22px);
 
       position: relative;
-      top: 3px;
+      top: 5px;
       float: right;
 
       margin: 0;
       padding: 0;
-      opacity: 1;
+      opacity: .5;
     }
   }
 
@@ -113,7 +113,7 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/';
 
     .action-button-cancel {
       @include peertube-button;
-      @include grey-button;
+      @include tertiary-button;
 
       display: inline-block;
       margin-right: 10px;
index de9c9d6d6bcb0c231fd22d6ce864832ebd0c72f5..9a8d0073a85959fb2e6074c3307c6740e07c0143 100644 (file)
   }
 }
 
+@mixin tertiary-button {
+  color: $grey-foreground-color;
+  background-color: transparent;
+
+  &[disabled], &.disabled {
+    cursor: default;
+  }
+
+  my-global-icon {
+    @include apply-svg-color(transparent)
+  }
+}
+
 @mixin grey-button {
   &, &:active, &:focus {
     background-color: $grey-background-color;