Revamp branding, UI styling, and HAFAS integration

- Update BRAND_GUIDELINES.md with new melting clock logo concept
- Rebrand UI components with new violet-to-pink gradient color scheme
- Implement HAFAS authentication headers and GET support in route
- Update logo SVGs to match new brand guidelines
- Fix HAFAS time format to exclude millisecond padding
- Update default station to Mödling Bahnhof
- Bump workspace package versions to 1.0.0
This commit is contained in:
2026-05-12 09:44:37 +02:00
parent 2c65dc1d5a
commit eac4f6e216
47 changed files with 2969 additions and 401 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@timetoleave/api-client",
"version": "1.0.0"
"version": "1.0.0",
"private": true,
"main": "src/index.ts",
"types": "src/index.ts",
+11 -3
View File
@@ -35,7 +35,8 @@ export class ApiClient {
const url = buildUrl(this.baseUrl, "/api/geocode", params);
const res = await fetch(url);
if (!res.ok) throw new Error(`Geocode failed: ${res.status}`);
return res.json();
const result: GeocodeResult = await res.json();
return [result];
}
async getBikeRoute(
@@ -93,12 +94,19 @@ export class ApiClient {
toStationExtId: string,
date: Date,
): Promise<Journey[]> {
const url = buildUrl(this.baseUrl, "/api/hafas", {
// Use POST request as per the new implementation
const body = {
from: fromStationExtId,
to: toStationExtId,
date: date.toISOString(),
};
const res = await fetch(`${this.baseUrl}/api/hafas`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(body)
});
const res = await fetch(url);
if (!res.ok) throw new Error(`Journey search failed: ${res.status}`);
return res.json();
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@timetoleave/core",
"version": "1.0.0"
"version": "1.0.0",
"private": true,
"main": "src/index.ts",
"types": "src/index.ts",
+1 -1
View File
@@ -110,6 +110,6 @@ export function hafasDateTime(date: Date): { date: string; time: string } {
const pad = (n: number) => String(n).padStart(2, "0");
const p = getDateTimeParts(date, "Europe/Vienna");
const d = `${p.year}${pad(p.month)}${pad(p.day)}`;
const t = `${pad(p.hour)}${pad(p.minute)}${pad(p.second)}000`;
const t = `${pad(p.hour)}${pad(p.minute)}${pad(p.second)}`;
return { date: d, time: t };
}