Skip to content

Commit 1c4d990

Browse files
committed
chore: lint typescript code
1 parent 572f290 commit 1c4d990

File tree

7 files changed

+72
-63
lines changed

7 files changed

+72
-63
lines changed

samples/gauge/Components/Dropdown.css

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
/* Dropdown container */
22
.dropdown {
3-
position: relative;
4-
display: inline-block;
5-
width: 300px;
6-
text-align: center;
3+
position: relative;
4+
display: inline-block;
5+
width: 300px;
6+
text-align: center;
77
}
88

99
/* Dropdown button */
1010
.dropdown-toggle {
11-
background: white;
12-
color: black;
13-
padding: 10px;
14-
width: 100%;
11+
background: white;
12+
color: black;
13+
padding: 10px;
14+
width: 100%;
1515
}
1616

1717
/* Dropdown menu */
1818
.dropdown-menu {
19-
display: none;
20-
position: absolute;
21-
background: white;
22-
color: black;
23-
list-style: none;
24-
padding: 0;
25-
margin: 0;
26-
width: 100%;
19+
display: none;
20+
position: absolute;
21+
background: white;
22+
color: black;
23+
list-style: none;
24+
padding: 0;
25+
margin: 0;
26+
width: 100%;
2727
}
2828

2929
.dropdown-menu li {
30-
padding: 10px;
31-
width: 100%;
32-
}
30+
padding: 10px;
31+
width: 100%;
32+
}

samples/gauge/Components/Dropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ export class Dropdown extends DisplayComponent<ComponentProps> {
6161
public getNavdataFormat(): string | null {
6262
return this.navdataFormat
6363
}
64-
}
64+
}
Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
.auth-container {
2-
font-size: x-large;
3-
width: 100%;
4-
height: 100%;
5-
position: relative;
6-
top: 100px;
7-
}
8-
9-
.button {
10-
width: 150px;
11-
height: 50px;
12-
font-size: x-large;
13-
margin-top: 5px;
14-
background: white;
15-
color: black;
16-
display: flex;
17-
justify-content: center;
18-
align-items: center;
19-
}
20-
21-
.qr-code {
22-
width: 300px;
23-
height: 300px;
24-
display: none;
25-
}
26-
27-
.horizontal {
28-
display: flex;
29-
flex-direction: row;
30-
justify-content: center;
31-
align-items: center;
32-
}
33-
34-
.vertical {
35-
display: flex;
36-
flex-direction: column;
37-
justify-content: center;
38-
align-items: center;
39-
}
2+
font-size: x-large;
3+
width: 100%;
4+
height: 100%;
5+
position: relative;
6+
top: 100px;
7+
}
8+
9+
.button {
10+
width: 150px;
11+
height: 50px;
12+
font-size: x-large;
13+
margin-top: 5px;
14+
background: white;
15+
color: black;
16+
display: flex;
17+
justify-content: center;
18+
align-items: center;
19+
}
20+
21+
.qr-code {
22+
width: 300px;
23+
height: 300px;
24+
display: none;
25+
}
26+
27+
.horizontal {
28+
display: flex;
29+
flex-direction: row;
30+
justify-content: center;
31+
align-items: center;
32+
}
33+
34+
.vertical {
35+
display: flex;
36+
flex-direction: column;
37+
justify-content: center;
38+
align-items: center;
39+
}

samples/gauge/Components/NavigraphLogin.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ export class NavigraphLogin extends DisplayComponent<NavigraphLoginProps> {
3939
const percent = Math.round((args.unzipped / args.total) * 100)
4040
this.navdataTextRef.instance.textContent = `Unzipping files... ${percent}% complete`
4141
})
42+
43+
this.commBusListener.on("NAVIGRAPH_DownloadFailed", (jsonArgs: string) => {
44+
const args = JSON.parse(jsonArgs)
45+
console.error("WASM download failed", args)
46+
this.navdataTextRef.instance.textContent = `Download failed: ${args.error}`
47+
// set style to red
48+
this.navdataTextRef.instance.style.color = "red"
49+
})
4250
}
4351

4452
public render(): VNode {
@@ -132,4 +140,4 @@ export class NavigraphLogin extends DisplayComponent<NavigraphLoginProps> {
132140
})
133141
.catch(e => console.error(e))
134142
}
135-
}
143+
}

samples/gauge/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
This is a simple JavaScript gauge to interface with the WASM module.
44

55
## Building
6-
To build to your `Packages` folder and listen to changes (i.e. when you're debugging or quickly prototyping) you can run `npm run dev`. Otherwise, run `npm run build`
6+
7+
To build to your `Packages` folder and listen to changes (i.e. when you're debugging or quickly prototyping) you can run `npm run dev`. Otherwise, run `npm run build`

samples/gauge/lib/navigraph.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { DataStore } from "@microsoft/msfs-sdk"
22
import { initializeApp, NavigraphApp, Scope } from "@navigraph/app"
33
import { getAuth } from "@navigraph/auth"
4-
import { getPackagesAPI } from "@navigraph/packages"
54
import { getChartsAPI } from "@navigraph/charts"
5+
import { getPackagesAPI } from "@navigraph/packages"
66

77
const config: NavigraphApp = {
88
clientId: "YOUR_CLIENT_ID",
@@ -34,4 +34,4 @@ export const auth = getAuth({
3434

3535
export const charts = getChartsAPI()
3636

37-
export const packages = getPackagesAPI()
37+
export const packages = getPackagesAPI()

samples/gauge/rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import copy from "rollup-plugin-copy"
33
import esbuild from "rollup-plugin-esbuild"
44
import css from "rollup-plugin-import-css"
55

6-
const DEBUG = process.env.DEBUG === 'true';
6+
const DEBUG = process.env.DEBUG === "true"
77

88
let outputDest = "../aircraft/PackageSources"
99
if (DEBUG) {

0 commit comments

Comments
 (0)