mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-03 08:43:48 +03:00
refactor to use html5 progress tag
This commit is contained in:
parent
a5dc101e6b
commit
d20d3d0b77
@ -34,17 +34,22 @@ export const progressBarContainer = style({
|
|||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
position: "relative",
|
position: "relative",
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
backgroundColor: vars.color.darkBackground,
|
|
||||||
border: `solid 1px ${vars.color.border}`,
|
border: `solid 1px ${vars.color.border}`,
|
||||||
overflow: "hidden",
|
overflow: "hidden",
|
||||||
});
|
});
|
||||||
|
|
||||||
export const progressBarFill = style({
|
export const progressBar = style({
|
||||||
|
WebkitAppearance: "none",
|
||||||
|
appearance: "none",
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
transition: "width 0.1s",
|
width: "100%",
|
||||||
height: "100%",
|
"::-webkit-progress-value": {
|
||||||
left: 0,
|
backgroundColor: vars.color.background,
|
||||||
background: vars.color.background,
|
transition: "width 0.2s",
|
||||||
|
},
|
||||||
|
"::-webkit-progress-bar": {
|
||||||
|
backgroundColor: vars.color.darkBackground,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const progressBarText = style({
|
export const progressBarText = style({
|
||||||
|
@ -54,10 +54,11 @@ export default function Splash() {
|
|||||||
<>
|
<>
|
||||||
<p>{t("downloading_version", { version: newVersion })}</p>
|
<p>{t("downloading_version", { version: newVersion })}</p>
|
||||||
<div className={styles.progressBarContainer}>
|
<div className={styles.progressBarContainer}>
|
||||||
<div
|
<progress
|
||||||
className={styles.progressBarFill}
|
className={styles.progressBar}
|
||||||
style={{ width: `${status.info.percent}%` }}
|
max="100"
|
||||||
></div>
|
value={status.info.percent}
|
||||||
|
/>
|
||||||
<span className={styles.progressBarText}>
|
<span className={styles.progressBarText}>
|
||||||
{status.info.percent.toFixed(2)} %
|
{status.info.percent.toFixed(2)} %
|
||||||
</span>
|
</span>
|
||||||
|
Loading…
Reference in New Issue
Block a user