Explorar o código

Add checkbox focus shadows, and admin resolution descriptions

Rigel Kent %!s(int64=4) %!d(string=hai) anos
pai
achega
46db9430af

+ 5 - 1
client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html

@@ -549,7 +549,11 @@
                 <my-peertube-checkbox
                   [inputName]="getResolutionKey(resolution.id)" [formControlName]="resolution.id"
                   i18n-labelText labelText="Resolution {{resolution.label}} enabled"
-                ></my-peertube-checkbox>
+                >
+                  <ng-template *ngIf="resolution.description" ptTemplate="help">
+                    <div i18n [innerHTML]="resolution.description"></div>
+                  </ng-template>
+                </my-peertube-checkbox>
               </div>
             </ng-container>
 

+ 3 - 2
client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts

@@ -18,7 +18,7 @@ import { ServerConfig } from '@shared/models'
 export class EditCustomConfigComponent extends FormReactive implements OnInit {
   customConfig: CustomConfig
 
-  resolutions: { id: string, label: string }[] = []
+  resolutions: { id: string, label: string, description?: string }[] = []
   transcodingThreadOptions: { label: string, value: number }[] = []
 
   languageItems: SelectItem[] = []
@@ -40,7 +40,8 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
     this.resolutions = [
       {
         id: '0p',
-        label: this.i18n('Audio-only')
+        label: this.i18n('Audio-only'),
+        description: `A <code>.mp4</code> that keeps the original audio track, with no video`
       },
       {
         id: '240p',

+ 4 - 0
client/src/app/menu/menu.component.html

@@ -31,6 +31,10 @@
 
             <div class="dropdown-divider"></div>
 
+            <a class="dropdown-item" href="https://joinpeertube.org/help" target="_blank" rel="noopener noreferrer">
+              <my-global-icon iconName="help"></my-global-icon> <ng-container i18n>Help</ng-container>
+            </a>
+
             <a (click)="logout($event)" class="dropdown-item" href="#">
               <my-global-icon iconName="sign-out"></my-global-icon> <ng-container i18n>Log out</ng-container>
             </a>

+ 2 - 1
client/src/app/shared/forms/peertube-checkbox.component.scss

@@ -6,6 +6,7 @@
 
   .form-group-checkbox {
     display: flex;
+    align-items: center;
 
     .label-text {
       font-weight: $font-regular;
@@ -23,6 +24,6 @@
 
   my-help {
     position: relative;
-    top: -2px;
+    top: 2px;
   }
 }

+ 1 - 1
client/src/app/shared/misc/help.component.scss

@@ -26,7 +26,7 @@
       font-size: 13px;
       background-color: var(--mainBackgroundColor);
       color: var(--mainForegroundColor);
-      box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
+      box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
 
       p {
         margin-bottom: 0;

+ 1 - 1
client/src/sass/include/_mixins.scss

@@ -337,7 +337,7 @@
   position: absolute;
 
   &:focus + span {
-    outline: 1px solid #1e5180;
+    box-shadow: 0 0 0 .1rem rgba(87, 85, 217, .2);
   }
 
   & + span {

+ 4 - 0
client/src/sass/primeng-custom.scss

@@ -330,6 +330,10 @@ p-calendar .ui-datepicker {
   }
 }
 
+p-tablecheckbox:hover div .ui-chkbox-box {
+  box-shadow: 0 0 0 .1rem rgba(87, 85, 217, .2);
+}
+
 .ui-chkbox {
 
   &, .ui-chkbox-box {