Skip to content

Commit

Permalink
serve content from temporary path
Browse files Browse the repository at this point in the history
Serve content at temporary path
  • Loading branch information
testower committed Oct 2, 2023
1 parent da6916a commit fec1a30
Show file tree
Hide file tree
Showing 21 changed files with 18 additions and 10 deletions.
Binary file added client-next/public/img/mode/air.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client-next/public/img/mode/bicycle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client-next/public/img/mode/bus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client-next/public/img/mode/cableway.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client-next/public/img/mode/car.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client-next/public/img/mode/coach.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client-next/public/img/mode/foot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client-next/public/img/mode/funicular.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client-next/public/img/mode/metro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client-next/public/img/mode/monorail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client-next/public/img/mode/rail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client-next/public/img/mode/taxi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client-next/public/img/mode/tram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client-next/public/img/mode/trolleybus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client-next/public/img/mode/water.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ export function ItineraryHeaderContent({
})}
</div>

{tripPattern.legs.map((leg) => (
{tripPattern.legs.map((leg, i) => (
<ItineraryHeaderLegContent
key={leg.id || `leg_${i}`}
leg={leg}
earliestStartTime={earliestStartTime}
startPx={startPx}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ export function ItineraryHeaderLegContent({
<div
style={{
background: legTextColor,
maskImage: `url(/img/mode/${leg.mode.toLowerCase()}.png)`,
maskImage: `url(/debug-client-preview/img/mode/${leg.mode.toLowerCase()}.png)`,
maskRepeat: 'no-repeat',
WebkitMaskImage: `url(/img/mode/${leg.mode.toLowerCase()}.png)`,
WebkitMaskImage: `url(/debug-client-preview/img/mode/${leg.mode.toLowerCase()}.png)`,
WebkitMaskRepeat: 'no-repeat',
width: '17px',
height: '17px',
Expand Down
4 changes: 2 additions & 2 deletions client-next/src/components/MapView/NavigationMarkers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function NavigationMarkers({
}}
anchor="bottom-right"
>
<img alt="" src="/img/marker-flag-start-shadowed.png" height={48} width={49} />
<img alt="" src="/debug-client-preview/img/marker-flag-start-shadowed.png" height={48} width={49} />
</Marker>
)}
{tripQueryVariables.to.coordinates && (
Expand All @@ -39,7 +39,7 @@ export function NavigationMarkers({
}}
anchor="bottom-right"
>
<img alt="" src="/img/marker-flag-end-shadowed.png" height={48} width={49} />
<img alt="" src="/debug-client-preview/img/marker-flag-end-shadowed.png" height={48} width={49} />
</Marker>
)}
</>
Expand Down
10 changes: 8 additions & 2 deletions client-next/src/components/NavBarContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ export function NavBarContainer() {
<Navbar expand="lg" data-bs-theme="light">
<div className="navbar-container">
<Navbar.Brand>
<img alt="" src="/img/otp-logo.svg" width="30" height="30" className="d-inline-block align-top" /> OTP Debug
Client
<img
alt=""
src="/debug-client-preview/img/otp-logo.svg"
width="30"
height="30"
className="d-inline-block align-top"
/>{' '}
OTP Debug Client
</Navbar.Brand>
</div>
</Navbar>
Expand Down
6 changes: 3 additions & 3 deletions client-next/src/util/generateTextColor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ function hex2rgb(hex: string) {
}

function fullHex(hex: string) {
let r = hex.slice(1, 2);
let g = hex.slice(2, 3);
let b = hex.slice(3, 4);
const r = hex.slice(1, 2);
const g = hex.slice(2, 3);
const b = hex.slice(3, 4);

return [parseInt(r + r, 16), parseInt(g + g, 16), parseInt(b + b, 16)];
}
1 change: 1 addition & 0 deletions client-next/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ import react from '@vitejs/plugin-react';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
base: '/debug-client-preview/',
});

0 comments on commit fec1a30

Please sign in to comment.