]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+my-library/+my-video-channels/my-video-channel-edit.component.html
Add ability to update the banner
[github/Chocobozzz/PeerTube.git] / client / src / app / +my-library / +my-video-channels / my-video-channel-edit.component.html
CommitLineData
03a3ad91
RK
1<nav aria-label="breadcrumb">
2 <ol class="breadcrumb">
3 <li class="breadcrumb-item">
17119e4a 4 <a routerLink="/my-library/video-channels" i18n>My Channels</a>
03a3ad91
RK
5 </li>
6
7 <ng-container *ngIf="isCreation()">
8 <li class="breadcrumb-item active" i18n>Create</li>
9 </ng-container>
10 <ng-container *ngIf="!isCreation()">
11 <li class="breadcrumb-item active" i18n>Edit</li>
12 <li class="breadcrumb-item active" aria-current="page">
17119e4a 13 <a *ngIf="videoChannelToUpdate" [routerLink]="[ '/my-library/video-channels/update', videoChannelToUpdate?.nameWithHost ]">{{ videoChannelToUpdate?.displayName }}</a>
03a3ad91
RK
14 </li>
15 </ng-container>
16 </ol>
17</nav>
08c1efbe
C
18
19<div *ngIf="error" class="alert alert-danger">{{ error }}</div>
20
21<form role="form" (ngSubmit)="formValidated()" [formGroup]="form">
8a19bee1 22
8227643b
RK
23 <div class="form-row"> <!-- channel grid -->
24 <div class="form-group col-12 col-lg-4 col-xl-3">
03a3ad91
RK
25 <div *ngIf="isCreation()" class="video-channel-title" i18n>NEW CHANNEL</div>
26 <div *ngIf="!isCreation() && videoChannelToUpdate" class="video-channel-title" i18n>CHANNEL</div>
08c1efbe 27 </div>
08c1efbe 28
e2c1f779 29 <div class="form-group col-12 col-lg-8 col-xl-9">
8227643b 30
03a3ad91
RK
31 <div class="form-group" *ngIf="isCreation()">
32 <label i18n for="name">Name</label>
33 <div class="input-group">
34 <input
35 type="text" id="name" i18n-placeholder placeholder="Example: my_channel"
a6d5ff76 36 formControlName="name" [ngClass]="{ 'input-error': formErrors['name'] }" class="form-control"
03a3ad91
RK
37 >
38 <div class="input-group-append">
39 <span class="input-group-text">@{{ instanceHost }}</span>
40 </div>
41 </div>
42 <div *ngIf="formErrors['name']" class="form-error">
43 {{ formErrors['name'] }}
44 </div>
45 </div>
46
cdeddff1
C
47 <h6 i18n>Banner image of your channel</h6>
48
49 <my-actor-banner-edit
50 *ngIf="!isCreation() && videoChannelToUpdate"
51 [actor]="videoChannelToUpdate" (bannerChange)="onBannerChange($event)" (bannerDelete)="onBannerDelete()"
52 ></my-actor-banner-edit>
53
54 <my-actor-avatar-edit
03a3ad91 55 *ngIf="!isCreation() && videoChannelToUpdate"
1ea7da81 56 [actor]="videoChannelToUpdate" (avatarChange)="onAvatarChange($event)" (avatarDelete)="onAvatarDelete()"
cdeddff1 57 ></my-actor-avatar-edit>
8227643b
RK
58
59 <div class="form-group">
60 <label i18n for="display-name">Display name</label>
61 <input
a6d5ff76 62 type="text" id="display-name" class="form-control"
8227643b
RK
63 formControlName="display-name" [ngClass]="{ 'input-error': formErrors['display-name'] }"
64 >
65 <div *ngIf="formErrors['display-name']" class="form-error">
66 {{ formErrors['display-name'] }}
67 </div>
68 </div>
b15fe00f 69
8227643b
RK
70 <div class="form-group">
71 <label i18n for="description">Description</label>
72 <textarea
a6d5ff76 73 id="description" formControlName="description" class="form-control"
8227643b
RK
74 [ngClass]="{ 'input-error': formErrors['description'] }"
75 ></textarea>
76 <div *ngIf="formErrors.description" class="form-error">
77 {{ formErrors.description }}
78 </div>
79 </div>
b15fe00f 80
8227643b
RK
81 <div class="form-group">
82 <label for="support">Support</label>
83 <my-help
84 helpType="markdownEnhanced" i18n-preHtml preHtml="Short text to tell people how they can support your channel (membership platform...).<br /><br />
85 When you will upload a video in this channel, the video support field will be automatically filled by this text."
86 ></my-help>
87 <my-markdown-textarea
b15fe00f 88 id="support" formControlName="support" textareaMaxWidth="500px" markdownType="enhanced"
8227643b
RK
89 [classes]="{ 'input-error': formErrors['support'] }"
90 ></my-markdown-textarea>
91 <div *ngIf="formErrors.support" class="form-error">
92 {{ formErrors.support }}
93 </div>
94 </div>
b15fe00f 95
8227643b
RK
96 <div class="form-group" *ngIf="isBulkUpdateVideosDisplayed()">
97 <my-peertube-checkbox
98 inputName="bulkVideosSupportUpdate" formControlName="bulkVideosSupportUpdate"
99 i18n-labelText labelText="Overwrite support field of all videos of this channel"
100 ></my-peertube-checkbox>
101 </div>
08c1efbe 102
08c1efbe
C
103 </div>
104 </div>
105
8227643b
RK
106 <div class="form-row"> <!-- submit placement block -->
107 <div class="col-md-7 col-xl-5"></div>
108 <div class="col-md-5 col-xl-5 d-inline-flex">
109 <input type="submit" value="{{ getFormButtonTitle() }}" [disabled]="!form.valid">
110 </div>
1e66b987 111 </div>
08c1efbe 112</form>