Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Radar feature scaffold #190

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading