Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@angular/platform-browser-dynamic": "16.2.8",
"@angular/router": "16.2.8",
"@fontsource-variable/jetbrains-mono": "5.0.16",
"@fontsource-variable/space-grotesk": "^5.2.10",
"@fontsource/barlow": "^5.0.8",
"@fontsource/varela-round": "^5.0.8",
"@mdi/svg": "7.3.67",
Expand Down
66 changes: 45 additions & 21 deletions frontend/src/app/views/login/login.component.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,52 @@
<div fxLayout="column" fxFlexFill>
<div class="login" fxLayoutAlign="center top" fxLayout="row">
<div fxFlex="0 1 520px">
<div class="o-neko-logo" [class.rotate]="loggingIn">
<img src="../../../assets/oneko.svg"/>
</div>
<div class="login-form" fxLayout="column" (keydown.enter)="login()">
<h1>O-NEKO</h1>
<div class="login-page" [class.exiting]="exiting">
<div class="brand-panel">
<div class="ambient shape-1" aria-hidden="true"></div>
<div class="ambient shape-2" aria-hidden="true"></div>
<div class="ambient shape-3" aria-hidden="true"></div>
<div class="ambient shape-4" aria-hidden="true"></div>
<div class="ambient shape-5" aria-hidden="true"></div>

<div class="logo-wrap" aria-hidden="true">
<img src="/assets/oneko-animated.svg" alt=""/>
</div>

<mat-form-field appearance="outline" color="warn">
<input matInput [(ngModel)]="username" [placeholder]="'general.username' | translate"/>
</mat-form-field>
<div class="brand-text">
<div class="wordmark">O-NEKO</div>
<div class="tagline">{{'views.login.tagline1' | translate}}<br>{{'views.login.tagline2' | translate}}</div>
</div>

<mat-form-field appearance="outline" color="warn">
<input type="password" [(ngModel)]="password" matInput [placeholder]="'general.password' | translate" />
</mat-form-field>
<div class="brand-footer">open source · apache-2.0</div>
</div>

<button mat-raised-button (click)="login()">{{'views.login.doLogin' | translate}}</button>
</div>
<div fxLayout="row" fxLayoutAlign="end">
<on-i18n-switcher></on-i18n-switcher>
<on-theme-switcher></on-theme-switcher>
<div class="form-panel">
<div class="panel-controls">
<div class="lang-switch">
<button type="button" [class.active]="(locale$ | async) === 'en'" (click)="setLocale('en')">EN</button>
<button type="button" [class.active]="(locale$ | async) === 'de'" (click)="setLocale('de')">DE</button>
</div>
<button type="button" class="theme-toggle" (click)="toggleTheme()" [title]="'views.login.switchTheme' | translate">
<svg *ngIf="isDarkMode$ | async" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="12" cy="12" r="4.5"/><path d="M12 1.5v3M12 19.5v3M1.5 12h3M19.5 12h3M4.6 4.6l2.1 2.1M17.3 17.3l2.1 2.1M19.4 4.6l-2.1 2.1M6.7 17.3l-2.1 2.1"/></svg>
<svg *ngIf="(isDarkMode$ | async) === false" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"><path d="M20.5 14.5A8.5 8.5 0 1 1 9.5 3.5a7 7 0 0 0 11 11z"/></svg>
</button>
</div>

<form class="login-form" (ngSubmit)="login()">
<div class="form-heading">
<h1>{{'views.login.welcome' | translate}}</h1>
<p>{{'views.login.subtitle' | translate}}</p>
</div>

<label class="field field-username">
<span>{{'general.username' | translate}}</span>
<input name="username" [(ngModel)]="username" autocomplete="username" placeholder="username" autofocus/>
</label>

<label class="field field-password">
<span>{{'general.password' | translate}}</span>
<input type="password" name="password" [(ngModel)]="password" autocomplete="current-password" placeholder="••••••••"/>
</label>

<button type="submit" [disabled]="loggingIn">{{(loggingIn ? 'views.login.signingIn' : 'views.login.doLogin') | translate}}</button>
</form>
</div>
<div fxFlex="shrink"><!--push footer to the bottom--></div>
<on-footer></on-footer>
</div>
Loading