forked from opentripplanner/OpenTripPlanner
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/dev-2.x' into upstream-merge-2…
…024-09-30
- Loading branch information
Showing
18 changed files
with
358 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,25 @@ | ||
import { Button } from 'react-bootstrap'; | ||
import { TripQueryVariables } from '../../gql/graphql.ts'; | ||
import { queryAsString } from '../../static/query/tripQuery.tsx'; | ||
import graphqlIcon from '../../static/img/graphql-solid.svg'; | ||
|
||
const graphiQLUrl = import.meta.env.VITE_GRAPHIQL_URL; | ||
|
||
function GraphiQLRouteButton({ tripQueryVariables }: { tripQueryVariables: TripQueryVariables }) { | ||
const formattedVariables = encodeURIComponent(JSON.stringify(tripQueryVariables)); | ||
const formattedQuery = encodeURIComponent(queryAsString); | ||
|
||
const hint = 'Open in GraphiQL'; | ||
|
||
return ( | ||
<div className="search-bar-route-button-wrapper"> | ||
<Button href={graphiQLUrl + '&query=' + formattedQuery + '&variables=' + formattedVariables} target={'_blank'}> | ||
GraphiQL | ||
</Button> | ||
</div> | ||
<Button | ||
title={hint} | ||
href={graphiQLUrl + '&query=' + formattedQuery + '&variables=' + formattedVariables} | ||
target={'_blank'} | ||
> | ||
<img alt={hint} title={hint} src={graphqlIcon} width="20" height="20" className="d-inline-block align-middle" /> | ||
</Button> | ||
); | ||
} | ||
|
||
export default GraphiQLRouteButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
client/src/components/SearchBar/WheelchairAccessibleCheckBox.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { Form } from 'react-bootstrap'; | ||
import wheelchairIcon from '../../static/img/wheelchair.svg'; | ||
import { TripQueryVariables } from '../../gql/graphql.ts'; | ||
|
||
export default function WheelchairAccessibleCheckBox({ | ||
tripQueryVariables, | ||
setTripQueryVariables, | ||
}: { | ||
tripQueryVariables: TripQueryVariables; | ||
setTripQueryVariables: (tripQueryVariables: TripQueryVariables) => void; | ||
}) { | ||
return ( | ||
<Form.Group> | ||
<Form.Label column="sm" htmlFor="wheelchairAccessibleCheck"> | ||
<img | ||
alt="Wheelchair Accessible Trip" | ||
title="Wheelchair Accessible Trip" | ||
src={wheelchairIcon} | ||
width="20" | ||
height="20" | ||
className="d-inline-block align-middle" | ||
/> | ||
</Form.Label> | ||
<Form.Check | ||
id="wheelchairAccessible" | ||
onChange={(e) => { | ||
setTripQueryVariables({ | ||
...tripQueryVariables, | ||
wheelchairAccessible: e.target.checked, | ||
}); | ||
}} | ||
></Form.Check> | ||
</Form.Group> | ||
); | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.