Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Improve login page UI

Chocobozzz1105696623c4
diff --git a/client/src/app/+login/login.component.html b/client/src/app/+login/login.component.html
index a2d8dae2a6..10e25a936a 100644
--- a/client/src/app/+login/login.component.html
+++ b/client/src/app/+login/login.component.html
@@ -1,15 +1,37 @@
-<div class="margin-content">
- <div i18n class="title-page title-page-single">
- Login
- </div>
+<h1 i18n class="title-page-v2">
+ <strong class="underline-orange">{{ instanceName }}</strong>
+ >
+ Login
+</h1>
+<div class="margin-content">
<div class="alert alert-danger" i18n *ngIf="externalAuthError">
Sorry but there was an issue with the external login process. Please <a routerLink="/about">contact an administrator</a>.
</div>
<ng-container *ngIf="!externalAuthError && !isAuthenticatedWithExternalAuth">
- <div *ngIf="error" class="alert alert-danger">{{ error }}
- <span *ngIf="error === 'User email is not verified.'"> <a i18n routerLink="/verify-account/ask-send-email">Request new verification email.</a></span>
+ <div *ngIf="error" class="alert alert-danger">
+ {{ error }}
+
+ <span *ngIf="error === 'User email is not verified.'">
+ <a i18n routerLink="/verify-account/ask-send-email">Request new verification email.</a>
+ </span>
+ </div>
+
+ <div class="alert pt-alert-primary" role="alert">
+ <h5 class="alert-heading" i18n>
+ Logging into an account lets you publish content
+ </h5>
+
+ <p *ngIf="signupAllowed" i18n>
+ This instance allows registration. However, be careful to check the <a class="link-orange terms-anchor" (click)="onTermsClick($event, instanceInformation)" href='#'>Terms</a><a class="terms-link" target="_blank" routerLink="/about/instance" fragment="terms">Terms</a> before creating an account.
+ You may also search for another instance to match your exact needs at: <a class="link-orange" href="https://joinpeertube.org/instances" target="_blank" rel="noopener noreferrer">https://joinpeertube.org/instances</a>.
+ </p>
+
+ <p *ngIf="!signupAllowed" i18n>
+ Currently this instance doesn't allow for user registration, you may check the <a (click)="onTermsClick($event, instanceInformation)" href='#'>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-orange" href="https://joinpeertube.org/instances" target="_blank" rel="noopener noreferrer">https://joinpeertube.org/instances</a>.
+ </p>
</div>
<div class="wrapper">
@@ -18,16 +40,14 @@
<form myPluginSelector pluginSelectorId="login-form" role="form" (ngSubmit)="login()" [formGroup]="form">
<div class="form-group">
<div>
- <label i18n for="username">User</label>
+ <label i18n for="username">Username or email address</label>
<input
- type="text" id="username" i18n-placeholder placeholder="Username or email address" required tabindex="1"
+ type="text" id="username" i18n-placeholder placeholder="Example: [email protected]" required tabindex="1"
formControlName="username" class="form-control" [ngClass]="{ 'input-error': formErrors['username'] }" myAutofocus
>
</div>
- <div *ngIf="formErrors.username" class="form-error">
- {{ formErrors.username }}
- </div>
+ <div *ngIf="formErrors.username" class="form-error">{{ formErrors.username }}</div>
<div *ngIf="hasUsernameUppercase()" i18n class="form-warning">
⚠️ Most email addresses do not include capital letters.
@@ -36,40 +56,24 @@
<div class="form-group">
<label i18n for="password">Password</label>
+
<my-input-text formControlName="password" inputId="password"
i18n-placeholder placeholder="Password"
[ngClass]="{ 'input-error': formErrors['password'] }"
autocomplete="current-password" [tabindex]="2"></my-input-text>
- <div *ngIf="formErrors.password" class="form-error">
- {{ formErrors.password }}
- </div>
+
+ <div *ngIf="formErrors.password" class="form-error">{{ formErrors.password }}</div>
</div>
<input type="submit" class="peertube-button orange-button" i18n-value value="Login" [disabled]="!form.valid">
- <div class="additionnal-links">
- <a i18n role="button" class="forgot-password-button" (click)="openForgotPasswordModal()" i18n-title title="Click here to reset your password">I forgot my password</a>
+ <div class="additional-links">
+ <a i18n role="button" class="link-orange" (click)="openForgotPasswordModal()" i18n-title title="Click here to reset your password">I forgot my password</a>
- <div *ngIf="signupAllowed" class="signup-link">
+ <ng-container *ngIf="signupAllowed">
<span>·</span>
- <a i18n routerLink="/signup" class="create-an-account">Create an account</a>
- </div>
- </div>
-
- <div class="looking-for-account alert alert-info" role="alert">
- <h6 class="alert-heading" i18n>
- Logging into an account lets you publish content
- </h6>
-
- <div *ngIf="signupAllowed" i18n>
- This instance allows registration. However, be careful to check the <a class="terms-anchor" (click)="onTermsClick($event, instanceInformation)" href='#'>Terms</a><a class="terms-link" target="_blank" routerLink="/about/instance" fragment="terms">Terms</a> before creating an account.
- You may also search for another instance to match your exact needs at: <br /><a class="alert-link" href="https://joinpeertube.org/instances" target="_blank" rel="noopener noreferrer">https://joinpeertube.org/instances</a>.
- </div>
-
- <div *ngIf="!signupAllowed" i18n>
- Currently this instance doesn't allow for user registration, you may check the <a (click)="onTermsClick($event, instanceInformation)" href='#'>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: <br /> <a class="alert-link" href="https://joinpeertube.org/instances" target="_blank" rel="noopener noreferrer">https://joinpeertube.org/instances</a>.
- </div>
+ <a i18n routerLink="/signup" class="link-orange">Create an account</a>
+ </ng-container>
</div>
</form>
@@ -86,6 +90,7 @@
<div #instanceInformation class="instance-information">
<my-instance-about-accordion
+ [displayInstanceName]="false"
(init)="onInstanceAboutAccordionInit($event)" [panels]="instanceInformationPanels"
pluginScope="login" pluginHook="filter:login.instance-about-plugin-panels.create.result"
></my-instance-about-accordion>
diff --git a/client/src/app/+login/login.component.scss b/client/src/app/+login/login.component.scss
index e59ae10f80..f46cbf2bcd 100644
--- a/client/src/app/+login/login.component.scss
+++ b/client/src/app/+login/login.component.scss
@@ -6,6 +6,8 @@
label {
display: block;
+ font-size: 18px;
+ margin-bottom: 5px;
}
input[type=text],
@@ -21,7 +23,7 @@ input[type=email] {
}
}
-@media screen and (max-width: #{map-get($container-max-widths, sm)}) {
+@media screen and (max-width: $small-view) {
.modal-body {
#forgot-password-email {
width: 100%;
@@ -33,114 +35,103 @@ input[type=email] {
}
}
-.create-an-account,
-.forgot-password-button {
- color: pvar(--mainForegroundColor);
- cursor: pointer;
- transition: opacity cubic-bezier(0.39, 0.575, 0.565, 1);
-
- &:hover {
- text-decoration: none !important;
- opacity: .7 !important;
- }
-}
-
.wrapper {
display: flex;
- justify-content: space-around;
+ justify-content: space-between;
flex-wrap: wrap;
+ margin: auto;
> div {
flex: 1 1;
}
- .login-form-and-externals {
- @include margin-left(10px);
- @include margin-right(10px);
+ form {
+ width: 100%;
+ }
+}
- display: flex;
- flex-wrap: wrap;
- font-size: 15px;
- max-width: 450px;
- margin-bottom: 40px;
+.wrapper,
+.pt-alert-primary {
+ max-width: 1200px;
+}
- form {
- margin: 0;
+.pt-alert-primary {
+ margin: 0 auto 30px;
+}
- &,
- input {
- width: 100%;
- }
+.login-form-and-externals {
+ @include margin-left(10px);
+ @include margin-right(10px);
- .additionnal-links {
- display: block;
- text-align: center;
- margin-top: 20px;
- margin-bottom: 20px;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: center;
+ font-size: 15px;
+ max-width: 450px;
+ margin-bottom: 40px;
- .forgot-password-button,
- .create-an-account {
- padding: 4px;
- display: inline-block;
+ form {
+ margin: 0;
- color: var(--mainColor);
+ input[type=submit] {
+ width: 100%;
+ }
- &:hover,
- &:active {
- color: var(--mainHoverColor);
- }
- }
+ .additional-links {
+ display: flex;
+ justify-content: center;
+ margin: 20px 0 30px;
+
+ .link-orange {
+ margin: 0 15px;
}
}
+ }
+}
- .external-login-blocks {
- min-width: 200px;
+.external-login-blocks {
+ min-width: 200px;
+ text-align: center;
- .block-title {
- font-weight: $font-semibold;
- }
+ .block-title {
+ font-weight: $font-semibold;
+ }
- .external-login-block {
- @include disable-default-a-behaviour;
-
- cursor: pointer;
- border: 1px solid #d1d7e0;
- border-radius: 5px;
- color: pvar(--mainForegroundColor);
- margin: 10px 10px 0 0;
- display: flex;
- justify-content: center;
- align-items: center;
- min-height: 35px;
- min-width: 100px;
-
- &:hover {
- background-color: rgba(209, 215, 224, 0.5);
- }
- }
- }
+ .external-login-block {
+ @include disable-default-a-behaviour;
- .signup-link {
- display: inline-block;
+ cursor: pointer;
+ border: 1px solid #d1d7e0;
+ border-radius: 5px;
+ color: pvar(--mainForegroundColor);
+ margin: 10px 10px 0 0;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ min-height: 35px;
+ min-width: 100px;
+
+ &:hover {
+ background-color: rgba(209, 215, 224, 0.5);
}
}
+}
- .instance-information {
- @include margin-left(10px);
- @include margin-right(10px);
+.instance-information {
+ @include margin-left(10px);
+ @include margin-right(10px);
- max-width: 600px;
- min-width: 350px;
- margin-bottom: 40px;
- }
+ max-width: 600px;
+ min-width: 350px;
+ margin-bottom: 40px;
+}
- .terms-anchor {
- display: inline;
- }
+.terms-anchor {
+ display: inline;
+}
- .terms-link {
- display: none;
- }
+.terms-link {
+ display: none;
}
@mixin column-reverse-display {
diff --git a/client/src/app/+login/login.component.ts b/client/src/app/+login/login.component.ts
index 96754b7824..2ed9be16cf 100644
--- a/client/src/app/+login/login.component.ts
+++ b/client/src/app/+login/login.component.ts
@@ -59,6 +59,10 @@ export class LoginComponent extends FormReactive implements OnInit, AfterViewIni
return this.serverConfig.signup.allowed === true
}
+ get instanceName () {
+ return this.serverConfig.instance.name
+ }
+
onTermsClick (event: Event, instanceInformation: HTMLElement) {
event.preventDefault()
diff --git a/client/src/app/+signup/+register/register.component.html b/client/src/app/+signup/+register/register.component.html
index 76b1456040..442c65e2d8 100644
--- a/client/src/app/+signup/+register/register.component.html
+++ b/client/src/app/+signup/+register/register.component.html
@@ -1,11 +1,11 @@
<div>
- <div class="signup-disabled" *ngIf="signupDisabled">
+ <div class="margin-content signup-disabled" *ngIf="signupDisabled">
<div class="alert alert-warning" i18n>Signup is not enabled on this instance.</div>
</div>
<ng-container *ngIf="!signupDisabled">
- <h1 i18n class="header-title">
+ <h1 i18n class="title-page-v2">
<strong class="underline-orange">{{ instanceName }}</strong>
>
Create an account
diff --git a/client/src/app/+signup/+register/register.component.scss b/client/src/app/+signup/+register/register.component.scss
index af277d1821..8388bed7de 100644
--- a/client/src/app/+signup/+register/register.component.scss
+++ b/client/src/app/+signup/+register/register.component.scss
@@ -10,11 +10,8 @@
padding-top: 30vh;
}
-.header-title {
- font-weight: normal;
- font-size: 15px;
+.title-page-v2 {
background-color: pvar(--mainColorVeryLight);
- padding: 35px 25px 15px;
margin: 0;
}
diff --git a/client/src/index.html b/client/src/index.html
index 28667cdd03..5446fdfcd0 100644
--- a/client/src/index.html
+++ b/client/src/index.html
@@ -50,8 +50,8 @@
<ul>
<li>Allow JavaScript in your browser</li>
- <li>Use one of the <a class="alert-link" href="https://framagit.org/framasoft/peertube/documentation/-/raw/master/use-third-party-application.md" target="_blank">third-party applications</a> to browse this instance</li>
- <li>Review the source code on <a class="alert-link" href="https://github.com/Chocobozzz/PeerTube" target="_blank">GitHub</a> or <a class="alert-link" href="https://framagit.org/framasoft/peertube/PeerTube" target="_blank">Framasoft's GitLab</a>, and ask for eventual modifications to the instance owner.
+ <li>Use one of the <a class="link-orange" href="https://framagit.org/framasoft/peertube/documentation/-/raw/master/use-third-party-application.md" target="_blank">third-party applications</a> to browse this instance</li>
+ <li>Review the source code on <a class="link-orange" href="https://github.com/Chocobozzz/PeerTube" target="_blank">GitHub</a> or <a class="link-orange" href="https://framagit.org/framasoft/peertube/PeerTube" target="_blank">Framasoft's GitLab</a>, and ask for eventual modifications to the instance owner.
</ul>
</noscript>
@@ -62,8 +62,8 @@
<p>We are sorry but it seems that PeerTube is not compatible with your web browser.</p>
<hr>
- <p>Please try with the latest version of <a class="alert-link" href="https://www.mozilla.org" target="_blank">Mozilla Firefox</a>.</p>
- <p class="mb-0">If you think this is a mistake, please <a class="alert-link" href="https://github.com/Chocobozzz/PeerTube/issues/new" target="_blank">report it</a>.</p>
+ <p>Please try with the latest version of <a class="link-orange" href="https://www.mozilla.org" target="_blank">Mozilla Firefox</a>.</p>
+ <p class="mb-0">If you think this is a mistake, please <a class="link-orange" href="https://github.com/Chocobozzz/PeerTube/issues/new" target="_blank">report it</a>.</p>
</div>
<script type="text/javascript">
diff --git a/client/src/sass/class-helpers.scss b/client/src/sass/class-helpers.scss
index 0b2e6176ad..218ca3e768 100644
--- a/client/src/sass/class-helpers.scss
+++ b/client/src/sass/class-helpers.scss
@@ -6,7 +6,7 @@
.link-orange {
color: pvar(--mainForegroundColor);
font-weight: $font-bold;
- border-bottom: 3px solid pvar(--mainColor);
+ border-bottom: 0.20em solid pvar(--mainColor);
&:hover {
color: pvar(--mainForegroundColor);
@@ -16,7 +16,7 @@
.underline-orange {
display: inline-block;
- border-bottom: 3px solid pvar(--mainColor);
+ border-bottom: 0.20em solid pvar(--mainColor);
}
// ---------------------------------------------------------------------------
@@ -140,6 +140,12 @@ label + .form-group-description {
}
}
+.title-page-v2 {
+ font-weight: normal;
+ font-size: 15px;
+ padding: 35px 25px;
+}
+
.title-page-about,
.title-page-settings {
white-space: nowrap;
@@ -240,6 +246,10 @@ label + .form-group-description {
// ---------------------------------------------------------------------------
.alert {
+ p {
+ font-size: 16px;
+ }
+
p:last-child {
margin-bottom: 0;
}