+
- {{ body.BodyName.replace(body.StarSystem, '') }}
+ {{ body.simpleName() }}
+
+
+
+ )
+
+ )
+
+
+
{{ body.PlanetClass || body.StarType || '' }}
- {{ Intl.NumberFormat().format(Math.round(body.DistanceFromArrivalLS)) }}
+ {{ body.distance() }}
-
+
+
+
+
+
diff --git a/src/index.css b/src/index.css
index 8c2bb88..de5bb08 100644
--- a/src/index.css
+++ b/src/index.css
@@ -14,6 +14,10 @@ body {
text-transform: uppercase;
}
+.opacity-0 {
+ opacity: 0;
+}
+
.system {
margin-top: 1px;
margin-bottom: 1px;
diff --git a/src/interfaces/Body.js b/src/interfaces/Body.js
index b7ceb53..49f6f8e 100644
--- a/src/interfaces/Body.js
+++ b/src/interfaces/Body.js
@@ -5,7 +5,19 @@ export class Body {
return this.BodyName.includes('Belt')
}
+ isPlanet() {
+ return !!this.PlanetClass
+ }
+
+ isStar() {
+ return !!this.StarType
+ }
+
simpleName() {
return this.BodyName.replace(this.StarSystem, '')
}
+
+ distance() {
+ return Intl.NumberFormat().format(Math.round(this.DistanceFromArrivalLS))
+ }
}
\ No newline at end of file
diff --git a/src/renderer.js b/src/renderer.js
index 31c5f36..713d6fb 100644
--- a/src/renderer.js
+++ b/src/renderer.js
@@ -54,15 +54,15 @@ createApp({
journal.watchJournal()
const currentLocation = ref('Unknown')
- const currentSystemBodies = ref([])
+ const currentLocationBodies = ref([])
journal.on('FSDJump', () => currentLocation.value = journal.currentLocation)
- journal.on('SCANNED_BODIES_FOUND', () => currentSystemBodies.value = journal.currentLocation.bodies)
+ journal.on('SCANNED_BODIES_FOUND', () => currentLocationBodies.value = journal.currentLocation.bodies)
return {
currentLocation,
- currentSystemBodies,
+ currentLocationBodies,
}
}
}).mount('#app')