added custom status length warning

This commit is contained in:
Nicolas Constant 2019-06-23 17:18:55 -04:00
parent 62c5d42493
commit 04cdb6ebce
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
4 changed files with 15 additions and 4 deletions

View File

@ -43,10 +43,11 @@
<h4 class="my-account__label my-account__margin-top">advanced settings:</h4> <h4 class="my-account__label my-account__margin-top">advanced settings:</h4>
<div class="advanced-settings"> <div class="advanced-settings">
<input class="advanced-settings__checkbox" [value]="customStatusLength" (change)="onCustomLengthChange()" <input class="advanced-settings__checkbox" [value]="customStatusLengthEnabled" (change)="onCustomLengthChange()"
type="checkbox" name="customCharLength" value="customCharLength" id="customCharLength"> <label class="noselect advanced-settings__label" for="customCharLength">status' type="checkbox" name="customCharLength" value="customCharLength" id="customCharLength"> <label class="noselect advanced-settings__label" for="customCharLength">status'
custom length</label><br> custom length</label><br>
<input *ngIf="customStatusLength" class="themed-form advanced-settings__input" type="number" /> <p *ngIf="customStatusLengthEnabled" class="advanced-settings__text">use this only if your instance doesn't support custom length detection (i.e. not a Pleroma or glitch-soc instance)</p>
<input *ngIf="customStatusLengthEnabled" [value]="customStatusLength" class="themed-form advanced-settings__input" type="number" />
</div> </div>
<h4 class="my-account__label my-account__margin-top">remove account from sengi:</h4> <h4 class="my-account__label my-account__margin-top">remove account from sengi:</h4>

View File

@ -119,6 +119,12 @@
} }
&__text {
display: block;
margin: 0 6px 9px 6px;
color: rgb(140, 152, 173);
}
&__input { &__input {
margin-left: 5px; margin-left: 5px;
} }

View File

@ -24,7 +24,8 @@ export class MyAccountComponent implements OnInit, OnDestroy {
faCheck = faCheck; faCheck = faCheck;
faTimes = faTimes; faTimes = faTimes;
customStatusLength: boolean; customStatusLengthEnabled: boolean;
customStatusLength: number;
availableStreams: StreamWrapper[] = []; availableStreams: StreamWrapper[] = [];
availableLists: StreamWrapper[] = []; availableLists: StreamWrapper[] = [];
@ -61,7 +62,7 @@ export class MyAccountComponent implements OnInit, OnDestroy {
} }
onCustomLengthChange(): boolean { onCustomLengthChange(): boolean {
this.customStatusLength = !this.customStatusLength; this.customStatusLengthEnabled = !this.customStatusLengthEnabled;
return false; return false;
} }

View File

@ -21,6 +21,9 @@ export class AccountSettings {
displayNotifications: boolean = true; displayNotifications: boolean = true;
lastMentionCreationDate: string; lastMentionCreationDate: string;
lastNotificationCreationDate: string; lastNotificationCreationDate: string;
customStatusCharLengthEnabled: boolean = false;
customStatusCharLength: number = 500;
} }
export class GlobalSettings { export class GlobalSettings {