Skip to content

Commit

Permalink
Radar scaffold
Browse files Browse the repository at this point in the history
  • Loading branch information
panaaj committed Sep 8, 2024
1 parent f524277 commit 5d3da33
Show file tree
Hide file tree
Showing 7 changed files with 1,184 additions and 1,140 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG: Freeboard

### v2.11.3

- **Fixed**: VMG not being displayed in course data when destination is active.

### v2.11.2

- **Updated**: Proxy mode operation is now the default and configuration option removed. (#159)
Expand All @@ -8,7 +12,7 @@
- **Updated**: When editing a route (on a touch device) `long-press` on a route point to delete it. (#169)
- **Added**: Toggle charts on/of by clicking chart boundaries on map.
- **Added**: Lock in `Follow Vessel` setting to remain in this mode when map is panned. (#185)
- **Fixed**: Not rendering laylines when preferred path is `environment.wind.directionMagnetic`.
- **Fixed**: Not rendering laylines when preferred path is `environment.wind.directionMagnetic`. (#184)
- **Fixed**: Cursor position display formatting issue when using `028°15.345'S` format. (#188)

### v2.11.1
Expand Down
9 changes: 8 additions & 1 deletion src/app/app.settings.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Position } from './types';
import { cleanConfig as cleanRadarConfig, IRadarConfig } from './modules/radar/settings';

// validate supplied settings against base config
export function validateConfig(settings: IAppConfig): boolean {
Expand Down Expand Up @@ -260,6 +261,10 @@ export function cleanConfig(
console.warn('Invalid zoom level supplied!');
}
}

if (this.config.radar) {
cleanRadarConfig(this.config.radar);
}
}

// ** Default Configuration**
Expand Down Expand Up @@ -387,7 +392,8 @@ export const DefaultConfig: IAppConfig = {
url: null
},
paths: []
}
},
radar: {}
};

export interface IAppConfig {
Expand Down Expand Up @@ -516,4 +522,5 @@ export interface IAppConfig {
};
paths: string[];
};
radar: IRadarConfig;
}
12 changes: 5 additions & 7 deletions src/app/lib/components/dialogs/common/dialogs.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,14 +265,12 @@ export class ConfirmDialog implements OnInit {
</div>
</div>
</mat-dialog-content>
<mat-dialog-actions align="right">
<mat-dialog-actions align="center">
@if(data.url) {
<div class="item stretch">
<a mat-button [href]="data.url" target="_web" rel="noopener"
>Visit Website</a
>
</div>
}
<a mat-button [href]="data.url" target="_web" rel="noopener"
>Visit Website</a
>
&nbsp; }
<button mat-raised-button (click)="dialogRef.close(false)">
Close
</button>
Expand Down
14 changes: 14 additions & 0 deletions src/app/modules/radar/settings/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

// ** Default Configuration**
export const DefaultRadarConfig: IRadarConfig = {};

export interface IRadarConfig {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
[key: string]: any
}

// clean loaded radar config
export function cleanConfig(settings: IRadarConfig) {
// parse and clean persisted radar configuration
}

Loading

0 comments on commit 5d3da33

Please sign in to comment.