Change register button location

This commit is contained in:
rubikscraft 2022-09-02 10:43:23 +02:00
parent b23e5c6660
commit 2519afae6a
No known key found for this signature in database
GPG key ID: 1463EBE9200A5CD4
7 changed files with 13 additions and 10 deletions

View file

@ -1,5 +1,4 @@
{ {
"vsicons.presets.angular": true, "vsicons.presets.angular": true,
"skipRefreshExplorerOnWindowFocus": true,
"angular.log": "verbose" "angular.log": "verbose"
} }

View file

@ -17,7 +17,7 @@ import { RolesService } from './role-db.service';
exports: [RolesService], exports: [RolesService],
}) })
export class RolesModule implements OnModuleInit { export class RolesModule implements OnModuleInit {
private readonly logger = new Logger('RolesModule'); private readonly logger = new Logger(RolesModule.name);
constructor( constructor(
private readonly rolesService: RolesService, private readonly rolesService: RolesService,
@ -28,7 +28,7 @@ export class RolesModule implements OnModuleInit {
// Nuking roles in dev environment makes testing easier // Nuking roles in dev environment makes testing easier
// This ensures that the roles are always started with their default permissions // This ensures that the roles are always started with their default permissions
if (!this.hostConfig.isProduction()) { if (!this.hostConfig.isProduction()) {
await this.nukeRoles(); //await this.nukeRoles();
} }
await this.ensureSystemRolesExist(); await this.ensureSystemRolesExist();

View file

@ -66,6 +66,10 @@ export class HeaderComponent implements OnInit {
this.router.navigate(['/user/login']); this.router.navigate(['/user/login']);
} }
doRegister() {
this.router.navigate(['/user/register']);
}
async doLogout() { async doLogout() {
const user = await this.userService.logout(); const user = await this.userService.logout();
if (HasFailed(user)) { if (HasFailed(user)) {

View file

@ -7,7 +7,7 @@
</ngx-dropzone> </ngx-dropzone>
<div class="centered" *ngIf="!canUpload"> <div class="centered" *ngIf="!canUpload">
<h1><a routerLink="/user/login">Please Log In</a></h1> <h1><a routerLink="/user/login">Please log in</a></h1>
<p>You do not yet have permission to upload</p> <p>You do not yet have permission to upload</p>
</div> </div>
</div> </div>

View file

@ -45,7 +45,7 @@
</button> </button>
<button <button
*ngIf="showRegister" *ngIf="showRegister"
mat-raised-button mat-flat-button
color="primary" color="primary"
class="mx-2" class="mx-2"
(click)="onRegister()" (click)="onRegister()"

View file

@ -56,12 +56,9 @@
</div> </div>
<div class="col-12 py-2"> <div class="col-12 py-2">
<button mat-raised-button color="accent" class="mx-2" type="submit">
REGISTER
</button>
<button <button
*ngIf="showLogin" *ngIf="showLogin"
mat-raised-button mat-flat-button
color="primary" color="primary"
class="mx-2" class="mx-2"
(click)="onLogin()" (click)="onLogin()"
@ -69,6 +66,9 @@
> >
LOGIN LOGIN
</button> </button>
<button mat-flat-button color="accent" class="mx-2" type="submit">
REGISTER
</button>
</div> </div>
</form> </form>
</div> </div>

View file

@ -13,7 +13,7 @@
"include": [ "include": [
"src/**/*.d.ts", "src/**/*.d.ts",
"src/app/**/*.ts", "src/app/**/*.ts",
"src/app/util/qoi/qoi-encode.ts.disabled" "src/app/**/*.html",
], ],
"exclude": ["src/**/*.worker.ts", "src/**/*.exclude.ts"] "exclude": ["src/**/*.worker.ts", "src/**/*.exclude.ts"]
} }