hide RSS for comments, normalize video-channel edit with account edit

pull/2567/head
Rigel Kent 2020-03-12 00:45:45 +01:00
parent c9ad38f4cb
commit 8227643bce
No known key found for this signature in database
GPG Key ID: 5E53E96A494E452F
6 changed files with 111 additions and 68 deletions

View File

@ -18,7 +18,7 @@ import { NgbTabset } from '@ng-bootstrap/ng-bootstrap'
styleUrls: [ './edit-custom-config.component.scss' ]
})
export class EditCustomConfigComponent extends FormReactive implements OnInit, AfterViewChecked {
@ViewChild('tabs') private tabs: NgbTabset
@ViewChild('tabs') tabs: NgbTabset
initDone = false
customConfig: CustomConfig

View File

@ -24,6 +24,7 @@
<div class="form-row mt-5"> <!-- video settings grid -->
<div class="form-group col-12 col-lg-4 col-xl-3">
<div class="anchor" id="video-settings"></div> <!-- video settings anchor -->
<div i18n class="account-title">VIDEO SETTINGS</div>
</div>

View File

@ -1,8 +1,3 @@
<my-actor-avatar-info
*ngIf="isCreation() === false && videoChannelToUpdate"
[actor]="videoChannelToUpdate" (avatarChange)="onAvatarChange($event)"
></my-actor-avatar-info>
<div i18n class="form-sub-title" *ngIf="isCreation() === true">Create a video channel</div>
<div *ngIf="error" class="alert alert-danger">{{ error }}</div>
@ -24,49 +19,69 @@
</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 i18n class="video-channel-title">CHANNEL</div>
</div>
<div class="form-group form-group-right col-12 col-lg-8 col-xl-9">
<my-actor-avatar-info
*ngIf="isCreation() === false && 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"
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"
[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" 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>
</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 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>
<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>
<input type="submit" value="{{ getFormButtonTitle() }}" [disabled]="!form.valid">
</form>

View File

@ -1,6 +1,10 @@
@import '_variables';
@import '_mixins';
.video-channel-title {
@include settings-big-title;
}
.form-sub-title {
margin-bottom: 20px;
}
@ -18,15 +22,28 @@ my-actor-avatar-info {
height: 30px;
}
input[type=text] {
@include peertube-input-text(340px);
display: block;
&#name {
width: auto;
flex-grow: 1;
input {
&[type=text] {
@include peertube-input-text(340px);
display: block;
&#name {
width: auto;
flex-grow: 1;
}
}
&[type=submit] {
@include peertube-button;
@include orange-button;
margin-left: auto;
}
}
label {
font-weight: $font-regular;
font-size: 100%;
}
textarea {
@ -35,11 +52,14 @@ textarea {
display: block;
}
my-markdown-textarea ::ng-deep {
.root {
@media screen and (max-width: 1400px) {
flex-direction: column !important;
}
}
}
.peertube-select-container {
@include peertube-select-container(340px);
}
input[type=submit] {
@include peertube-button;
@include orange-button;
}

View File

@ -37,13 +37,13 @@
<i class="ml-auto glyphicon glyphicon-menu-right"></i>
</a>
<a ngbDropdownItem ngbDropdownToggle class="dropdown-item" routerLink="/my-account">
<a ngbDropdownItem ngbDropdownToggle class="dropdown-item" routerLink="/my-account/settings" fragment="video-settings">
<my-global-icon iconName="video-lang"></my-global-icon>
<ng-container i18n>Videos: {{ videoLanguages.join(', ') }}</ng-container>
<i class="ml-auto glyphicon glyphicon-menu-right"></i>
</a>
<a ngbDropdownItem ngbDropdownToggle class="dropdown-item" routerLink="/my-account">
<a ngbDropdownItem ngbDropdownToggle class="dropdown-item" routerLink="/my-account/settings" fragment="video-settings">
<my-global-icon class="hover-display-toggle" [ngClass]="{ 'not-displayed': user.nsfwPolicy === 'display' }" iconName="sensitive"></my-global-icon>
<my-global-icon class="hover-display-toggle" [ngClass]="{ 'not-displayed': user.nsfwPolicy !== 'display' }" iconName="unsensitive"></my-global-icon>
<ng-container i18n>Sensitive: {{ nsfwPolicy }}</ng-container>

View File

@ -17,8 +17,20 @@
font-size: 13px;
}
.title-block .title-page {
margin-right: 0;
.title-block {
.title-page {
margin-right: 0;
}
my-feed {
display: inline-block;
margin-left: 5px;
opacity: 0;
transition: ease-in .2s opacity;
}
&:hover my-feed {
opacity: 1;
}
}
#dropdownSortComments {
@ -28,11 +40,6 @@
transform: translateY(-7%);
}
my-feed {
display: inline-block;
margin-left: 5px;
}
@media screen and (max-width: 600px) {
.view-replies {
margin-left: 46px;