]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.component.html
Add channel/account avatars in miniature (#2838)
[github/Chocobozzz/PeerTube.git] / client / src / app / +my-account / my-account-video-channels / my-account-video-channel-edit.component.html
index f87df87dfcd747b7ee234eeaa45a553d10134965..048d143cd0a6515e128e52933de66ee56c7fafe2 100644 (file)
-<my-actor-avatar-info
-  *ngIf="isCreation() === false && videoChannelToUpdate"
-  [actor]="videoChannelToUpdate" (avatarChange)="onAvatarChange($event)"
-></my-actor-avatar-info>
+<nav aria-label="breadcrumb">
+  <ol class="breadcrumb">
+    <li class="breadcrumb-item">
+      <a routerLink="/my-account/video-channels" i18n>My Channels</a>
+    </li>
 
-<div i18n class="form-sub-title" *ngIf="isCreation() === true">Create a video channel</div>
+    <ng-container *ngIf="isCreation()">
+      <li class="breadcrumb-item active" i18n>Create</li>
+    </ng-container>
+    <ng-container *ngIf="!isCreation()">
+      <li class="breadcrumb-item active" i18n>Edit</li>
+      <li class="breadcrumb-item active" aria-current="page">
+        <a *ngIf="videoChannelToUpdate" [routerLink]="[ '/my-account/video-channels/update', videoChannelToUpdate?.nameWithHost ]">{{ videoChannelToUpdate?.displayName }}</a>
+      </li>
+    </ng-container>
+  </ol>
+</nav>
 
 <div *ngIf="error" class="alert alert-danger">{{ error }}</div>
 
 <form role="form" (ngSubmit)="formValidated()" [formGroup]="form">
-  <div class="form-group" *ngIf="isCreation() === true">
-    <label i18n for="name">Name</label>
-    <div class="input-group">
-      <input
-        type="text" id="name" i18n-placeholder placeholder="Example: my_channel"
-        formControlName="name" [ngClass]="{ 'input-error': formErrors['name'] }"
-      >
-      <div class="input-group-append">
-        <span class="input-group-text">@{{ instanceHost }}</span>
-      </div>
-    </div>
-    <div *ngIf="formErrors['name']" class="form-error">
-      {{ formErrors['name'] }}
-    </div>
-  </div>
 
-  <div class="form-group">
-    <label i18n for="display-name">Display name</label>
-    <input
-      type="text" id="display-name"
-      formControlName="display-name" [ngClass]="{ 'input-error': formErrors['display-name'] }"
-    >
-    <div *ngIf="formErrors['display-name']" class="form-error">
-      {{ formErrors['display-name'] }}
+  <div class="form-row"> <!-- channel grid -->
+    <div class="form-group col-12 col-lg-4 col-xl-3">
+      <div *ngIf="isCreation()" class="video-channel-title" i18n>NEW CHANNEL</div>
+      <div *ngIf="!isCreation() && videoChannelToUpdate" class="video-channel-title" i18n>CHANNEL</div>
     </div>
-  </div>
 
-  <div class="form-group">
-    <label i18n for="description">Description</label>
-    <textarea
-      id="description" formControlName="description"
-      [ngClass]="{ 'input-error': formErrors['description'] }"
-    ></textarea>
-    <div *ngIf="formErrors.description" class="form-error">
-      {{ formErrors.description }}
-    </div>
-  </div>
+    <div class="form-group form-group-right col-12 col-lg-8 col-xl-9">
+
+      <div class="form-group" *ngIf="isCreation()">
+        <label i18n for="name">Name</label>
+        <div class="input-group">
+          <input
+            type="text" id="name" i18n-placeholder placeholder="Example: my_channel"
+            formControlName="name" [ngClass]="{ 'input-error': formErrors['name'] }" class="form-control"
+          >
+          <div class="input-group-append">
+            <span class="input-group-text">@{{ instanceHost }}</span>
+          </div>
+        </div>
+        <div *ngIf="formErrors['name']" class="form-error">
+          {{ formErrors['name'] }}
+        </div>
+      </div>
+
+      <my-actor-avatar-info
+        *ngIf="!isCreation() && videoChannelToUpdate"
+        [actor]="videoChannelToUpdate" (avatarChange)="onAvatarChange($event)"
+      ></my-actor-avatar-info>
+
+      <div class="form-group">
+        <label i18n for="display-name">Display name</label>
+        <input
+          type="text" id="display-name" class="form-control"
+          formControlName="display-name" [ngClass]="{ 'input-error': formErrors['display-name'] }"
+        >
+        <div *ngIf="formErrors['display-name']" class="form-error">
+          {{ formErrors['display-name'] }}
+        </div>
+      </div>
+
+      <div class="form-group">
+        <label i18n for="description">Description</label>
+        <textarea
+          id="description" formControlName="description" class="form-control"
+          [ngClass]="{ 'input-error': formErrors['description'] }"
+        ></textarea>
+        <div *ngIf="formErrors.description" class="form-error">
+          {{ formErrors.description }}
+        </div>
+      </div>
+
+      <div class="form-group">
+        <label for="support">Support</label>
+        <my-help
+          helpType="markdownEnhanced" i18n-preHtml preHtml="Short text to tell people how they can support your channel (membership platform...).<br /><br />
+    When you will upload a video in this channel, the video support field will be automatically filled by this text."
+        ></my-help>
+        <my-markdown-textarea
+            id="support" formControlName="support" textareaMaxWidth="500px" markdownType="enhanced"
+            [classes]="{ 'input-error': formErrors['support'] }"
+        ></my-markdown-textarea>
+        <div *ngIf="formErrors.support" class="form-error">
+          {{ formErrors.support }}
+        </div>
+      </div>
+
+      <div class="form-group" *ngIf="isBulkUpdateVideosDisplayed()">
+        <my-peertube-checkbox
+          inputName="bulkVideosSupportUpdate" formControlName="bulkVideosSupportUpdate"
+          i18n-labelText labelText="Overwrite support field of all videos of this channel"
+        ></my-peertube-checkbox>
+      </div>
 
-  <div class="form-group">
-    <label for="support">Support</label>
-    <my-help
-      helpType="markdownEnhanced" i18n-preHtml preHtml="Short text to tell people how they can support your channel (membership platform...).<br /><br />
-When you will upload a video in this channel, the video support field will be automatically filled by this text."
-    ></my-help>
-    <my-markdown-textarea
-        id="support" formControlName="support" textareaWidth="500px" [previewColumn]="true" markdownType="enhanced"
-        [classes]="{ 'input-error': formErrors['support'] }"
-    ></my-markdown-textarea>
-    <div *ngIf="formErrors.support" class="form-error">
-      {{ formErrors.support }}
     </div>
   </div>
 
-  <div class="form-group" *ngIf="isBulkUpdateVideosDisplayed()">
-    <my-peertube-checkbox
-      inputName="bulkVideosSupportUpdate" formControlName="bulkVideosSupportUpdate"
-      i18n-labelText labelText="Overwrite support field of all videos of this channel"
-    ></my-peertube-checkbox>
+  <div class="form-row"> <!-- submit placement block -->
+    <div class="col-md-7 col-xl-5"></div>
+    <div class="col-md-5 col-xl-5 d-inline-flex">
+      <input type="submit" value="{{ getFormButtonTitle() }}" [disabled]="!form.valid">
+    </div>
   </div>
-
-  <input type="submit" value="{{ getFormButtonTitle() }}" [disabled]="!form.valid">
 </form>