Skip to content

Commit

Permalink
fix: make top input label visible at singleLine page (#420)
Browse files Browse the repository at this point in the history
  • Loading branch information
shootermv authored Jan 21, 2024
1 parent c1c176a commit 9368bdb
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 16 deletions.
9 changes: 5 additions & 4 deletions src/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@
"coords": "coords",
"hide_document": "hide document",
"show_document": "show document",
"aboutPage":{
"aboutPage": {
"title": "About us",
"privacyText": "<0>Google Analytics</0> service is embedded in the website to analyze the usage patterns and positioning of the website in search engines. This code reveals to the operators of the service information regarding the behavior of the users. <1>Learn more</1> about the privacy policy of the service.",
"licenseInfo":{
"text": "All information displayed on the website is based on data published by government sources. Usage of the information is subject to the <0>CC BY-SA 4.0 license</0> of <1>Creative Commons</1>"
"licenseInfo": {
"text": "All information displayed on the website is based on data published by government sources. Usage of the information is subject to the <0>CC BY-SA 4.0 license</0> of <1>Creative Commons</1>"
},
"contactLinksText":{
"contactLinksText": {
"sadna": "Contact us",
"slack": "Chat with us on Slack",
"donations": "Servers cost money - help us continue to maintain and develop the project!"
Expand All @@ -132,6 +132,7 @@
"order_by_hour": "by hour",
"order_by_severity": "by severity",
"choose_dates": "Dates",
"single_line_map_title": "Locations of selected lines",
"reportBug": {
"description": "This form is designed so that we can receive feedback and improve the application. Please be aware that the submitted information will be available to the public.",
"error": "An error occurred while sending the report. Please try again later.",
Expand Down
9 changes: 5 additions & 4 deletions src/locale/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,14 @@
"text2": "אם הבעיה נמשכת, אנא פנה אלינו בכתובת:",
"button": "חזרה לדף הבית"
},
"aboutPage":{
"aboutPage": {
"title": "קצת עלינו",
"privacyText": "באתר מוטמע שירות <0>Google Analytics</0> לניתוח דפוסי השימוש ומיצוב האתר במנועי חיפוש. קוד זה חושף בפני מפעילי השירות מידע בנוגע להתנהגות המשתמשים. <1>קראו כאן</1> על מדיניות הפרטיות של השירות.",
"licenseInfo":{
"text": "כל המידע המוצג באתר מבוסס על נתונים המפורסמים במקורות המידע הממשלתיים. השימוש במידע כפוף לרישיון <0>{{licenseName}}</0> של <1>Creative Commons</1>.",
"licenseInfo": {
"text": "כל המידע המוצג באתר מבוסס על נתונים המפורסמים במקורות המידע הממשלתיים. השימוש במידע כפוף לרישיון <0>{{licenseName}}</0> של <1>Creative Commons</1>.",
"licenseName": "רישיון CC BY-SA 4.0"
},
"contactLinksText":{
"contactLinksText": {
"sadna": "צרו איתנו קשר",
"slack": " דברו איתנו על זה בסלאק",
"donations": "שרתים עולים כסף - עזרו לנו להמשיך לתחזק ולפתח את הפרויקט!"
Expand All @@ -146,6 +146,7 @@
"order_by_hour": "לפי שעה",
"order_by_severity": "לפי חומרה",
"choose_dates": "תאריכים",
"single_line_map_title": "מיקומים של קו שנבחר",
"reportBug": {
"description": "טופס זה נועד על מנת שנוכל לקבל פידבק ולשפר את האפליקציה. לתשומת לבך - הטופס נשלח לGitHub, והמידע שיצויין בו יהיה ציבורי.",
"error": "אירעה שגיאה בעת שליחת הדיווח. אנא נסה שוב מאוחר יותר.",
Expand Down
20 changes: 12 additions & 8 deletions src/pages/singleLineMap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { CircularProgress, Tooltip } from '@mui/material'
import { FilterPositionsByStartTimeSelector } from '../components/FilterPositionsByStartTimeSelector'
import { PageContainer } from '../components/PageContainer'
import { MapWithLocationsAndPath, Path } from '../components/map-related/MapWithLocationsAndPath'
import Title from 'antd/es/typography/Title'

const SingleLineMapPage = () => {
const { search, setSearch } = useContext(SearchContext)
Expand Down Expand Up @@ -90,32 +91,35 @@ const SingleLineMapPage = () => {

return (
<PageContainer className="map-container">
<Title className="page-title" level={3}>
{t('single_line_map_title')}
</Title>
<Grid container spacing={2} sx={{ maxWidth: INPUT_SIZE }}>
{/* choose date*/}
<Grid xs={4}>
<Grid xs={4} className="hideOnMobile">
<Label text={t('choose_date')} />
</Grid>
<Grid xs={8}>
<Grid sm={5} xs={12}>
<DateSelector
time={moment(timestamp)}
onChange={(ts) => setSearch((current) => ({ ...current, timestamp: ts.valueOf() }))}
/>
</Grid>
{/* choose operator */}
<Grid xs={4}>
<Grid xs={4} className="hideOnMobile">
<Label text={t('choose_operator')} />
</Grid>
<Grid xs={8}>
<Grid sm={8} xs={12}>
<OperatorSelector
operatorId={operatorId}
setOperatorId={(id) => setSearch((current) => ({ ...current, operatorId: id }))}
/>
</Grid>
{/* choose line number */}
<Grid xs={4}>
<Grid xs={4} className="hideOnMobile">
<Label text={t('choose_line')} />
</Grid>
<Grid xs={8}>
<Grid sm={8} xs={12}>
<LineNumberSelector
lineNumber={lineNumber}
setLineNumber={(number) => setSearch((current) => ({ ...current, lineNumber: number }))}
Expand Down Expand Up @@ -183,7 +187,7 @@ function FilterPositionsByStartTime({

return (
<>
<Grid xs={3}>
<Grid xs={3} className="hideOnMobile">
<Label text={t('choose_start_time')} />
</Grid>
<Grid xs={1}>
Expand All @@ -193,7 +197,7 @@ function FilterPositionsByStartTime({
</Tooltip>
)}
</Grid>
<Grid xs={8}>
<Grid sm={5} xs={12}>
<FilterPositionsByStartTimeSelector
options={options}
startTime={startTime}
Expand Down

0 comments on commit 9368bdb

Please sign in to comment.