mirror of
https://github.com/BillyOutlast/posthog.com.git
synced 2026-02-04 03:11:21 +01:00
fixed syntax error
This commit is contained in:
@@ -101,8 +101,9 @@ export default function TaskBarMenu() {
|
||||
{avatarURL ? (
|
||||
<CloudinaryImage
|
||||
src={avatarURL}
|
||||
imgClassName={`size-6 rounded-full overflow-hidden bg-${user?.profile?.color ?? 'white dark:bg-dark'
|
||||
}`}
|
||||
imgClassName={`size-6 rounded-full overflow-hidden bg-${
|
||||
user?.profile?.color ?? 'white dark:bg-dark'
|
||||
}`}
|
||||
width={48}
|
||||
alt=""
|
||||
/>
|
||||
@@ -121,72 +122,39 @@ export default function TaskBarMenu() {
|
||||
),
|
||||
items: user
|
||||
? [
|
||||
{
|
||||
type: 'item' as const,
|
||||
label: 'Go to...',
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
type: 'item' as const,
|
||||
label: 'PostHog app',
|
||||
link: 'https://app.posthog.com',
|
||||
icon: <IconApp className="opacity-50 group-hover/item:opacity-75 size-4" />,
|
||||
external: true,
|
||||
},
|
||||
{
|
||||
type: 'item' as const,
|
||||
label: 'Community',
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
type: 'item' as const,
|
||||
label: 'Forums',
|
||||
link: '/questions',
|
||||
icon: <IconMessage className="opacity-50 group-hover/item:opacity-75 size-4" />,
|
||||
},
|
||||
...(user?.profile
|
||||
? [
|
||||
{
|
||||
type: 'item' as const,
|
||||
label: `Notifications${notifications?.length > 0 ? ` (${notifications.length})` : ''
|
||||
{
|
||||
type: 'item' as const,
|
||||
label: 'Go to...',
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
type: 'item' as const,
|
||||
label: 'PostHog app',
|
||||
link: 'https://app.posthog.com',
|
||||
icon: <IconApp className="opacity-50 group-hover/item:opacity-75 size-4" />,
|
||||
external: true,
|
||||
},
|
||||
{
|
||||
type: 'item' as const,
|
||||
label: 'Community',
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
type: 'item' as const,
|
||||
label: 'Forums',
|
||||
link: '/questions',
|
||||
icon: <IconMessage className="opacity-50 group-hover/item:opacity-75 size-4" />,
|
||||
},
|
||||
...(user?.profile
|
||||
? [
|
||||
{
|
||||
type: 'item' as const,
|
||||
label: `Notifications${
|
||||
notifications?.length > 0 ? ` (${notifications.length})` : ''
|
||||
}`,
|
||||
onClick: () => setIsNotificationsPanelOpen(true),
|
||||
icon: (
|
||||
<IconNotification className="opacity-50 group-hover/item:opacity-75 size-4" />
|
||||
),
|
||||
},
|
||||
{
|
||||
type: 'item' as const,
|
||||
label: 'My profile',
|
||||
link: `/community/profiles/${user?.profile.id}`,
|
||||
icon: <IconUser className="opacity-50 group-hover/item:opacity-75 size-4" />,
|
||||
},
|
||||
{
|
||||
type: 'item' as const,
|
||||
label: 'Bookmarks',
|
||||
link: '/bookmarks',
|
||||
icon: <IconBookmark className="opacity-50 group-hover/item:opacity-75 size-4" />,
|
||||
},
|
||||
]
|
||||
: []),
|
||||
...(isModerator
|
||||
? [
|
||||
{
|
||||
type: 'item' as const,
|
||||
label: 'Moderator tools',
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
type: 'item' as const,
|
||||
label: 'Upload media',
|
||||
icon: <IconUpload className="opacity-50 group-hover/item:opacity-75 size-4" />,
|
||||
onClick: () =>
|
||||
addWindow(
|
||||
<MediaUploadModal
|
||||
newWindow
|
||||
location={{ pathname: `media-upload` }}
|
||||
key={`media-upload`}
|
||||
/>
|
||||
onClick: () => setIsNotificationsPanelOpen(true),
|
||||
icon: (
|
||||
<IconNotification className="opacity-50 group-hover/item:opacity-75 size-4" />
|
||||
),
|
||||
},
|
||||
{
|
||||
@@ -203,6 +171,40 @@ export default function TaskBarMenu() {
|
||||
},
|
||||
]
|
||||
: []),
|
||||
...(isModerator
|
||||
? [
|
||||
{
|
||||
type: 'item' as const,
|
||||
label: 'Moderator tools',
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
type: 'item' as const,
|
||||
label: 'Upload media',
|
||||
icon: <IconUpload className="opacity-50 group-hover/item:opacity-75 size-4" />,
|
||||
onClick: () =>
|
||||
addWindow(
|
||||
<MediaUploadModal
|
||||
newWindow
|
||||
location={{ pathname: `media-upload` }}
|
||||
key={`media-upload`}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
type: 'item' as const,
|
||||
label: 'My profile',
|
||||
link: `/community/profiles/${user?.profile.id}`,
|
||||
icon: <IconUser className="opacity-50 group-hover/item:opacity-75 size-4" />,
|
||||
},
|
||||
{
|
||||
type: 'item' as const,
|
||||
label: 'Bookmarks',
|
||||
link: '/bookmarks',
|
||||
icon: <IconBookmark className="opacity-50 group-hover/item:opacity-75 size-4" />,
|
||||
},
|
||||
]
|
||||
: []),
|
||||
...(isModerator
|
||||
? [
|
||||
{
|
||||
@@ -248,32 +250,32 @@ export default function TaskBarMenu() {
|
||||
},
|
||||
]
|
||||
: [
|
||||
{
|
||||
type: 'item' as const,
|
||||
label: 'Community',
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
type: 'item' as const,
|
||||
label: 'Sign in to PostHog.com',
|
||||
onClick: handleSignInClick,
|
||||
},
|
||||
{
|
||||
type: 'separator' as const,
|
||||
},
|
||||
{
|
||||
type: 'item' as const,
|
||||
label: 'Go to...',
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
type: 'item' as const,
|
||||
label: 'PostHog app',
|
||||
link: 'https://app.posthog.com',
|
||||
icon: <IconApp className="opacity-50 group-hover/item:opacity-75 size-4" />,
|
||||
external: true,
|
||||
},
|
||||
],
|
||||
{
|
||||
type: 'item' as const,
|
||||
label: 'Community',
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
type: 'item' as const,
|
||||
label: 'Sign in to PostHog.com',
|
||||
onClick: handleSignInClick,
|
||||
},
|
||||
{
|
||||
type: 'separator' as const,
|
||||
},
|
||||
{
|
||||
type: 'item' as const,
|
||||
label: 'Go to...',
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
type: 'item' as const,
|
||||
label: 'PostHog app',
|
||||
link: 'https://app.posthog.com',
|
||||
icon: <IconApp className="opacity-50 group-hover/item:opacity-75 size-4" />,
|
||||
external: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
@@ -283,10 +285,15 @@ export default function TaskBarMenu() {
|
||||
ref={taskbarRef}
|
||||
id="taskbar"
|
||||
data-scheme="primary"
|
||||
className={`w-full bg-accent/75 skin-classic:bg-accent wallpaper-keyboard-garden:dark:bg-black/15 backdrop-blur border-b border-primary top-0 z-50 pl-0.5 pr-2 ${websiteMode ? 'sticky top-0' : 'bg-accent/75'
|
||||
}`}
|
||||
className={`w-full bg-accent/75 skin-classic:bg-accent wallpaper-keyboard-garden:dark:bg-black/15 backdrop-blur border-b border-primary top-0 z-50 pl-0.5 pr-2 ${
|
||||
websiteMode ? 'sticky top-0' : 'bg-accent/75'
|
||||
}`}
|
||||
>
|
||||
<div className={`mx-auto transition-all duration-300 flex justify-between items-center w-full ${websiteMode ? 'max-w-7xl' : 'max-w-full'}`}>
|
||||
<div
|
||||
className={`mx-auto transition-all duration-300 flex justify-between items-center w-full ${
|
||||
websiteMode ? 'max-w-7xl' : 'max-w-full'
|
||||
}`}
|
||||
>
|
||||
<MenuBar
|
||||
menus={menuData}
|
||||
className="[&_button]:px-2 [&_button:not(:first-child)]:hidden md:[&_button:not(:first-child)]:flex"
|
||||
@@ -323,48 +330,20 @@ export default function TaskBarMenu() {
|
||||
]}
|
||||
className="[&_button]:px-2"
|
||||
/> */}
|
||||
<div className="relative mr-1">
|
||||
<OSButton
|
||||
variant="primary"
|
||||
size="md"
|
||||
asLink
|
||||
to={posthogInstance ? posthogInstance.replace(/"/g, '') : 'https://app.posthog.com/signup'}
|
||||
className=""
|
||||
>
|
||||
{posthogInstance ? 'Dashboard' : 'Get started – free'}
|
||||
</OSButton>
|
||||
</div>
|
||||
<Tooltip
|
||||
trigger={
|
||||
<OSButton onClick={() => openSearch()} size="sm" className="relative top-px">
|
||||
<IconSearch className="size-5" />
|
||||
</OSButton>
|
||||
}
|
||||
>
|
||||
<div className="flex flex-col items-center gap-1">
|
||||
<p className="text-sm mb-0">Search</p>
|
||||
<KeyboardShortcut text="/" size="sm" />
|
||||
</div>
|
||||
</Tooltip>
|
||||
<Tooltip
|
||||
trigger={
|
||||
<div className="relative mr-1">
|
||||
<OSButton
|
||||
variant="secondary"
|
||||
variant="primary"
|
||||
size="md"
|
||||
asLink
|
||||
to={posthogInstance ? posthogInstance.replace(/"/g, '') : 'https://app.posthog.com/signup'}
|
||||
to={
|
||||
posthogInstance
|
||||
? posthogInstance.replace(/"/g, '')
|
||||
: 'https://app.posthog.com/signup'
|
||||
}
|
||||
className=""
|
||||
>
|
||||
{posthogInstance ? 'Dashboard' : 'Get started – free'}
|
||||
</OSButton>
|
||||
}
|
||||
>
|
||||
<div className="flex flex-col items-center gap-1">
|
||||
<p className="text-sm mb-0">Ask PostHog AI</p>
|
||||
<div className="flex items-center gap-1">
|
||||
<KeyboardShortcut text="Shift" size="sm" />
|
||||
<KeyboardShortcut text="?" size="sm" />
|
||||
</div>
|
||||
</div>
|
||||
<Tooltip
|
||||
trigger={
|
||||
@@ -402,9 +381,9 @@ export default function TaskBarMenu() {
|
||||
animate={
|
||||
isAnimating
|
||||
? {
|
||||
scale: [1, 1.2, 1],
|
||||
rotate: [0, -5, 5, -5, 5, 0],
|
||||
}
|
||||
scale: [1, 1.2, 1],
|
||||
rotate: [0, -5, 5, -5, 5, 0],
|
||||
}
|
||||
: {}
|
||||
}
|
||||
transition={{
|
||||
@@ -433,10 +412,11 @@ export default function TaskBarMenu() {
|
||||
dark:text-primary
|
||||
hover:text-primary
|
||||
|
||||
${totalWindows > 1
|
||||
? 'bg-light dark:bg-dark border-[#4d4f46] dark:border-[#eaecf6]'
|
||||
: 'bg-accent border-primary dark:border-[#eaecf6]'
|
||||
}
|
||||
${
|
||||
totalWindows > 1
|
||||
? 'bg-light dark:bg-dark border-[#4d4f46] dark:border-[#eaecf6]'
|
||||
: 'bg-accent border-primary dark:border-[#eaecf6]'
|
||||
}
|
||||
`}
|
||||
>
|
||||
<span className="text-[13px] font-semibold relative -top-px">
|
||||
@@ -471,13 +451,16 @@ export default function TaskBarMenu() {
|
||||
dark:text-primary
|
||||
hover:text-primary
|
||||
|
||||
${totalWindows > 1
|
||||
? 'bg-light dark:bg-dark border-[#4d4f46] dark:border-[#eaecf6]'
|
||||
: 'bg-accent border-primary dark:border-[#eaecf6]'
|
||||
}
|
||||
${
|
||||
totalWindows > 1
|
||||
? 'bg-light dark:bg-dark border-[#4d4f46] dark:border-[#eaecf6]'
|
||||
: 'bg-accent border-primary dark:border-[#eaecf6]'
|
||||
}
|
||||
`}
|
||||
>
|
||||
<span className="text-[13px] font-semibold relative -top-px">{totalWindows}</span>
|
||||
<span className="text-[13px] font-semibold relative -top-px">
|
||||
{totalWindows}
|
||||
</span>
|
||||
</button>
|
||||
)}
|
||||
</motion.div>
|
||||
|
||||
Reference in New Issue
Block a user