From 373e34f0f979c78eeb90b7c40063fd77e95dcb98 Mon Sep 17 00:00:00 2001
From: ChevCellios <171721150+ChevCellios@users.noreply.github.com>
Date: Sun, 16 Aug 2026 05:35:32 +0200
Subject: [PATCH 1/5] Complete ISS localization and mobile consent
---
Petabit.Tests/ApplicationTests.cs | 34 ++++++++++++++++++++++
Petabit/Resources/Views.Home.Index.de.resx | 10 +++++++
Petabit/Resources/Views.Home.Index.en.resx | 10 +++++++
Petabit/Resources/Views.Home.Index.hr.resx | 10 +++++++
Petabit/Views/Home/Index.cshtml | 30 ++++++++++++++-----
Petabit/Views/Shared/_Layout.cshtml.css | 2 ++
6 files changed, 88 insertions(+), 8 deletions(-)
diff --git a/Petabit.Tests/ApplicationTests.cs b/Petabit.Tests/ApplicationTests.cs
index 01adca6..17565c5 100644
--- a/Petabit.Tests/ApplicationTests.cs
+++ b/Petabit.Tests/ApplicationTests.cs
@@ -253,6 +253,40 @@ public async Task HomePageLocalizesLedDisplay(
Assert.Contains($"data-unavailable=\"{unavailableText}\"", body);
}
+ [Theory]
+ [InlineData("en", "Earth hologram", "United States", "Crew spacecraft")]
+ [InlineData("hr", "Hologram Zemlje", "SAD", "Posadna letjelica")]
+ [InlineData("de", "Erde-Hologramm", "USA", "Bemannte Raumfähre")]
+ public async Task HomePageLocalizesHologramAndStationDetails(
+ string culture,
+ string hologramTitle,
+ string countryText,
+ string purposeText)
+ {
+ using var request = new HttpRequestMessage(HttpMethod.Get, "/");
+ request.Headers.AcceptLanguage.ParseAdd(culture);
+
+ var response = await _client.SendAsync(request);
+ var body = await response.Content.ReadAsStringAsync();
+
+ Assert.Equal(HttpStatusCode.OK, response.StatusCode);
+ Assert.Contains($">{hologramTitle}", body);
+ Assert.Contains($"data-country-usa=\"{countryText}\"", body);
+ Assert.Contains($"data-purpose-crewed=\"{purposeText}\"", body);
+ }
+
+ [Fact]
+ public async Task MobileAnalyticsConsentStylesProvideBottomSheetBehavior()
+ {
+ var styles = await _client.GetStringAsync("/Petabit.styles.css");
+
+ Assert.Contains("max-height: min(45vh, 18rem)", styles);
+ Assert.Contains("overscroll-behavior: contain", styles);
+ Assert.Contains("touch-action: pan-y", styles);
+ Assert.Contains("min-height: 44px", styles);
+ Assert.Contains("safe-area-inset-bottom", styles);
+ }
+
[Fact]
public async Task IssDataReturnsJsonWhenUpstreamSucceeds()
{
diff --git a/Petabit/Resources/Views.Home.Index.de.resx b/Petabit/Resources/Views.Home.Index.de.resx
index 53d9f01..0a578ea 100644
--- a/Petabit/Resources/Views.Home.Index.de.resx
+++ b/Petabit/Resources/Views.Home.Index.de.resx
@@ -139,4 +139,14 @@
Referenzstand
Quelle
ISS-SIGNAL NICHT VERFÜGBAR
+ ORBITALANSICHT
+ Erde-Hologramm
+ Warten auf Ping ISS
+ Holografische Ansicht der Erde und der ISS-Position
+ Die aktuelle Markierung verwendet die nach dem Ping empfangenen Daten. Die Linie zeigt die projizierte ISS-Umlaufbahn.
+ USA
+ Frankreich
+ Russland
+ Bemannte Raumfähre
+ Frachter
diff --git a/Petabit/Resources/Views.Home.Index.en.resx b/Petabit/Resources/Views.Home.Index.en.resx
index 64108c9..186699f 100644
--- a/Petabit/Resources/Views.Home.Index.en.resx
+++ b/Petabit/Resources/Views.Home.Index.en.resx
@@ -139,4 +139,14 @@
Reference status
Source
ISS SIGNAL UNAVAILABLE
+ ORBITAL VIEW
+ Earth hologram
+ Waiting for Ping ISS
+ Holographic view of Earth and the ISS position
+ The current marker uses data received after the ping. The line shows the projected ISS orbit.
+ United States
+ France
+ Russia
+ Crew spacecraft
+ Cargo spacecraft
diff --git a/Petabit/Resources/Views.Home.Index.hr.resx b/Petabit/Resources/Views.Home.Index.hr.resx
index 22f0615..2a5a5fe 100644
--- a/Petabit/Resources/Views.Home.Index.hr.resx
+++ b/Petabit/Resources/Views.Home.Index.hr.resx
@@ -139,4 +139,14 @@
Referentno stanje
Izvor
ISS SIGNAL NIJE DOSTUPAN
+ ORBITALNI PRIKAZ
+ Hologram Zemlje
+ ÄŒeka Ping ISS
+ Hologramski prikaz Zemlje i položaja ISS-a
+ Trenutna oznaka koristi podatke primljene nakon pinga. Linija prikazuje projekciju ISS orbite.
+ SAD
+ Francuska
+ Rusija
+ Posadna letjelica
+ Teretna letjelica
diff --git a/Petabit/Views/Home/Index.cshtml b/Petabit/Views/Home/Index.cshtml
index c30fe45..7ba5ab4 100644
--- a/Petabit/Views/Home/Index.cshtml
+++ b/Petabit/Views/Home/Index.cshtml
@@ -29,7 +29,12 @@
data-docked="@Localizer["LedDocked"]"
data-reference="@Localizer["LedReference"]"
data-source="@Localizer["LedSource"]"
- data-unavailable="@Localizer["LedUnavailable"]">
+ data-unavailable="@Localizer["LedUnavailable"]"
+ data-country-usa="@Localizer["CountryUsa"]"
+ data-country-france="@Localizer["CountryFrance"]"
+ data-country-russia="@Localizer["CountryRussia"]"
+ data-purpose-crewed="@Localizer["PurposeCrewed"]"
+ data-purpose-cargo="@Localizer["PurposeCargo"]">
@@ -56,16 +61,16 @@
-
ORBITAL VIEW
-
Hologram Zemlje
+
@Localizer["HologramKicker"]
+
@Localizer["HologramTitle"]
-
ÄŒeka Ping ISS
+
@Localizer["HologramWaiting"]
- Trenutna oznaka koristi podatke primljene nakon pinga. Linija prikazuje projekciju ISS orbite.
+ @Localizer["HologramNote"]
@@ -97,6 +102,15 @@
}
ledDisplay.hidden = false;
}
+ const localizedCountry = country => ({
+ 'SAD': ledStrings.countryUsa,
+ 'Francuska': ledStrings.countryFrance,
+ 'Rusija': ledStrings.countryRussia
+ })[country] ?? country;
+ const localizedPurpose = purpose => ({
+ 'Posadna letjelica': ledStrings.purposeCrewed,
+ 'Teretna letjelica': ledStrings.purposeCargo
+ })[purpose] ?? purpose;
const continentOutlines = [
[[72,-168],[70,-140],[60,-128],[55,-122],[49,-125],[43,-124],[34,-117],[23,-110],[17,-96],[25,-82],[30,-81],[43,-70],[51,-58],[59,-64],[66,-80],[73,-105],[72,-135],[72,-168]],
[[12,-81],[8,-77],[-5,-81],[-18,-70],[-35,-72],[-55,-68],[-52,-55],[-34,-52],[-20,-40],[-5,-35],[7,-51],[12,-66],[12,-81]],
@@ -293,10 +307,10 @@
globeStatus.classList.add('is-live');
globeHologram.classList.add('is-tracking');
const ledCrew = data.astronauts
- .map(person => `${person.name} — ${person.country} (${person.agency})`)
+ .map(person => `${person.name} — ${localizedCountry(person.country)} (${person.agency})`)
.join(' | ');
const ledVehicles = data.dockedVehicles
- .map(vehicle => `${vehicle.name} — ${vehicle.purpose} (${vehicle.operator})`)
+ .map(vehicle => `${vehicle.name} — ${localizedPurpose(vehicle.purpose)} (${vehicle.operator})`)
.join(' | ');
const referenceDate = new Date(data.stationStatusUpdatedAt).toLocaleDateString(ledStrings.locale);
ledMessage.textContent = [
diff --git a/Petabit/Views/Shared/_Layout.cshtml.css b/Petabit/Views/Shared/_Layout.cshtml.css
index 3609354..402d202 100644
--- a/Petabit/Views/Shared/_Layout.cshtml.css
+++ b/Petabit/Views/Shared/_Layout.cshtml.css
@@ -90,6 +90,8 @@ button.accept-policy {
padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
border-radius: 0.85rem 0.85rem 0 0 !important;
overflow-y: auto;
+ overscroll-behavior: contain;
+ touch-action: pan-y;
font-size: 0.78rem;
}
From 3e9e6a7eb79e9b86143ff8bab439f0b297fb7636 Mon Sep 17 00:00:00 2001
From: ChevCellios <171721150+ChevCellios@users.noreply.github.com>
Date: Thu, 27 Aug 2026 22:56:19 +0200
Subject: [PATCH 2/5] Fix dark/light mode toggle focus styling. :)
---
Petabit/Views/Shared/_Layout.cshtml | 2 +-
Petabit/wwwroot/css/site.css | 12 ++++++++----
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/Petabit/Views/Shared/_Layout.cshtml b/Petabit/Views/Shared/_Layout.cshtml
index 48420bd..6a041f9 100644
--- a/Petabit/Views/Shared/_Layout.cshtml
+++ b/Petabit/Views/Shared/_Layout.cshtml
@@ -182,7 +182,7 @@
-