Fix: Changed hint text when the sidebar menu is open or closed.
This commit is contained in:
parent
6e27b9e8cb
commit
e833d4a5dd
4 changed files with 12 additions and 5 deletions
|
|
@ -1,6 +1,10 @@
|
||||||
<section (click)="toggleSidebar()">
|
<section (click)="toggleSidebar()">
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<img src="./assets/img/sidebar/toggle.svg" alt="" />
|
<img src="./assets/img/sidebar/toggle.svg" alt="" />
|
||||||
<p>{{ 'sidebar-toggle.openWorkspace' | translate }}</p>
|
@if (isSidebarOpen) {
|
||||||
|
<p>{{ "sidebar-toggle.openWorkspace" | translate }}</p>
|
||||||
|
} @else {
|
||||||
|
<p>{{ "sidebar-toggle.closeWorkspace" | translate }}</p>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
||||||
|
|
@ -12,28 +12,29 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||||
})
|
})
|
||||||
export class SidebarToggleComponent {
|
export class SidebarToggleComponent {
|
||||||
@Input() viewWidth: number = 0;
|
@Input() viewWidth: number = 0;
|
||||||
|
isSidebarOpen: boolean = false;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private chatService: ChatService,
|
private chatService: ChatService,
|
||||||
private toggleBoolean: ToggleBooleanService
|
private toggleBoolean: ToggleBooleanService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Toggles the sidebar visibility and checks the view width.
|
* Toggles the sidebar visibility and checks the view width.
|
||||||
*/
|
*/
|
||||||
toggleSidebar() {
|
toggleSidebar() {
|
||||||
|
this.isSidebarOpen = !this.isSidebarOpen;
|
||||||
this.toggleBoolean.isSidebarOpen = !this.toggleBoolean.isSidebarOpen;
|
this.toggleBoolean.isSidebarOpen = !this.toggleBoolean.isSidebarOpen;
|
||||||
this.checkViewWidth();
|
this.checkViewWidth();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks the view width and adjusts sidebar and chat states accordingly.
|
* Checks the view width and adjusts sidebar and chat states accordingly.
|
||||||
*/
|
*/
|
||||||
checkViewWidth() {
|
checkViewWidth() {
|
||||||
if (this.viewWidth <= 1900 && this.chatService.isSecondaryChatOpen) {
|
if (this.viewWidth <= 1900 && this.chatService.isSecondaryChatOpen) {
|
||||||
this.toggleBoolean.isSidebarOpen = true;
|
this.toggleBoolean.isSidebarOpen = true;
|
||||||
|
this.isSidebarOpen = true;
|
||||||
}
|
}
|
||||||
if (this.viewWidth <= 1900) {
|
if (this.viewWidth <= 1900) {
|
||||||
this.chatService.isSecondaryChatId = '';
|
this.chatService.isSecondaryChatId = '';
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,8 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
"sidebar-toggle": {
|
"sidebar-toggle": {
|
||||||
"openWorkspace": "Menü öffnen"
|
"openWorkspace": "Menü öffnen",
|
||||||
|
"closeWorkspace": "Menü schließen"
|
||||||
},
|
},
|
||||||
|
|
||||||
"edit-user-details": {
|
"edit-user-details": {
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,8 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
"sidebar-toggle": {
|
"sidebar-toggle": {
|
||||||
"openWorkspace": "Open Menu"
|
"openWorkspace": "Open Menu",
|
||||||
|
"closeWorkspace": "Close Menu"
|
||||||
},
|
},
|
||||||
|
|
||||||
"edit-user-details": {
|
"edit-user-details": {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue