Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor scripqueue adjustments #263

Merged
merged 8 commits into from
Dec 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion love/src/components/GeneralPurpose/LoadingBar/LoadingBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export default class LoadingBar extends Component {

render() {
const narrowClass = this.props.isNarrow ? styles.narrow : '';
const delayedScriptProgressClass = this.props.percentage > 100 ? styles.delayedScriptProgress : '';
return (
<div className={[styles.backgroundBar, this.props.backgroundClass].join(' ')} title={this.props.title}>
<span className={[styles.percentage, this.props.percentage > 50 ? styles.dark : ''].join(' ')}>
Expand All @@ -39,7 +40,7 @@ export default class LoadingBar extends Component {
width: `${Math.min(this.props.percentage, 100)}%`,
animationDuration: `${this.props.animationDuration}s`,
}}
className={[styles.loadedBar, narrowClass].join(' ')}
className={[styles.loadedBar, narrowClass, delayedScriptProgressClass].join(' ')}
/>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,8 @@

.dark {
color: var(--second-primary-background-color);
}

.delayedScriptProgress {
background-color: var(--status-alert-color);
}
2 changes: 1 addition & 1 deletion love/src/components/ScriptQueue/ScriptQueue.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -222,5 +222,5 @@

.availableScriptsInput {
line-height: 1em;
height: 1em;
height: 2em;
}
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export default class CurrentScript extends Component {
const isValid = this.props.path !== 'None';
const typeTag = this.props.isStandard ? 'STANDARD' : 'EXTERNAL';
const visibilityClass = !isValid ? scriptStyles.hidden : '';
const delayedScriptProgressClass = percentage > 100 ? styles.delayedScriptProgress : '';

const isHearbeatAvailable = Object.keys(this.props.heartbeatData).length > 0;
let heartbeatStatus = 'unknown';
Expand All @@ -132,7 +133,7 @@ export default class CurrentScript extends Component {
const isPaused = this.props.scriptState.toLowerCase() === 'paused';

return (
<div className={[scriptStyles.scriptContainer, isValid ? '' : scriptStyles.scriptContainerOff].join(' ')}>
<div className={[scriptStyles.scriptContainer].join(' ')}>
<div>
<div className={styles.currentScriptContainer} onClick={this.onClick}>
<div className={styles.topContainer}>
Expand Down Expand Up @@ -169,7 +170,7 @@ export default class CurrentScript extends Component {
<span className={scriptStyles.pathText}>{fileExtension}</span>
</div>

<div className={[styles.timeContainer, visibilityClass].join(' ')}>
<div className={[styles.timeContainer].join(' ')}>
<div className={styles.elapsedTimeContainer}>
<span className={styles.elapsedTimeLabel}>Elapsed time: </span>
<span className={[styles.elapsedTimeValue, scriptStyles.highlighted].join(' ')}>
Expand Down Expand Up @@ -266,7 +267,7 @@ export default class CurrentScript extends Component {
</div>

<div className={[styles.loadingBarContainer, visibilityClass].join(' ')}>
<LoadingBar percentage={percentage} title={`Script completion: ${percentage}%`} isNarrow />
<LoadingBar className={delayedScriptProgressClass} percentage={percentage} title={`Script completion: ${percentage}%`} displayPercentage={false} isNarrow/>
</div>
</div>
{/* <div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@
display: inline-block;
margin: 0.2em;
vertical-align: top;
}
}