From 28abc243f19efddc0021678744624a886b022ad1 Mon Sep 17 00:00:00 2001 From: Andy Chan Date: Mon, 11 Nov 2024 14:35:51 -0500 Subject: [PATCH] Replace login icon, show "Sign In" text on mobile over icon (#637) Replaces the "login" icon with "account_circle" on all devices, and hides the icon on mobile/thin screens (width < 766px). Also includes multiple toolbar changes to account for the width. --- .../app/navigation/navigation.component.css | 27 +++++++++++--- .../app/navigation/navigation.component.html | 36 +++++++------------ 2 files changed, 35 insertions(+), 28 deletions(-) diff --git a/frontend/src/app/navigation/navigation.component.css b/frontend/src/app/navigation/navigation.component.css index 15cd9d0c6..0b48b6c3d 100644 --- a/frontend/src/app/navigation/navigation.component.css +++ b/frontend/src/app/navigation/navigation.component.css @@ -94,6 +94,18 @@ display: flex; flex-direction: row; align-items: center; + justify-content: space-between +} + +.toolbar-left { + display: flex; + align-items: center; + min-width: 0; +} + +#toolbar-title { + overflow: hidden; + text-overflow: ellipsis; } /* NOTE: This is temporary until the admin pages are refactored. */ @@ -117,12 +129,9 @@ a { .profile-chip-container { display: flex; - margin-left: auto; - margin-top: auto; - margin-bottom: auto; - margin-right: 16px; align-items: center; } + /* Round the border for the profile image chip */ .mat-mdc-standard-chip { --mdc-chip-container-shape-radius: 16px; @@ -141,7 +150,7 @@ a { height: 22px !important; } -@media only screen and (max-width: 640px) { +@media only screen and (max-width: 768px) { .desktop-profile-chips { display: none; } @@ -164,4 +173,12 @@ a { margin-left: 3px; margin-top: 3px; } + + ::ng-deep .mat-mdc-standard-chip .mdc-evolution-chip__graphic { + display: none !important; + } + + ::ng-deep .mat-mdc-standard-chip .mdc-evolution-chip__text-label:not(:only-child) { + padding-left: 12px; + } } diff --git a/frontend/src/app/navigation/navigation.component.html b/frontend/src/app/navigation/navigation.component.html index 573010150..c5a5b65dc 100644 --- a/frontend/src/app/navigation/navigation.component.html +++ b/frontend/src/app/navigation/navigation.component.html @@ -121,18 +121,18 @@

Other

- - {{ navigationService.title$ | async }} - + + {{ navigationService.title$ | async }} +
-
@if(navigationAdminGearService.adminSettingsData()) { } - + @if(profile$ | async; as profile) { @@ -168,23 +168,13 @@

Other

} } @else { - + - login + account_circle Sign In - - - - } -