+
{t('create_chat')}
+ {slugs().length > 2 && (
+
+ )}
+
+
+
+ {(author) => (
+ handleClick(author)} author={author} selected={author.selected} />
+ )}
+
+
+
+
+
+ )
+}
+
+export default CreateModalContent
diff --git a/src/components/Inbox/DialogCard.tsx b/src/components/Inbox/DialogCard.tsx
index dcfb7021..a9a4dcd3 100644
--- a/src/components/Inbox/DialogCard.tsx
+++ b/src/components/Inbox/DialogCard.tsx
@@ -14,19 +14,9 @@ type DialogProps = {
}
const DialogCard = (props: DialogProps) => {
- const { chatEntities, actions } = useInbox()
- const handleOpenChat = async () => {
- try {
- const initChat = await actions.createChat([props.author.slug, props.ownSlug])
- console.debug('[initChat]', initChat)
- } catch (error) {
- console.error(error)
- }
- }
-
return (
//DialogCardView - подумать
-
+
diff --git a/src/components/Inbox/InviteUser.module.scss b/src/components/Inbox/InviteUser.module.scss
new file mode 100644
index 00000000..6f4804ac
--- /dev/null
+++ b/src/components/Inbox/InviteUser.module.scss
@@ -0,0 +1,35 @@
+.InviteUser {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ flex-basis: 0;
+ flex-grow: 1;
+ min-width: 0;
+ padding: 12px;
+ gap: 10px;
+ cursor: pointer;
+ transition: all 0.3s ease-in-out;
+
+ &:hover {
+ background: rgba(#f7f7f7, 0.65);
+ }
+
+ .name {
+ flex-grow: 1;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ font-weight: 500;
+ font-size: 14px;
+ }
+
+ .action {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 24px;
+ height: 24px;
+ background: #f7f7f7;
+ border-radius: 6px;
+ }
+}
diff --git a/src/components/Inbox/InviteUser.tsx b/src/components/Inbox/InviteUser.tsx
new file mode 100644
index 00000000..4fe85ed8
--- /dev/null
+++ b/src/components/Inbox/InviteUser.tsx
@@ -0,0 +1,22 @@
+import styles from './InviteUser.module.scss'
+import DialogAvatar from './DialogAvatar'
+import type { Author } from '../../graphql/types.gen'
+import { Icon } from '../_shared/Icon'
+
+type DialogProps = {
+ author: Author
+ selected: boolean
+ onClick: () => void
+}
+
+const InviteUser = (props: DialogProps) => {
+ return (
+
+
+
{props.author.name}
+
{props.selected ? : }
+
+ )
+}
+
+export default InviteUser
diff --git a/src/components/Inbox/Search.module.scss b/src/components/Inbox/Search.module.scss
index 207ad6a6..a92c66bc 100644
--- a/src/components/Inbox/Search.module.scss
+++ b/src/components/Inbox/Search.module.scss
@@ -8,7 +8,7 @@
input {
display: block;
- height: 40px;
+ height: 36px;
border: none;
box-shadow: none;
padding: 10px 36px 10px 12px;
@@ -38,7 +38,7 @@
position: absolute;
width: 16px;
height: 16px;
- top: 12px;
+ top: 10px;
right: 12px;
opacity: 0.5;
}
diff --git a/src/components/Nav/Header.tsx b/src/components/Nav/Header.tsx
index d90cd6df..d1262857 100644
--- a/src/components/Nav/Header.tsx
+++ b/src/components/Nav/Header.tsx
@@ -84,7 +84,7 @@ export const Header = (props: Props) => {
[styles.headerWithTitle]: Boolean(props.title)
}}
>
-
+
diff --git a/src/components/Nav/Modal.scss b/src/components/Nav/Modal.module.scss
similarity index 75%
rename from src/components/Nav/Modal.scss
rename to src/components/Nav/Modal.module.scss
index 8c7bc2f0..746202e0 100644
--- a/src/components/Nav/Modal.scss
+++ b/src/components/Nav/Modal.module.scss
@@ -1,4 +1,4 @@
-.modalwrap {
+.backdrop {
align-items: center;
background: rgb(20 20 20 / 70%);
display: flex;
@@ -10,9 +10,16 @@
position: fixed;
top: 0;
width: 100%;
- z-index: 10;
+ z-index: 100;
+}
- .close-control {
+.modal {
+ background: #fff;
+ max-width: 1000px;
+ position: relative;
+ width: 80%;
+
+ .close {
position: absolute;
top: 1em;
cursor: pointer;
@@ -41,19 +48,16 @@
// top: 11em;
}
}
-}
-.modalwrap__inner {
- background: #fff;
- max-width: 1000px;
- position: relative;
- width: 80%;
-}
-
-.modalwrap__content {
- padding: $container-padding-x;
-
- @media (min-width: 800px) and (max-width: 991px) {
- padding: 10rem 6rem;
+ &.narrow {
+ max-width: 460px;
+ width: 50%;
+ @media (min-width: 800px) and (max-width: 991px) {
+ width: 80%;
+ }
+ .close {
+ right: 12px;
+ top: 12px;
+ }
}
}
diff --git a/src/components/Nav/Modal.tsx b/src/components/Nav/Modal.tsx
index 2ebe709d..51b55eac 100644
--- a/src/components/Nav/Modal.tsx
+++ b/src/components/Nav/Modal.tsx
@@ -1,22 +1,24 @@
import { createEffect, createSignal, Show } from 'solid-js'
import type { JSX } from 'solid-js'
import { getLogger } from '../../utils/logger'
-import './Modal.scss'
import { hideModal, useModalStore } from '../../stores/ui'
import { useEscKeyDownHandler } from '../../utils/useEscKeyDownHandler'
+import { clsx } from 'clsx'
+import styles from './Modal.module.scss'
const log = getLogger('modal')
interface ModalProps {
name: string
+ variant: 'narrow' | 'wide'
children: JSX.Element
}
export const Modal = (props: ModalProps) => {
const { modal } = useModalStore()
- const wrapClick = (event: { target: Element }) => {
- if (event.target.classList.contains('modalwrap')) hideModal()
+ const backdropClick = (event: Event) => {
+ hideModal()
}
useEscKeyDownHandler(() => hideModal())
@@ -30,10 +32,16 @@ export const Modal = (props: ModalProps) => {
return (
-
-
+
+
event.stopPropagation()}
+ >
{props.children}
-
+