Skip to content

Commit

Permalink
Remove use of M2 color attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
panaaj committed Jul 25, 2024
1 parent 37aef2e commit 1f82001
Show file tree
Hide file tree
Showing 48 changed files with 109 additions and 273 deletions.
9 changes: 3 additions & 6 deletions src/app-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,13 @@ html {
.icon-region {
color: purple !important;
}
.icon-route {
color: green !important;
}
.icon-waypoint,
.icon-accent {
color: orange !important;
}
.icon-route,
.icon-primary {
color: mat.get-theme-color($light-theme, primary) !important;
}
Expand Down Expand Up @@ -169,11 +171,6 @@ html {
color: mat.get-theme-color($dark-theme, on-tertiary) !important;
}

.icon-route{
color: mat.get-theme-color($dark-theme, tertiary) !important;
}


.bg-primary {
background-color: mat.get-theme-color($dark-theme, primary) !important;
color: mat.get-theme-color($dark-theme, on-primary) !important;
Expand Down
43 changes: 13 additions & 30 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
mat-menu-item
(click)="sidemenu.close(); displayLeftMenu('routeList', true)"
>
<mat-icon class="icon-route" color="primary">directions</mat-icon>
<mat-icon class="icon-route">directions</mat-icon>
&nbsp;Routes
</button>
<button
mat-menu-item
(click)="sidemenu.close(); displayLeftMenu('waypointList', true)"
>
<mat-icon class="icon-waypoint" color="accent">location_on</mat-icon>
<mat-icon class="icon-waypoint">location_on</mat-icon>
&nbsp;Waypoints
</button>
<button
Expand Down Expand Up @@ -46,7 +46,7 @@
mat-menu-item
(click)="openExperiment({ choice: p, value: null })"
>
<mat-icon class="icon-warn" color="warn">show_chart</mat-icon>
<mat-icon class="icon-warn">show_chart</mat-icon>
<span>Tracks</span>
</button>
} @default {
Expand Down Expand Up @@ -116,7 +116,7 @@
</a>
<mat-divider></mat-divider>
<a mat-menu-item (click)="openSettings()">
<mat-icon color="primary">settings</mat-icon>
<mat-icon>settings</mat-icon>
<span>Settings</span>
</a>
</mat-menu>
Expand All @@ -128,11 +128,11 @@
</a>
<mat-divider></mat-divider>
<a mat-menu-item (click)="drawStart('route')">
<mat-icon class="icon-route" color="primary">directions</mat-icon>
<mat-icon class="icon-route">directions</mat-icon>
<span>Draw Route</span>
</a>
<a mat-menu-item (click)="app.data.buildRoute.show = true">
<mat-icon class="icon-route" color="warn">directions</mat-icon>
<mat-icon class="icon-route">directions</mat-icon>
<span>Build Route</span>
</a>
<mat-divider></mat-divider>
Expand All @@ -143,12 +143,12 @@
skres.showWaypointEditor(null, app.data.vessels.active.position)
"
>
<mat-icon class="icon-waypoint" color="accent">add_location</mat-icon>
<mat-icon class="icon-waypoint">add_location</mat-icon>
<span>Add Waypoint at Vessel</span>
</a>
}
<a mat-menu-item (click)="drawStart('waypoint')">
<mat-icon class="icon-waypoint" color="accent">edit_location</mat-icon>
<mat-icon class="icon-waypoint">edit_location</mat-icon>
<span>Drop Waypoint</span>
</a>
<mat-divider></mat-divider>
Expand Down Expand Up @@ -191,7 +191,7 @@
matTooltip="About Freeboard"
matTooltipPosition="right"
>
<mat-icon color="primary">info_outline</mat-icon>
<mat-icon>info_outline</mat-icon>
</a>

<button
Expand All @@ -200,7 +200,7 @@
matTooltip="Open Help."
matTooltipPosition="right"
>
<mat-icon color="primary">help</mat-icon>
<mat-icon>help</mat-icon>
</button>
</div>
</div>
Expand Down Expand Up @@ -252,17 +252,16 @@

<mat-divider></mat-divider>
<a mat-list-item (click)="sidemenu.close(); openSettings()">
<mat-icon color="primary">settings</mat-icon>
<mat-icon>settings</mat-icon>
&nbsp;Settings
</a>
@if(!app.hostParams.token && app.data.loginRequired){
<a mat-list-item (click)="sidemenu.close(); showLogin(null, false)">
<mat-icon
[matBadge]="app.data.loggedInBadgeText"
matBadgeOverlap="true"
matBadgeSize="small"
matBadgeSize="medium"
matBadgePosition="below after"
matBadgeColor="warn"
[matBadgeHidden]="app.data.loggedIn"
>
account_circle
Expand Down Expand Up @@ -296,7 +295,6 @@
[href]="instUrl"
(click)="sideright.toggle()"
target="_blank"
color="primary"
matTooltip="Open Instruments in window."
matTooltipPosition="right"
>
Expand All @@ -309,7 +307,6 @@
[disabled]="
app.config.selections.pluginFavourites.length === 0
"
color="primary"
matTooltip="Previous plugin"
matTooltipPosition="below"
>
Expand All @@ -321,7 +318,6 @@
[disabled]="
app.config.selections.pluginFavourites.length === 0
"
color="primary"
matTooltip="Next plugin"
matTooltipPosition="below"
>
Expand Down Expand Up @@ -371,7 +367,6 @@
<mat-icon
[matBadge]="app.data.loggedInBadgeText"
matBadgeOverlap="true"
matBadgeColor="warn"
[matBadgeHidden]="app.data.loggedIn"
>menu</mat-icon
>
Expand All @@ -384,7 +379,6 @@
<button
class="button-warn"
mat-mini-fab
color="warn"
matTooltip="Alarms"
matTooltipPosition="right"
(click)="sidemenu.close(); openAlarmsDialog()"
Expand Down Expand Up @@ -421,7 +415,6 @@
<div class="buttonPanelItem">
<button
mat-mini-fab
[color]="app.config.map.northUp ? 'accent' : 'primary'"
[ngClass]="{
'button-primary': !app.config.map.northUp,
'button-toolbar': app.config.map.northUp
Expand All @@ -440,7 +433,6 @@
<div class="buttonPanelItem">
<button
mat-mini-fab
[color]="app.config.map.moveMap ? 'primary' : 'accent'"
[ngClass]="{
'button-primary': app.config.map.moveMap,
'button-toolbar': !app.config.map.moveMap
Expand Down Expand Up @@ -490,7 +482,6 @@
<button
class="button-warn"
mat-mini-fab
color="warn"
matTooltip="Exit playback mode"
matTooltipPosition="right"
(click)="showSelectMode()"
Expand Down Expand Up @@ -624,7 +615,6 @@
<button
class="button-toolbar"
mat-mini-fab
color="warn"
matTooltip="Web Audio off! Click to enable."
matTooltipPosition="left"
(click)="enableAudio()"
Expand Down Expand Up @@ -698,7 +688,6 @@
<div class="buttonPanelItem">
<button
mat-mini-fab
[color]="app.config.map.limitZoom ? 'primary' : 'accent'"
[ngClass]="{
'button-primary': app.config.map.limitZoom,
'button-toolbar': !app.config.map.limitZoom
Expand All @@ -716,7 +705,6 @@
<div class="buttonPanelItem">
<button
mat-mini-fab
[color]="app.config.map.invertColor ? 'primary' : 'accent'"
[ngClass]="{
'button-primary': app.config.map.invertColor,
'button-toolbar': !app.config.map.invertColor
Expand All @@ -741,9 +729,6 @@
'button-primary': app.data.vessels.self.autopilot.enabled,
'button-toolbar': !app.data.vessels.self.autopilot.enabled
}"
[color]="
app.data.vessels.self.autopilot.enabled ? 'primary' : 'accent'
"
matTooltip="Autopilot"
matTooltipPosition="left"
(click)="app.data.autopilot.console = true"
Expand All @@ -759,7 +744,6 @@
<button
class="button-accent"
mat-mini-fab
color="accent"
(click)="
skres.showWaypointEditor(null, app.data.vessels.self.position)
"
Expand Down Expand Up @@ -890,7 +874,6 @@
<a
class="icon-warn"
mat-raised-button
color="warn"
(click)="cancelDraw()"
[matTooltip]="draw.modify ? 'Cancel Editing' : 'Cancel Draw'"
matTooltipPosition="left"
Expand All @@ -906,7 +889,7 @@
@if(mode === 1){
<div class="playbackPanel mat-app-background">
<div style="border-radius: 5px">
<mat-icon color="accent">access_time</mat-icon> <b>Playback:</b>
<mat-icon>access_time</mat-icon> <b>Playback:</b>
</div>
<div style="text-align: center">{{ display.playback.time }}</div>
</div>
Expand Down
28 changes: 4 additions & 24 deletions src/app/lib/components/dialogs/common/dialogs.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ import { MAT_SNACK_BAR_DATA } from '@angular/material/snack-bar';
}
</mat-dialog-content>
<mat-dialog-actions align="center">
<button
mat-raised-button
color="accent"
(click)="dialogRef.close(true)"
>
<button mat-raised-button (click)="dialogRef.close(true)">
{{ data.buttonText }}
</button>
</mat-dialog-actions>
Expand Down Expand Up @@ -95,11 +91,7 @@ export class MsgBox implements OnInit {
</div>
</mat-dialog-content>
<mat-dialog-actions align="center">
<button
mat-raised-button
color="accent"
(click)="dialogRef.close(true)"
>
<button mat-raised-button (click)="dialogRef.close(true)">
{{ data.buttonText }}
</button>
</mat-dialog-actions>
Expand Down Expand Up @@ -193,7 +185,6 @@ export class AlertDialog implements OnInit {
<mat-dialog-actions align="center">
<button
mat-raised-button
color="accent"
(click)="dialogRef.close({ ok: true, checked: checked })"
>
{{ data.button1Text }}
Expand Down Expand Up @@ -282,11 +273,7 @@ export class ConfirmDialog implements OnInit {
>
</div>
}
<button
mat-raised-button
color="primary"
(click)="dialogRef.close(false)"
>
<button mat-raised-button (click)="dialogRef.close(false)">
Close
</button>
</mat-dialog-actions>
Expand Down Expand Up @@ -371,7 +358,6 @@ export class AboutDialog {
<button
default
mat-raised-button
color="primary"
[disabled]="username.value.length === 0"
(click)="login(username.value, password.value)"
>
Expand Down Expand Up @@ -488,7 +474,6 @@ export class MessageBarComponent {
<button
mat-icon-button
(click)="currentPage = currentPage - 1"
color="primary"
matStepperPrevious
>
<mat-icon>keyboard_arrow_left</mat-icon>
Expand All @@ -501,7 +486,6 @@ export class MessageBarComponent {
<button
mat-icon-button
(click)="currentPage = currentPage + 1"
color="primary"
matStepperNext
>
<mat-icon>keyboard_arrow_right</mat-icon>
Expand All @@ -526,11 +510,7 @@ export class MessageBarComponent {
}
</div>
<div style="text-align:center;">
<button
mat-raised-button
color="primary"
(click)="dialogRef.close(data.showPrefs)"
>
<button mat-raised-button (click)="dialogRef.close(data.showPrefs)">
{{ data.buttonText }}
</button>
<br />&nbsp;
Expand Down
13 changes: 4 additions & 9 deletions src/app/lib/components/dialogs/geojson/geojson-dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@
><br />
</div>
<div mat-dialog-actions align="center">
<button
mat-raised-button
color="accent"
(click)="app.showHelp('geojson')"
>
<button mat-raised-button (click)="app.showHelp('geojson')">
<mat-icon>help</mat-icon>
Help
</button>
Expand Down Expand Up @@ -54,7 +50,7 @@
<mat-icon>arrow_forward</mat-icon>
</div>
<div class="pnlSKType">
<mat-icon class="icon-waypoint" color="accent">place</mat-icon>
<mat-icon class="icon-waypoint">place</mat-icon>
<b>Waypoints:</b>
&nbsp;({{geoData?.waypoints.length}})
</div>
Expand All @@ -78,7 +74,7 @@
<mat-icon>arrow_forward</mat-icon>
</div>
<div class="pnlSKType">
<mat-icon class="icon-route" color="primary">directions</mat-icon>
<mat-icon class="icon-route">directions</mat-icon>
<b>Routes:</b>
&nbsp;({{geoData?.routes.length}})
</div>
Expand All @@ -103,7 +99,7 @@
<mat-icon>arrow_forward</mat-icon>
</div>
<div class="pnlSKType">
<mat-icon class="icon-track" color="warn">show_chart</mat-icon>
<mat-icon class="icon-track">show_chart</mat-icon>
<b>Tracks:</b>
&nbsp;({{geoData?.tracks.length}})
</div>
Expand Down Expand Up @@ -140,7 +136,6 @@
<div mat-dialog-actions align="center">
<button
mat-raised-button
color="primary"
matTooltip="Load features"
matTooltipPosition="below"
(click)="load()"
Expand Down
Loading

0 comments on commit 1f82001

Please sign in to comment.