ActivityPub-federated video streaming platform using P2P directly in your web browser
Adapt login message if upload is not allowed
Chocobozzzd3863d3a9a2e
diff --git a/client/src/app/+login/login.component.html b/client/src/app/+login/login.component.htmlindex 06eba5a9ab..32b57bde8d 100644--- a/client/src/app/+login/login.component.html+++ b/client/src/app/+login/login.component.html@@ -4,19 +4,23 @@<ng-container *ngIf="!externalAuthError && !isAuthenticatedWithExternalAuth"><my-alert type="primary">- <h5 class="alert-heading" i18n>- Logging into an account lets you publish content+ <h5 class="alert-heading">+ @if (canUploadByDefault()) {+ <ng-container i18n>Logging into an account lets you publish content</ng-container>+ } @else {+ <ng-container i18n>Logging into an account lets you subscribe to your favorite content</ng-container>+ }</h5>@if (signupAllowed) {<p i18n>- This instance allows registration. However, be careful to check the <a class="link-primary terms-anchor d-inline" (click)="onTermsClick($event, instanceInformation)" href="/about/instance#terms">Terms</a><a class="terms-link" target="_blank" routerLink="/about/instance">Terms</a> before creating an account.- You may also search for another instance to match your exact needs at: <a class="link-primary" href="https://joinpeertube.org/instances" target="_blank" rel="noopener noreferrer">https://joinpeertube.org/instances</a>.+ {{ instanceName }} allows registration. However, be careful to check the <a class="link-primary terms-anchor d-inline" (click)="onTermsClick($event, instanceInformation)" href="/about/instance#terms">Terms</a><a class="terms-link" target="_blank" routerLink="/about/instance">Terms</a> before creating an account.+ You may also search for another PeerTube platform to match your exact needs at: <a class="link-primary" href="https://joinpeertube.org/instances" target="_blank" rel="noopener noreferrer">https://joinpeertube.org/instances</a>.</p>} @else {<p i18n>- Currently this instance doesn't allow for user registration, you may check the <a class="link-primary terms-anchor d-inline" (click)="onTermsClick($event, instanceInformation)" href="/about/instance#terms">Terms</a><a class="terms-link" target="_blank" routerLink="/about/instance">Terms</a> for more details or find an instance that gives you the possibility to sign up for an account and upload your videos there.- Find yours among multiple instances at: <a class="link-primary" href="https://joinpeertube.org/instances" target="_blank" rel="noopener noreferrer">https://joinpeertube.org/instances</a>.+ {{ instanceName }} doesn't allow for user registration. You may check the <a class="link-primary terms-anchor d-inline" (click)="onTermsClick($event, instanceInformation)" href="/about/instance#terms">Terms</a><a class="terms-link" target="_blank" routerLink="/about/instance">Terms</a> for more details or find a PeerTube platform that gives you the possibility to sign up for an account and upload your videos there.+ Find yours among multiple platforms at: <a class="link-primary" href="https://joinpeertube.org/instances" target="_blank" rel="noopener noreferrer">https://joinpeertube.org/instances</a>.</p>}</my-alert>diff --git a/client/src/app/+login/login.component.ts b/client/src/app/+login/login.component.tsindex 9e8cafb7da..94dadd3cca 100644--- a/client/src/app/+login/login.component.ts+++ b/client/src/app/+login/login.component.ts@@ -103,6 +103,10 @@ export class LoginComponent extends FormReactive implements OnInit, AfterViewInireturn this.serverConfig.email.enabled === false}+ canUploadByDefault () {+ return this.serverConfig.user.videoQuota !== 0 && this.serverConfig.user.videoQuotaDaily !== 0+ }+ngOnInit () {const snapshot = this.route.snapshot