diff --git a/client/src/app/header/header.component.html b/client/src/app/header/header.component.html
index 1bdfe9858..4fd18f9bd 100644
--- a/client/src/app/header/header.component.html
+++ b/client/src/app/header/header.component.html
@@ -4,7 +4,7 @@
>
-
+
Upload
diff --git a/client/src/app/header/header.component.ts b/client/src/app/header/header.component.ts
index 5fd122930..92a7eded6 100644
--- a/client/src/app/header/header.component.ts
+++ b/client/src/app/header/header.component.ts
@@ -2,9 +2,8 @@ import { filter, first, map, tap } from 'rxjs/operators'
import { Component, OnInit } from '@angular/core'
import { ActivatedRoute, NavigationEnd, Params, Router } from '@angular/router'
import { getParameterByName } from '../shared/misc/utils'
-import { AuthService, ServerService, Notifier } from '@app/core'
+import { AuthService, Notifier, ServerService } from '@app/core'
import { of } from 'rxjs'
-import { ServerConfig } from '@shared/models'
import { I18n } from '@ngx-translate/i18n-polyfill'
@Component({
@@ -17,8 +16,6 @@ export class HeaderComponent implements OnInit {
searchValue = ''
ariaLabelTextForSearch = ''
- private serverConfig: ServerConfig
-
constructor (
private router: Router,
private route: ActivatedRoute,
@@ -38,23 +35,6 @@ export class HeaderComponent implements OnInit {
map(() => getParameterByName('search', window.location.href))
)
.subscribe(searchQuery => this.searchValue = searchQuery || '')
-
- this.serverConfig = this.serverService.getTmpConfig()
- this.serverService.getConfig().subscribe(
- config => this.serverConfig = config,
-
- err => this.notifier.error(err.message)
- )
- }
-
- get routerLink () {
- if (this.isUserLoggedIn()) {
- return [ '/videos/upload' ]
- } else if (this.isRegistrationAllowed()) {
- return [ '/signup' ]
- } else {
- return [ '/login', { fromUpload: true } ]
- }
}
doSearch () {
@@ -73,15 +53,6 @@ export class HeaderComponent implements OnInit {
o.subscribe(() => this.router.navigate([ '/search' ], { queryParams }))
}
- isUserLoggedIn () {
- return this.authService.isLoggedIn()
- }
-
- isRegistrationAllowed () {
- return this.serverConfig.signup.allowed &&
- this.serverConfig.signup.allowedForCurrentIP
- }
-
private loadUserLanguagesIfNeeded (queryParams: any) {
if (queryParams && queryParams.languageOneOf) return of(queryParams)
diff --git a/client/src/app/login/login.component.html b/client/src/app/login/login.component.html
index 6c6a41c4a..0b0bacff0 100644
--- a/client/src/app/login/login.component.html
+++ b/client/src/app/login/login.component.html
@@ -3,15 +3,18 @@
Login
-
+
If you are looking for an account…
+
- Currently this instance doesn't allow for user registration, but you can find an instance
+ Currently this instance doesn't allow for user registration, but you can 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
{{ instancesIndexUrl }}
- , a directory of instances recommended by this instance.
+
+
+
+ Find yours among multiple instances at
https://joinpeertube.org/instances.
@@ -30,16 +33,6 @@
or create an account
-
-
- or create an account on another instance
-
-
-
-
- User registration is not allowed on this instance, but you can register on many others!
-
-
diff --git a/client/src/app/login/login.component.ts b/client/src/app/login/login.component.ts
index 1394d6b58..580f28822 100644
--- a/client/src/app/login/login.component.ts
+++ b/client/src/app/login/login.component.ts
@@ -22,9 +22,6 @@ export class LoginComponent extends FormReactive implements OnInit {
error: string = null
forgotPasswordEmail = ''
- from = {
- upload: false
- }
private openedForgotPasswordModal: NgbModalRef
private serverConfig: ServerConfig
@@ -47,17 +44,12 @@ export class LoginComponent extends FormReactive implements OnInit {
return this.serverConfig.signup.allowed === true
}
- get instancesIndexUrl () {
- return this.serverConfig.followings.instance.autoFollowIndex.indexUrl || 'https://instances.joinpeertube.org'
- }
-
isEmailDisabled () {
return this.serverConfig.email.enabled === false
}
ngOnInit () {
this.serverConfig = this.route.snapshot.data.serverConfig
- this.from.upload = Boolean(this.route.snapshot.paramMap.get('fromUpload'))
this.buildForm({
username: this.loginValidatorsService.LOGIN_USERNAME,