-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: - changed back to using HSL (easier compatibility with shadcn tooling) - new light and dark themes - removal of navbar specific color (uses card variable now) - new subcomponents in active location selector - detailed count in status endpoint reponse fix: - readability - some syntax
- Loading branch information
Showing
25 changed files
with
451 additions
and
303 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
apps/forge/src/components/signin/ActiveLocationSelector/QueueStatus.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React from "react"; | ||
import { Ban } from "lucide-react"; | ||
|
||
interface QueueStatusProps { | ||
queue_needed: boolean; | ||
count_in_queue: number; | ||
} | ||
|
||
export const QueueStatus: React.FC<QueueStatusProps> = ({ queue_needed, count_in_queue }) => { | ||
if (!queue_needed) { | ||
return ( | ||
<div className="rounded-sm flex text-primary-foreground bg-green-600 dark:bg-green-900 p-2 space-x-2"> | ||
<Ban /> | ||
<span className="text-white">QUEUE DISABLED</span> | ||
</div> | ||
); | ||
} | ||
return ( | ||
<div className="rounded-sm flex text-primary-foreground bg-primary p-2 space-x-2"> | ||
<span> {count_in_queue}</span> | ||
<span>in Queue</span> | ||
</div> | ||
); | ||
}; |
24 changes: 24 additions & 0 deletions
24
apps/forge/src/components/signin/ActiveLocationSelector/StatusBadge.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React from "react"; | ||
import { Separator } from "@ui/components/ui/separator.tsx"; | ||
import { Moon } from "lucide-react"; | ||
|
||
interface StatusBadgeProps { | ||
is_open: boolean; | ||
is_out_of_hours: boolean; | ||
} | ||
|
||
export const StatusBadge: React.FC<StatusBadgeProps> = ({ is_open, is_out_of_hours }) => { | ||
return ( | ||
<div className="rounded-sm flex bg-card text-card-foreground p-2 space-x-2"> | ||
<span className="text-gray-500 dark:text-gray-400">Status</span> | ||
{/* Open Status */} | ||
{is_open ? <span className="text-green-500">OPEN</span> : <span className="text-red-500">CLOSED</span>} | ||
{is_out_of_hours ? ( | ||
<> | ||
<Separator orientation="vertical" /> | ||
<Moon /> <span>Out of Hours</span> | ||
</> | ||
) : undefined} | ||
</div> | ||
); | ||
}; |
49 changes: 49 additions & 0 deletions
49
apps/forge/src/components/signin/ActiveLocationSelector/UserCount.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import React, { useState } from "react"; | ||
|
||
interface UserCountProps { | ||
rep_count: number; | ||
off_shift_rep_count: number; | ||
user_count: number; | ||
max_count: number; | ||
} | ||
|
||
export const UserCount: React.FC<UserCountProps> = ({ rep_count, off_shift_rep_count, max_count, user_count }) => { | ||
const [showDetails, setShowDetails] = useState(false); | ||
const total_count = rep_count + off_shift_rep_count + user_count; | ||
|
||
const handleClick = () => { | ||
setShowDetails(!showDetails); | ||
}; | ||
|
||
return ( | ||
<div | ||
className="rounded-sm flex bg-card text-card-foreground p-2 space-x-2 cursor-pointer" | ||
onClick={handleClick} | ||
onKeyUp={(event) => { | ||
// Handle the 'Enter' key to mimic mouse click interaction | ||
if (event.key === "Enter") { | ||
handleClick(); | ||
} | ||
}} | ||
> | ||
{showDetails ? ( | ||
<> | ||
<span> {rep_count}</span> | ||
<span className="text-gray-500 dark:text-gray-400 uppercase font-mono">rep(s)</span> | ||
<span>{off_shift_rep_count}</span> | ||
<span className="text-gray-500 dark:text-gray-400 uppercase font-mono">off-shift rep(s)</span> | ||
<span>{user_count}</span> | ||
<span className="text-gray-500 dark:text-gray-400 uppercase font-mono">user(s)</span> | ||
</> | ||
) : ( | ||
<> | ||
<span className="text-gray-500 dark:text-gray-400 uppercase font-mono">user count</span> | ||
<span> | ||
{total_count}|{max_count} | ||
</span> | ||
<span className="text-gray-500 dark:text-gray-400 uppercase font-mono">max</span> | ||
</> | ||
)} | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.