|
|
@ -9,8 +9,7 @@ import MapIcon from '../icons/map.svg'; |
|
|
|
import GroupIcon from '../icons/group.svg'; |
|
|
|
import GroupIcon from '../icons/group.svg'; |
|
|
|
import { useState } from 'preact/hooks'; |
|
|
|
import { useState } from 'preact/hooks'; |
|
|
|
import { useStore } from '@nanostores/preact'; |
|
|
|
import { useStore } from '@nanostores/preact'; |
|
|
|
import { $canManageCurrentTeam, $currentTeam } from '../stores/team'; |
|
|
|
import { $currentTeam } from '../stores/team'; |
|
|
|
import { WarningIcon } from './ReactIcons/WarningIcon'; |
|
|
|
|
|
|
|
import { SubmitFeedbackPopup } from './Feedback/SubmitFeedbackPopup'; |
|
|
|
import { SubmitFeedbackPopup } from './Feedback/SubmitFeedbackPopup'; |
|
|
|
|
|
|
|
|
|
|
|
export const TeamSidebar: FunctionalComponent<{ |
|
|
|
export const TeamSidebar: FunctionalComponent<{ |
|
|
@ -18,12 +17,10 @@ export const TeamSidebar: FunctionalComponent<{ |
|
|
|
}> = ({ activePageId, children }) => { |
|
|
|
}> = ({ activePageId, children }) => { |
|
|
|
const [menuShown, setMenuShown] = useState(false); |
|
|
|
const [menuShown, setMenuShown] = useState(false); |
|
|
|
const currentTeam = useStore($currentTeam); |
|
|
|
const currentTeam = useStore($currentTeam); |
|
|
|
const [showFeedbackPopup, setShowFeedbackPopup] = useState(true); |
|
|
|
const [showFeedbackPopup, setShowFeedbackPopup] = useState(false); |
|
|
|
|
|
|
|
|
|
|
|
const { teamId } = useTeamId(); |
|
|
|
const { teamId } = useTeamId(); |
|
|
|
|
|
|
|
|
|
|
|
const feedbackFormLink = 'https://forms.gle/g9h6yEqsG4y1hQUv5'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const sidebarLinks = [ |
|
|
|
const sidebarLinks = [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: 'Progress', |
|
|
|
title: 'Progress', |
|
|
@ -76,7 +73,8 @@ export const TeamSidebar: FunctionalComponent<{ |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<a |
|
|
|
<a |
|
|
|
href="/team" |
|
|
|
href="/team" |
|
|
|
class={`flex w-full items-center rounded px-3 py-1.5 text-sm text-slate-900 hover:bg-slate-200 ${activePageId === 'team' ? 'bg-slate-100' : '' |
|
|
|
class={`flex w-full items-center rounded px-3 py-1.5 text-sm text-slate-900 hover:bg-slate-200 ${ |
|
|
|
|
|
|
|
activePageId === 'team' ? 'bg-slate-100' : '' |
|
|
|
}`}
|
|
|
|
}`}
|
|
|
|
> |
|
|
|
> |
|
|
|
<img alt={'teams'} src={GroupIcon} class={`mr-2 h-4 w-4`} /> |
|
|
|
<img alt={'teams'} src={GroupIcon} class={`mr-2 h-4 w-4`} /> |
|
|
@ -90,7 +88,8 @@ export const TeamSidebar: FunctionalComponent<{ |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<a |
|
|
|
<a |
|
|
|
href={sidebarLink.href} |
|
|
|
href={sidebarLink.href} |
|
|
|
class={`flex w-full items-center rounded px-3 py-1.5 text-sm text-slate-900 hover:bg-slate-200 ${isActive ? 'bg-slate-100' : '' |
|
|
|
class={`flex w-full items-center rounded px-3 py-1.5 text-sm text-slate-900 hover:bg-slate-200 ${ |
|
|
|
|
|
|
|
isActive ? 'bg-slate-100' : '' |
|
|
|
}`}
|
|
|
|
}`}
|
|
|
|
> |
|
|
|
> |
|
|
|
<img |
|
|
|
<img |
|
|
@ -120,9 +119,13 @@ export const TeamSidebar: FunctionalComponent<{ |
|
|
|
</ul> |
|
|
|
</ul> |
|
|
|
)} |
|
|
|
)} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{showFeedbackPopup && <SubmitFeedbackPopup onClose={() => { |
|
|
|
{showFeedbackPopup && ( |
|
|
|
|
|
|
|
<SubmitFeedbackPopup |
|
|
|
|
|
|
|
onClose={() => { |
|
|
|
setShowFeedbackPopup(false); |
|
|
|
setShowFeedbackPopup(false); |
|
|
|
}} />} |
|
|
|
}} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
|
|
|
|
<div class="container flex min-h-screen items-stretch"> |
|
|
|
<div class="container flex min-h-screen items-stretch"> |
|
|
|
<aside class="hidden w-44 shrink-0 border-r border-slate-200 py-10 md:block"> |
|
|
|
<aside class="hidden w-44 shrink-0 border-r border-slate-200 py-10 md:block"> |
|
|
@ -136,7 +139,8 @@ export const TeamSidebar: FunctionalComponent<{ |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<a |
|
|
|
<a |
|
|
|
href={sidebarLink.href} |
|
|
|
href={sidebarLink.href} |
|
|
|
class={`font-regular flex w-full items-center border-r-2 px-2 py-1.5 text-sm ${isActive |
|
|
|
class={`font-regular flex w-full items-center border-r-2 px-2 py-1.5 text-sm ${ |
|
|
|
|
|
|
|
isActive |
|
|
|
? 'border-r-black bg-gray-100 text-black' |
|
|
|
? 'border-r-black bg-gray-100 text-black' |
|
|
|
: 'border-r-transparent text-gray-500 hover:border-r-gray-300' |
|
|
|
: 'border-r-transparent text-gray-500 hover:border-r-gray-300' |
|
|
|
}`}
|
|
|
|
}`}
|
|
|
@ -163,7 +167,8 @@ export const TeamSidebar: FunctionalComponent<{ |
|
|
|
})} |
|
|
|
})} |
|
|
|
</ul> |
|
|
|
</ul> |
|
|
|
|
|
|
|
|
|
|
|
<button className="mr-3 mt-4 flex items-center justify-center rounded-md border p-2 text-gray-500 text-sm hover:text-black transition-colors hover:border-gray-300 hover:bg-gray-50" |
|
|
|
<button |
|
|
|
|
|
|
|
className="mr-3 mt-4 flex items-center justify-center rounded-md border p-2 text-sm text-gray-500 transition-colors hover:border-gray-300 hover:bg-gray-50 hover:text-black" |
|
|
|
onClick={() => setShowFeedbackPopup(true)} |
|
|
|
onClick={() => setShowFeedbackPopup(true)} |
|
|
|
> |
|
|
|
> |
|
|
|
<img src={ChatIcon} className="mr-2 h-4 w-4" /> |
|
|
|
<img src={ChatIcon} className="mr-2 h-4 w-4" /> |
|
|
|