Implemented suggestions from code analysis

This commit is contained in:
2023-07-16 22:04:34 +02:00
parent c60625d4b3
commit d7f2018e1f
5 changed files with 6 additions and 6 deletions
@@ -1,3 +1,4 @@
<app-navigation>
<app-messages></app-messages>
<router-outlet></router-outlet>
</app-navigation>
+1 -1
View File
@@ -36,7 +36,7 @@ function initializeKeycloak(keycloak: KeycloakService) {
flow: "standard"
},
shouldAddToken: (request) => {
const { method, url } = request;
const { url } = request;
return url.startsWith(environment.backendURL);
},
loadUserProfileAtStartUp: true
+1 -1
View File
@@ -24,7 +24,7 @@ export class AppAuthGuard extends KeycloakAuthGuard {
// Get the roles required from the route.
const requiredRoles = route.data['roles'];
let granted = false;
let granted: boolean;
// Allow the user to to proceed if no additional roles are required to access the route.
if (!(requiredRoles instanceof Array) || requiredRoles.length === 0) {
@@ -49,6 +49,6 @@ export class ElectionService {
/** Log a HeroService message with the MessageService */
private log(message: string) {
this.messageService.add(`HeroService: ${message}`);
this.messageService.add(`ElectionService: ${message}`);
}
}
@@ -8,17 +8,16 @@ body {
}
body, input[text], button {
color: crimson;
font-family: Cambria, Georgia;
font-family: Cambria, Georgia, sans-serif;
}
button.clear {
font-family: Arial;
font-family: Arial, sans-serif;
background-color: #eee;
border: none;
padding: 5px 10px;
border-radius: 4px;
cursor: pointer;
cursor: hand;
}
button:hover {
background-color: #cfd8dc;