weedkeeper changes 2
This commit is contained in:
parent
1edbc354bb
commit
785e1e464f
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<div class="w-full">
|
<div class="w-full">
|
||||||
<div class="mb-10 font-bold text-center">
|
<div class="mb-10 font-bold text-center">
|
||||||
<svg-icon src="assets/weed.svg" svgClass="w-24 h-24 md:w-32 md:h-32 mx-auto text-skin-accent mb-5" />
|
<svg-icon src="assets/template.svg" svgClass="w-24 h-24 md:w-32 md:h-32 mx-auto text-skin-accent mb-5" />
|
||||||
<h1 class="text-skin-primary text-5xl sweetleaf mb-5"> {{ "title" | translate }} </h1>
|
<h1 class="text-skin-primary text-5xl sweetleaf mb-5"> {{ "title" | translate }} </h1>
|
||||||
<h2 class="text-skin-accent text-xl"> {{ label | translate }} </h2>
|
<h2 class="text-skin-accent text-xl"> {{ label | translate }} </h2>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -34,7 +34,7 @@ export class AuthComponent implements OnInit {
|
|||||||
|
|
||||||
this.authService.readUserState().subscribe(response => {
|
this.authService.readUserState().subscribe(response => {
|
||||||
this.authService.currentState$.next(response);
|
this.authService.currentState$.next(response);
|
||||||
this.router.navigateByUrl("/dashboard");
|
this.router.navigateByUrl("/");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ export class LoginComponent {
|
|||||||
identifier: this.loginForm.value.identifier!,
|
identifier: this.loginForm.value.identifier!,
|
||||||
password: this.loginForm.value.password!,
|
password: this.loginForm.value.password!,
|
||||||
}).subscribe(response => {
|
}).subscribe(response => {
|
||||||
this.router.navigateByUrl("/dashboard");
|
this.router.navigateByUrl("/");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,27 +23,7 @@ export class LanguagePickerComponent implements OnInit {
|
|||||||
{
|
{
|
||||||
label: "en",
|
label: "en",
|
||||||
imageSrc: "assets/en.svg"
|
imageSrc: "assets/en.svg"
|
||||||
},
|
}
|
||||||
{
|
|
||||||
label: "tr",
|
|
||||||
imageSrc: "assets/tr.svg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "es",
|
|
||||||
imageSrc: "assets/es.svg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "fr",
|
|
||||||
imageSrc: "assets/fr.svg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "it",
|
|
||||||
imageSrc: "assets/it.svg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "jp",
|
|
||||||
imageSrc: "assets/jp.svg"
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
selectedLanguage: Language;
|
selectedLanguage: Language;
|
||||||
|
|
||||||
|
|||||||
@ -27,34 +27,10 @@ interface UserMenuButton {
|
|||||||
export class NavigationComponent implements OnInit {
|
export class NavigationComponent implements OnInit {
|
||||||
navigationLinks: NavigationLink[] = [
|
navigationLinks: NavigationLink[] = [
|
||||||
{
|
{
|
||||||
routerLink: "/dashboard",
|
routerLink: "/",
|
||||||
imageSrc: "assets/template.svg",
|
imageSrc: "assets/template.svg",
|
||||||
label: "navigation.home",
|
label: "navigation.home",
|
||||||
},
|
}
|
||||||
{
|
|
||||||
routerLink: "/location",
|
|
||||||
imageSrc: "assets/lightbulb.svg",
|
|
||||||
label: "navigation.locations",
|
|
||||||
isVisible: () => this.state?.roleIdentifier === 'admin'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
routerLink: "/plant",
|
|
||||||
imageSrc: "assets/template.svg",
|
|
||||||
label: "navigation.plants",
|
|
||||||
isVisible: () => this.state?.roleIdentifier === 'admin'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
routerLink: "/device",
|
|
||||||
imageSrc: "assets/plug.svg",
|
|
||||||
label: "navigation.devices",
|
|
||||||
isVisible: () => this.state?.roleIdentifier === 'admin'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
routerLink: "/admin",
|
|
||||||
imageSrc: "assets/admin.svg",
|
|
||||||
label: "navigation.admin",
|
|
||||||
isVisible: () => this.state?.roleIdentifier === 'admin'
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
usermenuButtons: UserMenuButton[] = [
|
usermenuButtons: UserMenuButton[] = [
|
||||||
@ -101,7 +77,7 @@ export class NavigationComponent implements OnInit {
|
|||||||
.logout()
|
.logout()
|
||||||
.subscribe( response => {
|
.subscribe( response => {
|
||||||
this.state = undefined;
|
this.state = undefined;
|
||||||
this.router.navigateByUrl('/dashboard')
|
this.router.navigateByUrl('/')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user