Skip to content

refactor: Move schedule to the header #2775

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

Merged
merged 9 commits into from
Jul 1, 2022
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Ignores the label on workspace schedule button
  • Loading branch information
BrunoQuaresma committed Jul 1, 2022
commit 700fb675911bdb898cbf8e63e73c46193118dd0c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { makeStyles } from "@material-ui/core/styles"
import { Workspace } from "../../api/typesGenerated"
import { combineClasses } from "../../util/combineClasses"
import { autoStartDisplay, autoStopDisplay, isShuttingDown, Language } from "../../util/schedule"
import { isWorkspaceOn } from "../../util/workspace"

Expand All @@ -12,7 +13,7 @@ export const WorkspaceScheduleLabel: React.FC<{ workspace: Workspace }> = ({ wor

// If it is shutting down, we don't need to display the auto stop label
return (
<span className={styles.labelText}>
<span className={combineClasses([styles.labelText, "chromatic-ignore"])}>
{shouldDisplayStrongLabel && (
<strong className={styles.labelStrong}>{Language.autoStopLabel}</strong>
)}
Expand All @@ -22,7 +23,7 @@ export const WorkspaceScheduleLabel: React.FC<{ workspace: Workspace }> = ({ wor
}

return (
<span className={styles.labelText}>
<span className={combineClasses([styles.labelText, "chromatic-ignore"])}>
<strong className={styles.labelStrong}>{Language.autoStartLabel}</strong>
{autoStartDisplay(workspace.autostart_schedule)}
</span>
Expand Down