-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1952 from ever-co/develop
Release
- Loading branch information
Showing
24 changed files
with
1,075 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { atom } from 'recoil'; | ||
|
||
export const taskBlockFilterState = atom<'all' | 'running' | 'online' | 'pause' | 'idle' | 'suspended'>({ | ||
key: 'taskBlockFilterState', | ||
default: 'all' | ||
}); |
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,52 @@ | ||
export default function RadialProgress({ | ||
radius = 24, | ||
cx = 24, | ||
cy = 24, | ||
percentage = 55 | ||
}: { | ||
radius?: number; | ||
cx?: number; | ||
cy?: number; | ||
percentage: number; | ||
}) { | ||
const circumference = radius * 2 * Math.PI; | ||
|
||
return ( | ||
<> | ||
<div | ||
x-data="{ scrollProgress: 0 }" | ||
className="relative -rotate-90 inline-flex items-center justify-center overflow-hidden rounded-full" | ||
> | ||
<svg className="w-12 h-12"> | ||
<circle | ||
className="text-gray-300" | ||
strokeWidth="8" | ||
stroke="currentColor" | ||
fill="transparent" | ||
r={radius} | ||
cx={cx} | ||
cy={cy} | ||
/> | ||
<circle | ||
className="text-[#27AE60]" | ||
strokeWidth="8" | ||
strokeDasharray={circumference} | ||
strokeDashoffset={`calc(${circumference} - ${(percentage / 100) * circumference})`} | ||
strokeLinecap="round" | ||
stroke="currentColor" | ||
fill="transparent" | ||
r={radius} | ||
cx={cx} | ||
cy={cy} | ||
/> | ||
</svg> | ||
<span | ||
className="absolute text-xs font-normal text-black dark:text-white rotate-90" | ||
x-text={`${percentage}%`} | ||
> | ||
{percentage}% | ||
</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
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
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,52 @@ | ||
import * as React from 'react'; | ||
import { OT_Member } from '@app/interfaces'; | ||
import { Transition } from '@headlessui/react'; | ||
import { UserTeamBlock } from './team/user-team-block'; | ||
|
||
interface Props { | ||
teamMembers: OT_Member[]; | ||
publicTeam: boolean; | ||
currentUser: OT_Member | undefined; | ||
teamsFetching: boolean; | ||
} | ||
|
||
const TeamMembersBlockView: React.FC<Props> = ({ teamMembers: members, publicTeam = false, currentUser }) => { | ||
return ( | ||
<div className="mt-7"> | ||
{/* Current authenticated user members */} | ||
<Transition | ||
show={!!currentUser} | ||
enter="transition-opacity duration-75" | ||
enterFrom="opacity-0" | ||
enterTo="opacity-100" | ||
leave="transition-opacity duration-150" | ||
leaveFrom="opacity-100" | ||
leaveTo="opacity-0" | ||
> | ||
{/* <UserTeamBlock member={currentUser} publicTeam={publicTeam} /> */} | ||
</Transition> | ||
<div className="flex w-full items-center"> | ||
{members.map((member) => { | ||
return ( | ||
<div className="p-1 w-full md:w-1/2 lg:w-1/4" key={member.id}> | ||
<Transition | ||
key={member.id} | ||
show={true} | ||
enter="transition-opacity duration-75" | ||
enterFrom="opacity-0" | ||
enterTo="opacity-100" | ||
leave="transition-opacity duration-150" | ||
leaveFrom="opacity-100" | ||
leaveTo="opacity-0" | ||
> | ||
<UserTeamBlock member={member} publicTeam={publicTeam} /> | ||
</Transition> | ||
</div> | ||
); | ||
})} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default TeamMembersBlockView; |
Oops, something went wrong.