Skip to content

Commit

Permalink
style: PRIVATE_GAUGE_VISIBLE_PIXELS
Browse files Browse the repository at this point in the history
  • Loading branch information
mlajkim committed Sep 28, 2024
1 parent 7851982 commit 65a18eb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions src/components/organism_appbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import RitualsFrameGauge from '../organism_rituals_frame/index.gauge'

const PRIVATE_TITLE = `Consistency GPT (Beta)`
const PRIVATE_SHORTER_TITLE = `CGT`
const PRIVATE_TITLE_SHRINK_PIXELS = 500
const PRIVATE_TITLE_VISIBLE_PIXELS = 500
const PRIVATE_GAUGE_VISIBLE_PIXELS = 850
const PRIVATE_TITLE_LOGO = `/favicon_archived/android-chrome-512x512.png`
interface Props {
nickname?: string
Expand All @@ -36,7 +37,7 @@ const Appbar: FC<Props> = ({ children, nickname }) => {
height={30}
style={{ marginRight: 8 }}
/>
{width <= PRIVATE_TITLE_SHRINK_PIXELS && (
{width <= PRIVATE_TITLE_VISIBLE_PIXELS && (
<Typography
variant="h6"
color="inherit"
Expand All @@ -47,7 +48,7 @@ const Appbar: FC<Props> = ({ children, nickname }) => {
{nickname && ` - ${nickname}`}
</Typography>
)}
{PRIVATE_TITLE_SHRINK_PIXELS < width && (
{PRIVATE_TITLE_VISIBLE_PIXELS <= width && (
<Typography
variant="h6"
color="inherit"
Expand All @@ -60,7 +61,7 @@ const Appbar: FC<Props> = ({ children, nickname }) => {
)}
<Box pr={2} />
<Box flexGrow={1} />
<RitualsFrameGauge />
{PRIVATE_GAUGE_VISIBLE_PIXELS <= width && <RitualsFrameGauge />}
<RitualsFrameRefreshButton nickname={nickname} />
<Box pr={1} />
<AppbarGitHubButtonPart />
Expand Down
6 changes: 3 additions & 3 deletions src/components/organism_rituals_frame/index.gauge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ const BorderLinearProgress = styled(LinearProgress)(({ theme }) => ({
* @returns
*/
const RitualsFrameGauge: FC<Props> = () => {
const value = useRecoilValue(actionGroupAchievedPercentSelector)
const percentage = useRecoilValue(actionGroupAchievedPercentSelector)

return (
<Box minWidth={200} alignItems={`center`}>
<BorderLinearProgress variant="determinate" value={value} />
<Typography>{`${value}%`}</Typography>
<BorderLinearProgress variant="determinate" value={percentage} />
<Typography>{`${percentage}%`}</Typography>
</Box>
)
}
Expand Down

0 comments on commit 65a18eb

Please sign in to comment.