diff --git a/src/shared/composer/modal.tsx b/src/shared/composer/modal.tsx new file mode 100644 index 00000000..0dd9c8f5 --- /dev/null +++ b/src/shared/composer/modal.tsx @@ -0,0 +1,80 @@ +import { ComposeUser } from '@lume/shared/composer/user'; +import CancelIcon from '@lume/shared/icons/cancel'; +import ChevronDownIcon from '@lume/shared/icons/chevronDown'; +import ChevronRightIcon from '@lume/shared/icons/chevronRight'; +import ComposeIcon from '@lume/shared/icons/compose'; +import { useActiveAccount } from '@lume/utils/hooks/useActiveAccount'; + +import { Dialog, Transition } from '@headlessui/react'; +import { Fragment, useState } from 'react'; + +export const ComposerModal = () => { + const [isOpen, setIsOpen] = useState(false); + const { account, isLoading, isError } = useActiveAccount(); + + const closeModal = () => { + setIsOpen(false); + }; + + const openModal = () => { + setIsOpen(true); + }; + + return ( + <> + + + + +
+ +
+ + +
+
+
{!isLoading && !isError && account && }
+ + + + +
+
+ +
+
+
+
+
+
+
+
+ + ); +}; diff --git a/src/shared/composer/user.tsx b/src/shared/composer/user.tsx new file mode 100644 index 00000000..3eed6acc --- /dev/null +++ b/src/shared/composer/user.tsx @@ -0,0 +1,24 @@ +import { Image } from '@lume/shared/image'; +import { DEFAULT_AVATAR, IMGPROXY_URL } from '@lume/stores/constants'; + +export const ComposeUser = ({ data }: { data: any }) => { + const metadata = JSON.parse(data.metadata); + + return ( +
+
+ {data.pubkey} +
+
+ {metadata?.display_name || metadata?.name || ( +
+ )} +
+
+ ); +}; diff --git a/src/shared/icons/chevronDown.tsx b/src/shared/icons/chevronDown.tsx new file mode 100644 index 00000000..a1273c7e --- /dev/null +++ b/src/shared/icons/chevronDown.tsx @@ -0,0 +1,15 @@ +import { SVGProps } from 'react'; + +export default function ChevronDownIcon(props: JSX.IntrinsicAttributes & SVGProps) { + return ( + + + + ); +} diff --git a/src/shared/icons/chevronRight.tsx b/src/shared/icons/chevronRight.tsx new file mode 100644 index 00000000..9dc34d3d --- /dev/null +++ b/src/shared/icons/chevronRight.tsx @@ -0,0 +1,15 @@ +import { SVGProps } from 'react'; + +export default function ChevronRightIcon(props: JSX.IntrinsicAttributes & SVGProps) { + return ( + + + + ); +} diff --git a/src/shared/navigation.tsx b/src/shared/navigation.tsx index 27aac42c..b4654a9c 100644 --- a/src/shared/navigation.tsx +++ b/src/shared/navigation.tsx @@ -1,8 +1,8 @@ import ChannelsList from '@lume/app/channel/components/list'; import ChatsList from '@lume/app/chat/components/list'; import ActiveLink from '@lume/shared/activeLink'; +import { ComposerModal } from '@lume/shared/composer/modal'; import EventCollector from '@lume/shared/eventCollector'; -import ComposeIcon from '@lume/shared/icons/compose'; import MyspaceIcon from '@lume/shared/icons/myspace'; import NavArrowDownIcon from '@lume/shared/icons/navArrowDown'; import ThreadsIcon from '@lume/shared/icons/threads'; @@ -14,10 +14,7 @@ export default function Navigation() { return (
- +
{/* Newsfeed */} diff --git a/tailwind.config.js b/tailwind.config.js index 2a8938c3..f168f4f9 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -36,6 +36,12 @@ module.exports = { rgb(74, 4, 78) 0px 0px 0px 1px, rgba(255, 255, 255, 0.2) 0px 0px 0px 1px inset `, + 'mini-button': ` + rgba(13, 16, 23, 0.36) 0px 2px 8px, + rgba(13, 16, 23, 0.36) 0px 2px 4px, + rgba(13, 16, 23, 0.36) 0px 0px 0px 1px, + rgba(255, 255, 255, 0.1) 0px 0px 0px 1px inset + `, }, backgroundColor: { 'near-black': '#07070d',