]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Better admin tables
authorChocobozzz <me@florianbigard.com>
Thu, 21 Dec 2017 14:24:49 +0000 (15:24 +0100)
committerChocobozzz <me@florianbigard.com>
Thu, 21 Dec 2017 14:24:49 +0000 (15:24 +0100)
client/src/app/+admin/follows/followers-list/followers-list.component.html
client/src/app/+admin/follows/following-list/following-list.component.html
client/src/app/+admin/jobs/jobs-list/jobs-list.component.html
client/src/app/+admin/users/user-list/user-list.component.html
client/src/app/+admin/video-abuses/video-abuse-list/video-abuse-list.component.html
client/src/app/+admin/video-blacklist/video-blacklist-list/video-blacklist-list.component.html
client/src/app/shared/misc/edit-button.component.html
client/src/app/videos/+video-watch/video-watch.component.scss
client/src/app/videos/+video-watch/video-watch.module.ts
client/src/sass/application.scss

index a24039fc676b1ef23ee8a5d06ea9995bee80c271..9499a04334ae36acc9d40c77f290aa6ef3e8335d 100644 (file)
@@ -2,7 +2,7 @@
     [value]="followers" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage"
     sortField="createdAt" (onLazyLoad)="loadLazy($event)"
 >
-  <p-column field="id" header="ID"></p-column>
+  <p-column field="id" header="ID" [style]="{ width: '60px' }"></p-column>
   <p-column field="follower.host" header="Host"></p-column>
   <p-column field="follower.score" header="Score"></p-column>
   <p-column field="state" header="State"></p-column>
index 2b6cc91130e77da4d9ad08d0c063d581bd3c9f61..fc1cf0dc45a3a7e4199ccb3c122b6b248f3c91f4 100644 (file)
@@ -2,7 +2,7 @@
     [value]="following" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage"
     sortField="createdAt" (onLazyLoad)="loadLazy($event)"
 >
-  <p-column field="id" header="ID"></p-column>
+  <p-column field="id" header="ID" [style]="{ width: '60px' }"></p-column>
   <p-column field="following.host" header="Host"></p-column>
   <p-column field="state" header="State"></p-column>
   <p-column field="createdAt" header="Created date" [sortable]="true"></p-column>
index 7aa5f425499af43f2bcaefa4f5d7cc65a1be0e5b..809155338b2c867e057970976f93fb2102f5fb58 100644 (file)
@@ -6,9 +6,9 @@
     [value]="jobs" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage"
     sortField="createdAt" (onLazyLoad)="loadLazy($event)" [scrollable]="true" [virtualScroll]="true" [scrollHeight]="scrollHeight"
 >
-  <p-column field="id" header="ID" [style]="{ width: '40px' }"></p-column>
-  <p-column field="category" header="Category" [style]="{ width: '100px' }"></p-column>
-  <p-column field="handlerName" header="Handler name" [style]="{ width: '200px' }"></p-column>
+  <p-column field="id" header="ID" [style]="{ width: '60px' }"></p-column>
+  <p-column field="category" header="Category" [style]="{ width: '130px' }"></p-column>
+  <p-column field="handlerName" header="Handler name" [style]="{ width: '210px' }"></p-column>
   <p-column header="Input data">
     <ng-template pTemplate="body" let-job="rowData">
       <pre>{{ job.handlerInputData }}</pre>
index b3d90ba1ebce6d2229c6af5f882634e23c81c47e..08f4caeb9acf27a08ace0dbfb4239c380d1cf74a 100644 (file)
@@ -11,7 +11,7 @@
     [value]="users" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage"
     sortField="id" (onLazyLoad)="loadLazy($event)"
 >
-  <p-column field="id" header="ID" [sortable]="true"></p-column>
+  <p-column field="id" header="ID" [sortable]="true" [style]="{ width: '60px' }"></p-column>
   <p-column field="username" header="Username" [sortable]="true"></p-column>
   <p-column field="email" header="Email"></p-column>
   <p-column field="videoQuota" header="Video quota"></p-column>
index d655a5e9b2da2ac6c7368815ba05fdb36661ce99..65d061246b62db324d2cfdec25f67c3bd41612d2 100644 (file)
@@ -6,7 +6,7 @@
     [value]="videoAbuses" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage"
     sortField="id" (onLazyLoad)="loadLazy($event)"
 >
-  <p-column field="id" header="ID" [sortable]="true"></p-column>
+  <p-column field="id" header="ID" [sortable]="true" [style]="{ width: '60px' }"></p-column>
   <p-column field="reason" header="Reason"></p-column>
   <p-column field="reporterServerHost" header="Reporter server host"></p-column>
   <p-column field="reporterUsername" header="Reporter username"></p-column>
index 1d813fa07bac4fbb29af5a47732bcd4e99469f53..942f7c9f100f378ee83b72b2a3bc8a7e430fb2b1 100644 (file)
@@ -9,10 +9,7 @@
       <p-column field="id" header="ID" [sortable]="true"></p-column>
       <p-column field="name" header="Name" [sortable]="true"></p-column>
       <p-column field="description" header="Description"></p-column>
-      <p-column field="duration" header="Duration" [sortable]="true"></p-column>
       <p-column field="views" header="Views" [sortable]="true"></p-column>
-      <p-column field="likes" header="Likes" [sortable]="true"></p-column>
-      <p-column field="dislikes" header="Dislikes" [sortable]="true"></p-column>
       <p-column field="nsfw" header="NSFW"></p-column>
       <p-column field="uuid" header="UUID" [sortable]="true"></p-column>
       <p-column field="createdAt" header="Created date" [sortable]="true"></p-column>
index 6e9564bd71b1d458ed389127fd390b0547c674c5..58012a8b81bd356d3712f65d32247fc9f0653e1f 100644 (file)
@@ -1,4 +1,4 @@
-<a class="action-button" [routerLink]="routerLink">
+<a class="action-button action-button-edit" [routerLink]="routerLink">
   <span class="icon icon-edit"></span>
   Edit
 </a>
index 02b44bda19dc4ca9d572bf1e740fbf62bc7f1d35..b37fa3d61d7759652350aa69684aaefdca349a88 100644 (file)
@@ -27,7 +27,8 @@
   line-height: 300px;
   margin-top: 50px;
   text-align: center;
-  font-weight: bold;
+  font-weight: $font-semibold;
+  font-size: 15px;
 }
 
 .video-bottom {
index d0ed29d063ffe18ead6615d65e9ea0495824e210..e77883472c910e53090dcc60035a853c1aacde35 100644 (file)
@@ -1,15 +1,15 @@
 import { NgModule } from '@angular/core'
+import { TooltipModule } from 'ngx-bootstrap/tooltip'
+import { ClipboardModule } from 'ngx-clipboard'
+import { SharedModule } from '../../shared'
+import { MarkdownService } from '../shared'
+import { VideoDownloadComponent } from './video-download.component'
+import { VideoReportComponent } from './video-report.component'
+import { VideoShareComponent } from './video-share.component'
 
 import { VideoWatchRoutingModule } from './video-watch-routing.module'
-import { MarkdownService } from '../shared'
-import { SharedModule } from '../../shared'
-import { ClipboardModule } from 'ngx-clipboard'
-import { TooltipModule } from 'ngx-bootstrap/tooltip';
 
 import { VideoWatchComponent } from './video-watch.component'
-import { VideoReportComponent } from './video-report.component'
-import { VideoShareComponent } from './video-share.component'
-import { VideoDownloadComponent } from './video-download.component'
 
 @NgModule({
   imports: [
index 0d96d5ec0bc2960d1bf671df49f1f33e53b74bff..0539ec486a7b505722f89dcc2f3680ea5be9fea7 100644 (file)
@@ -158,6 +158,9 @@ p-datatable {
   td {
     border: 1px solid #E5E5E5 !important;
     padding-left: 15px !important;
+    overflow: hidden !important;
+    text-overflow: ellipsis !important;
+    white-space: nowrap !important;
   }
 
   tr {
@@ -191,17 +194,31 @@ p-datatable {
     font-weight: $font-semibold !important;
     color: #000 !important;
 
-    &.ui-sortable-column:hover:not(.ui-state-active) {
+    &.ui-sortable-column:hover {
       background-color: #f0f0f0 !important;
       border: 1px solid #f0f0f0 !important;
       border-width: 0 1px !important;
+
+      &:first-child {
+        border-width: 0 1px 0 0 !important;
+      }
     }
 
     &.ui-state-active {
-      color: #fff !important;
-      background-color: $orange-color !important;
-      border: 1px solid $orange-color !important;
-      border-width: 0 1px !important;
+      background-color: #fff !important;
+
+      .fa {
+        @extend .glyphicon;
+        font-size: 11px;
+
+        &.fa-sort-asc {
+          @extend .glyphicon-triangle-top;
+        }
+
+        &.fa-sort-desc {
+          @extend .glyphicon-triangle-bottom;
+        }
+      }
     }
   }
 
@@ -347,6 +364,15 @@ p-datatable {
   @include grey-button;
 }
 
+// In tables, don't have a hover different background
+table {
+  .action-button-edit, .action-button-delete {
+    &:hover, &:active, &:focus, &[disabled], &.disabled {
+      background-color: $grey-color !important;
+    }
+  }
+}
+
 // On small screen, menu is absolute
 @media screen and (max-width: 800px) {
   .title-menu-left {