Skip to content

Commit b95515f

Browse files
committed
disable button on request
1 parent 1dfb1c0 commit b95515f

File tree

3 files changed

+16
-20
lines changed

3 files changed

+16
-20
lines changed

src/App.css

+9
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,15 @@ a.pure-button-secondary
222222
background-color:rgb(177, 167, 167);
223223
height:100%;
224224
}
225+
.logohome
226+
{
227+
display:flex;
228+
flex-direction: column;
229+
}
230+
.logohome img{
231+
margin-top: 1rem;
232+
233+
}
225234

226235
.menu_font {
227236
font-size: 1.1rem;

src/pages/Home.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,15 @@ class Home extends React.Component {
3535
<h1>OpenStreetTouch</h1>
3636
<h2>Version:{`${process.env.REACT_APP_VERSION}`}</h2>
3737

38-
<h2 className='h2home'></h2>
38+
<div className='logohome'>
3939
<a href="https://www.nlnet.nl" target="_blank" rel="noreferrer">
4040
<img src="./logo-sh.svg" width='20%' alt="NLnet fundation logo" />
4141
</a>
42-
<h2 className='h2home'></h2>
42+
4343
<a href="https://www.braillerap.org" target="_blank" rel="noreferrer">
4444
<img src="./braillerap_logo.svg" width='20%' alt="BrailleRAP logo" />
4545
</a>
46+
</div>
4647
<p>{this.context.GetLocaleString("home.openstreetmap")}
4748
<a href="https://www.openstreetmap.org/copyright" target="_blank" rel="noreferrer">OpenStreetMap</a>
4849
</p>

src/pages/Transport.js

+4-18
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,7 @@ const Transport = () => {
7676
<label>{GetLocaleString("transport.type")}:
7777
<select value={transportType} onChange={(event) => {setTransportType(event.target.value)}} >
7878
{
79-
/*
80-
transport_type2.map((trans) => {
81-
return (
82-
<option>{trans}</option>
83-
)
84-
})
85-
*/
79+
8680
Object.entries(transport_type_dic).map ((key) => {
8781

8882
return (
@@ -146,18 +140,10 @@ const Transport = () => {
146140
}
147141
}
148142
}
149-
150143
setTransportLines(sline);
151144
setOsmPending(false);
152-
153145
});
154-
155-
156146
});
157-
158-
159-
160-
161147
}
162148
const onSelectLine = (e) => {
163149

@@ -280,7 +266,7 @@ const Transport = () => {
280266
}
281267
const renderPNGcommand = () => {
282268
if (pngavailable)
283-
return (<button onClick={goDownloadPNG}>{GetLocaleString("transport.downloadpng")}</button>);
269+
return (<button disabled={osmPending} onClick={goDownloadPNG}>{GetLocaleString("transport.downloadpng")}</button>);
284270
return (<></>);
285271
}
286272
const renderResultAction = () => {
@@ -290,9 +276,9 @@ const Transport = () => {
290276
<div className='TransportResultAction'>
291277
<fieldset>
292278
<legend>{GetLocaleString("transport.titleresult")}</legend>
293-
<button onClick={goDownloadSVG}>{GetLocaleString("transport.downloadsvg")}</button>
279+
<button disabled={osmPending} onClick={goDownloadSVG}>{GetLocaleString("transport.downloadsvg")}</button>
294280
{renderPNGcommand()}
295-
<button onClick={goDownloadTXT}>{GetLocaleString("transport.downloadtxt")}</button>
281+
<button disabled={osmPending} onClick={goDownloadTXT}>{GetLocaleString("transport.downloadtxt")}</button>
296282
</fieldset>
297283
</div>
298284
);

0 commit comments

Comments
 (0)