commit 883f536c344ea485d43d8f95ebbcf328594f2e55
parent f1c6798c40659912f878568f0ec69121b3509538
Author: Katja (ctucx) <git@ctu.cx>
Date: Sat, 19 Apr 2025 12:08:50 +0200
parent f1c6798c40659912f878568f0ec69121b3509538
Author: Katja (ctucx) <git@ctu.cx>
Date: Sat, 19 Apr 2025 12:08:50 +0200
add `rejseplanen` profile
3 files changed, 23 insertions(+), 10 deletions(-)
diff --git a/src/hafasClient.js b/src/hafasClient.js @@ -1,21 +1,23 @@ import { createClient as createVendoClient } from 'db-vendo-client'; import { createClient as createHafasClient } from 'hafas-client'; -import { profile as dbNavProfile } from 'db-vendo-client/p/dbnav/index.js'; -import { profile as bvgProfile } from 'hafas-client/p/bvg/index.js'; -import { profile as nahshProfile } from 'hafas-client/p/nahsh/index.js'; -import { profile as rmvProfile } from 'hafas-client/p/rmv/index.js'; -import { profile as oebbProfile } from 'hafas-client/p/oebb/index.js'; +import { profile as dbNavProfile } from 'db-vendo-client/p/dbnav/index.js'; +import { profile as bvgProfile } from 'hafas-client/p/bvg/index.js'; +import { profile as nahshProfile } from 'hafas-client/p/nahsh/index.js'; +import { profile as rmvProfile } from 'hafas-client/p/rmv/index.js'; +import { profile as oebbProfile } from 'hafas-client/p/oebb/index.js'; +import { profile as rejseplanenProfile } from 'hafas-client/p/rejseplanen/index.js' const clients = {}; export let client; export const profiles = { - db: { name: "DB", backend: 'vendo', profile: dbNavProfile }, - bvg: { name: "BVG", backend: 'hafas', profile: bvgProfile }, - nahsh: { name: "NAH.SH", backend: 'hafas', profile: nahshProfile }, - rmv: { name: "RMV", backend: 'hafas', profile: rmvProfile }, - oebb: { name: "ÖBB", backend: 'hafas', profile: oebbProfile }, + db: { name: "DB", backend: 'vendo', profile: dbNavProfile }, + bvg: { name: "BVG", backend: 'hafas', profile: bvgProfile }, + nahsh: { name: "NAH.SH", backend: 'hafas', profile: nahshProfile }, + rmv: { name: "RMV", backend: 'hafas', profile: rmvProfile }, + oebb: { name: "ÖBB", backend: 'hafas', profile: oebbProfile }, + rejseplanen: { name: "Rejseplanen", backend: 'hafas', profile: rejseplanenProfile }, } export const getDefaultProfile = () => 'db';
diff --git a/src/searchView.js b/src/searchView.js @@ -281,6 +281,13 @@ class SearchView extends BaseView { "u-bahn": "icon-subway", "watercraft": "icon-ferry", "ast": "icon-taxi", + + // Rejseplanen + "national-train": "icon-ic", + "national-train-2": "icon-icl", + "local-train": "icon-re", + "o": "icon-o", + "s-tog": "icon-suburban", }; return productIcons[id] || `icon-${id}`;
diff --git a/src/styles/searchView.css b/src/styles/searchView.css @@ -161,8 +161,12 @@ form { .icon-ice:after { content: 'ICE'; } .icon-ic:after { content: 'IC'; } + .icon-icl:after { content: 'ICL'; } .icon-icice:after { content: 'IC ICE'; } .icon-dzug:after { content: 'D'; } + .icon-regional:after { content: 'NV'; } + .icon-re:after { content: 'RE'; } + .icon-o:after { content: 'Ø'; } .icon-suburban:after { content: 'S'; } .icon-subway:after { content: 'U'; } .icon-tram:after { content: 'Tram'; }