From 3c8cf4812096adbb30f4bd3494c9e6274acf3d91 Mon Sep 17 00:00:00 2001 From: alecarn <133774929+alecarn@users.noreply.github.com> Date: Thu, 11 Apr 2024 14:29:38 -0400 Subject: [PATCH] =?UTF-8?q?feat:=20replace=20@mdi/angular-material=20with?= =?UTF-8?q?=20Google=20Font=20-=20Symbol=20BREAKIN=E2=80=A6=20(#1154)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: replace @mdi/angular-material with Google Font - Symbol BREAKING CHANGE * feat: icon add provider to register icon class for symbol --- .../expansion-panel-button.component.html | 7 +++---- src/app/pages/portal/portal.component.html | 19 ++++++++----------- src/app/pages/portal/portal.component.ts | 8 +++++++- .../portal/sidenav/sidenav.component.html | 2 +- .../toast-panel/toast-panel.component.html | 19 ++++++++++--------- .../toast-panel/toast-panel.component.ts | 13 ------------- src/main.ts | 4 ++-- src/styles.scss | 8 ++++++++ 8 files changed, 39 insertions(+), 41 deletions(-) diff --git a/src/app/pages/portal/expansion-panel/expansion-panel-button/expansion-panel-button.component.html b/src/app/pages/portal/expansion-panel/expansion-panel-button/expansion-panel-button.component.html index ba89dbe7f..953d16a3a 100644 --- a/src/app/pages/portal/expansion-panel/expansion-panel-button/expansion-panel-button.component.html +++ b/src/app/pages/portal/expansion-panel/expansion-panel-button/expansion-panel-button.component.html @@ -4,8 +4,7 @@ [matTooltip]="(expanded ? 'workspace.close' : 'workspace.open') | translate" (click)="onToggleClick()" > - + + open_in_new + diff --git a/src/app/pages/portal/portal.component.html b/src/app/pages/portal/portal.component.html index 4fe952c59..2e451787c 100644 --- a/src/app/pages/portal/portal.component.html +++ b/src/app/pages/portal/portal.component.html @@ -238,8 +238,8 @@ [ngClass]="{ disabled: (workspace.inResolutionRange$ | async) !== true }" - [svgIcon]="workspace.layer.visible ? 'eye' : 'eye-off'" > + {{ workspace.layer.visible ? 'visibility' : 'visibility_off' }} - - + @if ((workspaceState.workspaceSelection$ | async).length > 1) { + + } @else { + zoom_in + } - + close diff --git a/src/app/pages/portal/portal.component.ts b/src/app/pages/portal/portal.component.ts index a32ba7e2d..172e50cd7 100644 --- a/src/app/pages/portal/portal.component.ts +++ b/src/app/pages/portal/portal.component.ts @@ -32,7 +32,10 @@ import { EntityRecord, EntityStore, EntityTablePaginatorOptions, + IconSvg, + IgoIconComponent, LongPressDirective, + MAGNIFY_SCAN_ICON, Tool, Toolbox, WORKSPACE_DIRECTIVES, @@ -180,7 +183,8 @@ import { WelcomeWindowService } from './welcome-window/welcome-window.service'; TranslateModule, UserButtonComponent, WORKSPACE_DIRECTIVES, - WorkspaceUpdatorDirective + WorkspaceUpdatorDirective, + IgoIconComponent ] }) export class PortalComponent implements OnInit, OnDestroy { @@ -241,6 +245,8 @@ export class PortalComponent implements OnInit, OnDestroy { public homeZoom: number; isTouchScreen: boolean; + magnifyIcon: IconSvg = MAGNIFY_SCAN_ICON; + @ViewChild('mapBrowser', { read: ElementRef, static: true }) mapBrowser: ElementRef; @ViewChild('searchBar', { read: ElementRef, static: true }) diff --git a/src/app/pages/portal/sidenav/sidenav.component.html b/src/app/pages/portal/sidenav/sidenav.component.html index 945fcbfce..828c292aa 100644 --- a/src/app/pages/portal/sidenav/sidenav.component.html +++ b/src/app/pages/portal/sidenav/sidenav.component.html @@ -26,7 +26,7 @@ [matTooltip]="'igo.context.sidenav.goBack' | translate" (click)="onPreviousButtonClick()" > - + arrow_back diff --git a/src/app/pages/portal/toast-panel/toast-panel.component.html b/src/app/pages/portal/toast-panel/toast-panel.component.html index 11312a10e..9b6c5c314 100644 --- a/src/app/pages/portal/toast-panel/toast-panel.component.html +++ b/src/app/pages/portal/toast-panel/toast-panel.component.html @@ -44,8 +44,8 @@ matBadgeColor="accent" matBadgeSize="small" [matBadgeHidden]="(isSelectedResultOutOfView$ | async) !== true" - svgIcon="magnify-plus-outline" - > + >zoom_in @@ -80,7 +79,7 @@ matTooltipShowDelay="500" (click)="previousResult()" > - + chevron_left
diff --git a/src/app/pages/portal/toast-panel/toast-panel.component.ts b/src/app/pages/portal/toast-panel/toast-panel.component.ts index a3035b2fa..8ad2d7e87 100644 --- a/src/app/pages/portal/toast-panel/toast-panel.component.ts +++ b/src/app/pages/portal/toast-panel/toast-panel.component.ts @@ -341,7 +341,6 @@ export class ToastPanelComponent implements OnInit, OnDestroy { this.opened = this.storageService.get('toastOpened') as boolean; this.zoomAuto = this.storageService.get('zoomAuto') as boolean; this.fullExtent = this.storageService.get('fullExtent') as boolean; - this.setResizeWindowIcon(); } private monitorResultOutOfView() { @@ -956,16 +955,6 @@ export class ToastPanelComponent implements OnInit, OnDestroy { } } - setResizeWindowIcon() { - if (this.fullExtent) { - this.iconResizeWindows = 'arrow-collapse'; - // this.iconResizeWindows = 'vector-arrange-below'; - } else { - this.iconResizeWindows = 'arrow-expand'; - // this.iconResizeWindows = 'crop-square'; - } - } - resizeWindows() { this.storageService.set('fullExtent', !this.fullExtent); @@ -978,11 +967,9 @@ export class ToastPanelComponent implements OnInit, OnDestroy { reduceWindow() { this.fullExtent = false; - this.setResizeWindowIcon(); } enlargeWindows() { this.fullExtent = true; - this.setResizeWindowIcon(); } } diff --git a/src/main.ts b/src/main.ts index c6cb6367b..c1fc3ee13 100644 --- a/src/main.ts +++ b/src/main.ts @@ -18,6 +18,7 @@ import { ServiceWorkerModule } from '@angular/service-worker'; import { provideAuthentification } from '@igo2/auth'; import { withMicrosoftSupport } from '@igo2/auth/microsoft'; +import { provideIcon } from '@igo2/common'; import { IgoCoreModule } from '@igo2/core'; import { ConfigService, provideConfigOptions } from '@igo2/core/config'; import { provideRootTranslation } from '@igo2/core/language'; @@ -30,7 +31,6 @@ import 'hammerjs'; import { AppComponent } from './app/app.component'; import { PortalModule } from './app/pages'; import { environment } from './environments/environment'; -import { provideIcon } from '@igo2/common'; const DEFAULT_THEME: string = 'blue-theme'; @@ -49,7 +49,7 @@ bootstrapApplication(AppComponent, { providers: [ importProvidersFrom( BrowserModule, - IgoCoreModule.forRoot(), + IgoCoreModule, IgoMessageModule, PortalModule, ServiceWorkerModule.register('ngsw-worker.js', { diff --git a/src/styles.scss b/src/styles.scss index 52d427212..c010171c9 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -4,6 +4,14 @@ @use 'style/reset.scss'; @use 'style/theme.scss'; +.material-symbols-outlined { + font-variation-settings: + 'FILL' 1, + 'wght' 400, + 'GRAD' 0, + 'opsz' 24; +} + .shepherd-element[data-popper-reference-hidden]:not(.shepherd-centered) { opacity: 1; visibility: visible;