diff options
Diffstat (limited to 'client/src/app/+my-account')
5 files changed, 38 insertions, 5 deletions
diff --git a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts index c0eaa4763..79ac07c93 100644 --- a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts +++ b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts | |||
@@ -29,8 +29,13 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE | |||
29 | super() | 29 | super() |
30 | } | 30 | } |
31 | 31 | ||
32 | get instanceHost () { | ||
33 | return window.location.host | ||
34 | } | ||
35 | |||
32 | ngOnInit () { | 36 | ngOnInit () { |
33 | this.buildForm({ | 37 | this.buildForm({ |
38 | name: this.videoChannelValidatorsService.VIDEO_CHANNEL_NAME, | ||
34 | 'display-name': this.videoChannelValidatorsService.VIDEO_CHANNEL_DISPLAY_NAME, | 39 | 'display-name': this.videoChannelValidatorsService.VIDEO_CHANNEL_DISPLAY_NAME, |
35 | description: this.videoChannelValidatorsService.VIDEO_CHANNEL_DESCRIPTION, | 40 | description: this.videoChannelValidatorsService.VIDEO_CHANNEL_DESCRIPTION, |
36 | support: this.videoChannelValidatorsService.VIDEO_CHANNEL_SUPPORT | 41 | support: this.videoChannelValidatorsService.VIDEO_CHANNEL_SUPPORT |
@@ -42,6 +47,7 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE | |||
42 | 47 | ||
43 | const body = this.form.value | 48 | const body = this.form.value |
44 | const videoChannelCreate: VideoChannelCreate = { | 49 | const videoChannelCreate: VideoChannelCreate = { |
50 | name: body.name, | ||
45 | displayName: body['display-name'], | 51 | displayName: body['display-name'], |
46 | description: body.description || null, | 52 | description: body.description || null, |
47 | support: body.support || null | 53 | support: body.support || null |
diff --git a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.component.html b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.component.html index f7ca2ec43..81fb11f45 100644 --- a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.component.html +++ b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.component.html | |||
@@ -8,6 +8,22 @@ | |||
8 | <div *ngIf="error" class="alert alert-danger">{{ error }}</div> | 8 | <div *ngIf="error" class="alert alert-danger">{{ error }}</div> |
9 | 9 | ||
10 | <form role="form" (ngSubmit)="formValidated()" [formGroup]="form"> | 10 | <form role="form" (ngSubmit)="formValidated()" [formGroup]="form"> |
11 | <div class="form-group" *ngIf="isCreation() === true"> | ||
12 | <label i18n for="name">Name</label> | ||
13 | <div class="input-group"> | ||
14 | <input | ||
15 | type="text" id="name" i18n-placeholder placeholder="Example: my_channel" | ||
16 | formControlName="name" [ngClass]="{ 'input-error': formErrors['name'] }" | ||
17 | > | ||
18 | <div class="input-group-append"> | ||
19 | <span class="input-group-text">@{{ instanceHost }}</span> | ||
20 | </div> | ||
21 | </div> | ||
22 | <div *ngIf="formErrors['name']" class="form-error"> | ||
23 | {{ formErrors['name'] }} | ||
24 | </div> | ||
25 | </div> | ||
26 | |||
11 | <div class="form-group"> | 27 | <div class="form-group"> |
12 | <label i18n for="display-name">Display name</label> | 28 | <label i18n for="display-name">Display name</label> |
13 | <input | 29 | <input |
diff --git a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.component.scss b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.component.scss index 86c2598b7..833fda450 100644 --- a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.component.scss +++ b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.component.scss | |||
@@ -10,10 +10,19 @@ my-actor-avatar-info { | |||
10 | margin-bottom: 20px; | 10 | margin-bottom: 20px; |
11 | } | 11 | } |
12 | 12 | ||
13 | .input-group { | ||
14 | @include peertube-input-group(340px); | ||
15 | } | ||
16 | |||
13 | input[type=text] { | 17 | input[type=text] { |
14 | @include peertube-input-text(340px); | 18 | @include peertube-input-text(340px); |
15 | 19 | ||
16 | display: block; | 20 | display: block; |
21 | |||
22 | &#name { | ||
23 | width: auto; | ||
24 | flex-grow: 1; | ||
25 | } | ||
17 | } | 26 | } |
18 | 27 | ||
19 | textarea { | 28 | textarea { |
diff --git a/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.html b/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.html index d27c3b4ec..548645a76 100644 --- a/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.html +++ b/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.html | |||
@@ -7,15 +7,14 @@ | |||
7 | 7 | ||
8 | <div class="video-channels"> | 8 | <div class="video-channels"> |
9 | <div *ngFor="let videoChannel of videoChannels" class="video-channel"> | 9 | <div *ngFor="let videoChannel of videoChannels" class="video-channel"> |
10 | <a [routerLink]="[ '/video-channels', videoChannel.uuid ]"> | 10 | <a [routerLink]="[ '/video-channels', videoChannel.name ]"> |
11 | <img [src]="videoChannel.avatarUrl" alt="Avatar" /> | 11 | <img [src]="videoChannel.avatarUrl" alt="Avatar" /> |
12 | </a> | 12 | </a> |
13 | 13 | ||
14 | <div class="video-channel-info"> | 14 | <div class="video-channel-info"> |
15 | <a [routerLink]="[ '/video-channels', videoChannel.uuid ]" class="video-channel-names" i18n-title title="Go to the channel"> | 15 | <a [routerLink]="[ '/video-channels', videoChannel.name ]" class="video-channel-names" i18n-title title="Go to the channel"> |
16 | <div class="video-channel-display-name">{{ videoChannel.displayName }}</div> | 16 | <div class="video-channel-display-name">{{ videoChannel.displayName }}</div> |
17 | <!-- Hide the name for now, because it's an UUID not very friendly --> | 17 | <div class="video-channel-name">{{ videoChannel.name }}</div> |
18 | <!--<div class="video-channel-name">{{ videoChannel.name }}</div>--> | ||
19 | </a> | 18 | </a> |
20 | 19 | ||
21 | <div i18n class="video-channel-followers">{{ videoChannel.followersCount }} subscribers</div> | 20 | <div i18n class="video-channel-followers">{{ videoChannel.followersCount }} subscribers</div> |
@@ -24,7 +23,7 @@ | |||
24 | <div class="video-channel-buttons"> | 23 | <div class="video-channel-buttons"> |
25 | <my-delete-button (click)="deleteVideoChannel(videoChannel)"></my-delete-button> | 24 | <my-delete-button (click)="deleteVideoChannel(videoChannel)"></my-delete-button> |
26 | 25 | ||
27 | <my-edit-button [routerLink]="[ 'update', videoChannel.uuid ]"></my-edit-button> | 26 | <my-edit-button [routerLink]="[ 'update', videoChannel.name ]"></my-edit-button> |
28 | </div> | 27 | </div> |
29 | </div> | 28 | </div> |
30 | </div> | 29 | </div> |
diff --git a/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.scss b/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.scss index f047bb411..f8fd2684e 100644 --- a/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.scss +++ b/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.scss | |||
@@ -30,7 +30,9 @@ | |||
30 | a.video-channel-names { | 30 | a.video-channel-names { |
31 | @include disable-default-a-behaviour; | 31 | @include disable-default-a-behaviour; |
32 | 32 | ||
33 | width: fit-content; | ||
33 | display: flex; | 34 | display: flex; |
35 | align-items: baseline; | ||
34 | color: #000; | 36 | color: #000; |
35 | 37 | ||
36 | .video-channel-display-name { | 38 | .video-channel-display-name { |
@@ -41,6 +43,7 @@ | |||
41 | .video-channel-name { | 43 | .video-channel-name { |
42 | font-size: 14px; | 44 | font-size: 14px; |
43 | color: #777272; | 45 | color: #777272; |
46 | margin-left: 5px; | ||
44 | } | 47 | } |
45 | } | 48 | } |
46 | } | 49 | } |