-
-
Notifications
You must be signed in to change notification settings - Fork 341
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
On mobile view ports, remove the dropdown button and scroll to top. D…
…ropdown button links are now visible in a modal to make clicking much easier.
- Loading branch information
1 parent
2c7979f
commit 81c7ba4
Showing
6 changed files
with
131 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
UI/Web/src/app/nav/_components/nav-link-modal/nav-link-modal.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
|
||
<ng-container *transloco="let t; read:'nav-header'"> | ||
<div class="modal-header"> | ||
<h4 class="modal-title" id="modal-basic-title">{{t('nav-link-header')}}</h4> | ||
<button type="button" class="btn-close" [attr.aria-label]="t('close')" (click)="close()"></button> | ||
</div> | ||
<div class="modal-body"> | ||
<div class="mb-3"> | ||
<a routerLink="/settings" [fragment]="SettingsTabId.Preferences" [title]="t('settings')">{{t('settings')}}</a> | ||
</div> | ||
<div class="mb-3"> | ||
<a routerLink="/all-filters/">{{t('all-filters')}}</a> | ||
</div> | ||
<div class="mb-3"> | ||
<a routerLink="/announcements/">{{t('announcements')}}</a> | ||
</div> | ||
<div class="mb-3"> | ||
<a [href]="WikiLink.Guides" rel="noopener noreferrer" target="_blank">{{t('help')}}</a> | ||
</div> | ||
<div class="mb-3"> | ||
<a href="javascript:void(0);" (click)="logout()">{{t('logout')}}</a> | ||
</div> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-primary" (click)="close()">{{t('close')}}</button> | ||
</div> | ||
|
||
</ng-container> |
Empty file.
42 changes: 42 additions & 0 deletions
42
UI/Web/src/app/nav/_components/nav-link-modal/nav-link-modal.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import {Component, inject, Input} from '@angular/core'; | ||
import {WikiLink} from "../../../_models/wiki"; | ||
import {NgbActiveModal, NgbDropdownItem} from "@ng-bootstrap/ng-bootstrap"; | ||
import {RouterLink} from "@angular/router"; | ||
import {FilterPipe} from "../../../_pipes/filter.pipe"; | ||
import {ReactiveFormsModule} from "@angular/forms"; | ||
import {Select2Module} from "ng-select2-component"; | ||
import {TranslocoDirective} from "@jsverse/transloco"; | ||
import {SettingsTabId} from "../../../sidenav/preference-nav/preference-nav.component"; | ||
|
||
@Component({ | ||
selector: 'app-nav-link-modal', | ||
standalone: true, | ||
imports: [ | ||
NgbDropdownItem, | ||
RouterLink, | ||
FilterPipe, | ||
ReactiveFormsModule, | ||
Select2Module, | ||
TranslocoDirective | ||
], | ||
templateUrl: './nav-link-modal.component.html', | ||
styleUrl: './nav-link-modal.component.scss' | ||
}) | ||
export class NavLinkModalComponent { | ||
|
||
@Input({required: true}) logoutFn!: () => void; | ||
|
||
private readonly modal = inject(NgbActiveModal); | ||
|
||
protected readonly WikiLink = WikiLink; | ||
|
||
close() { | ||
this.modal.close(); | ||
} | ||
|
||
logout() { | ||
this.logoutFn(); | ||
} | ||
|
||
protected readonly SettingsTabId = SettingsTabId; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters