Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcd76533

Browse files
committed
Add refresh button
1 parent00ebe2e commitcd76533

File tree

1 file changed

+27
-3
lines changed

1 file changed

+27
-3
lines changed

‎site/src/components/DeploymentBanner/DeploymentBannerView.tsx

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { TerminalIcon } from "components/Icons/TerminalIcon"
1919
importdayjsfrom"dayjs"
2020
importCollectedIconfrom"@material-ui/icons/Compare"
2121
importRefreshIconfrom"@material-ui/icons/Refresh"
22+
importButtonfrom"@material-ui/core/Button"
2223

2324
exportconstbannerHeight=36
2425

@@ -192,11 +193,20 @@ export const DeploymentBannerView: FC<DeploymentBannerViewProps> = ({
192193
</div>
193194
</Tooltip>
194195

195-
<Tooltiptitle="A countdown until stats are refetched">
196-
<divclassName={styles.value}>
196+
<Tooltiptitle="A countdown until stats are fetched again. Click to refresh!">
197+
<Button
198+
className={`${styles.value}${styles.refreshButton}`}
199+
title="Refresh"
200+
onClick={()=>{
201+
if(fetchStats){
202+
fetchStats()
203+
}
204+
}}
205+
variant="text"
206+
>
197207
<RefreshIcon/>
198208
{timeUntilRefresh}s
199-
</div>
209+
</Button>
200210
</Tooltip>
201211
</div>
202212
</div>
@@ -314,4 +324,18 @@ const useStyles = makeStyles((theme) => ({
314324
alignItems:"center",
315325
gap:theme.spacing(2),
316326
},
327+
refreshButton:{
328+
margin:0,
329+
padding:"0px 8px",
330+
height:"unset",
331+
minHeight:"unset",
332+
fontSize:"unset",
333+
color:"unset",
334+
border:0,
335+
minWidth:"unset",
336+
337+
"& svg":{
338+
marginRight:theme.spacing(0.5),
339+
},
340+
},
317341
}))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp