Fix overflow in select inputs
authorChocobozzz <me@florianbigard.com>
Mon, 8 Jan 2018 10:30:48 +0000 (11:30 +0100)
committerChocobozzz <me@florianbigard.com>
Mon, 8 Jan 2018 10:30:58 +0000 (11:30 +0100)
client/src/app/videos/+video-edit/video-add.component.html
client/src/app/videos/+video-edit/video-add.component.ts
client/src/sass/include/_mixins.scss
server/controllers/activitypub/client.ts

index 20277423c8bbaa2b048ba023f538c8a15371c50e..193cc55eed02b8132daf49f37905faf76adc299a 100644 (file)
@@ -11,7 +11,7 @@
 
       <div class="button-file">
         <span>Select the file to upload</span>
-        <input #videofileInput type="file" name="videofile" id="videofile" (change)="fileChange()" />
+        <input #videofileInput type="file" name="videofile" id="videofile" [accept]="videoExtensions" (change)="fileChange()" />
       </div>
 
       <div class="form-group form-group-channel">
@@ -42,8 +42,8 @@
   <!-- Hidden because we need to load the component -->
   <form [hidden]="!isUploadingVideo" novalidate [formGroup]="form">
     <my-video-edit
-        [form]="form" [formErrors]="formErrors"
-        [validationMessages]="validationMessages" [videoPrivacies]="videoPrivacies" [userVideoChannels]="userVideoChannels"
+      [form]="form" [formErrors]="formErrors"
+      [validationMessages]="validationMessages" [videoPrivacies]="videoPrivacies" [userVideoChannels]="userVideoChannels"
     ></my-video-edit>
 
 
index 843475647401aa67b5977e30353268db3b732988..066f945fcb72d30be5c00f010c8fba6a27a79f4f 100644 (file)
@@ -52,6 +52,10 @@ export class VideoAddComponent extends FormReactive implements OnInit {
     super()
   }
 
+  get videoExtensions () {
+    return this.serverService.getConfig().video.file.extensions.join(',')
+  }
+
   buildForm () {
     this.form = this.formBuilder.group({})
     this.form.valueChanges.subscribe(data => this.onValueChanged(data))
index 7bfc93f08ca71bc4fd99e7b267dc370ae0dedd72..1237e675d4c0be6775c4e4eb1e3ffa54a726c9b0 100644 (file)
   }
 
   select {
-    padding: 0 12px;
+    padding: 0 35px 0 12px;
     width: calc(100% + 2px);
     position: relative;
     left: 1px;
     appearance: none;
     cursor: pointer;
     height: $button-height;
+    text-overflow: ellipsis;
 
     &:focus {
       outline: none;
index 71747391242e065e2641516c2ec278bb5469a0ed..d1a761724687e7939ddd24ffb987d639acb4ad65 100644 (file)
@@ -16,7 +16,7 @@ import { VideoShareModel } from '../../models/video/video-share'
 
 const activityPubClientRouter = express.Router()
 
-activityPubClientRouter.get('/accounts/:name',
+activityPubClientRouter.get('/accounts?/:name',
   executeIfActivityPub(asyncMiddleware(localAccountValidator)),
   executeIfActivityPub(accountController)
 )