diff --git a/net/web/src/session/Session.jsx b/net/web/src/session/Session.jsx index daf90673..c4085d8f 100644 --- a/net/web/src/session/Session.jsx +++ b/net/web/src/session/Session.jsx @@ -1,12 +1,22 @@ import { useEffect, useContext } from 'react'; +import { Drawer } from 'antd'; import { useNavigate } from 'react-router-dom'; import { SessionWrapper } from './Session.styled'; -import { Button } from 'antd'; import { AppContext } from 'context/AppContext'; import { ViewportContext } from 'context/ViewportContext'; +import { useSession } from './useSession.hook'; +import { Conversation } from './conversation/Conversation'; +import { Details } from './details/Details'; +import { Identity } from './identity/Identity'; +import { Channels } from './channels/Channels'; +import { Cards } from './cards/Cards'; +import { Contact } from './contact/Contact'; +import { Profile } from './profile/Profile'; +import { Welcome } from './welcome/Welcome'; export function Session() { + const { state, actions } = useSession(); const app = useContext(AppContext); const viewport = useContext(ViewportContext); const navigate = useNavigate(); @@ -23,17 +33,108 @@ export function Session() { { (viewport.state.display === 'xlarge') && (
- +
+ + +
+
+ { state.conversation && ( +
+ +
+ )} + { state.contact && ( +
+ +
+ )} + { state.profile && ( +
+ +
+ )} +
+
+ + { state.conversation && ( +
+
+
+ )} + { state.cards && ( +
+ +
+ )} +
)} { (viewport.state.display === 'large' || viewport.state.display === 'medium') && (
- +
+ + +
+
+ + { state.conversation && ( +
+ +
+ )} + + { state.details && ( +
+ )} + + + { state.cards && ( + + )} + + { state.contact && ( + + )} + + + + { state.profile && ( + + )} + +
)} { (viewport.state.display === 'small') && (
- +
+ + { state.conversation && ( +
+ +
+ )} + { state.details && ( +
+
+
+ )} + { state.cards && ( +
+ +
+ )} + { state.contact && ( +
+ +
+ )} + { state.profile && ( +
+ +
+ )} +
)}
diff --git a/net/web/src/session/Session.styled.js b/net/web/src/session/Session.styled.js index 775e438a..2f339dbd 100644 --- a/net/web/src/session/Session.styled.js +++ b/net/web/src/session/Session.styled.js @@ -4,12 +4,30 @@ export const SessionWrapper = styled.div` height: 100%; width: 100%; + .reframe { + position: absolute; + width: 100%; + height: 100%; + } + .desktop-layout { + .left { + } + .center { + } + .right { + } } .tablet-layout { + .left { + } + .right { + } } .mobile-layout { + .center { + } } `; diff --git a/net/web/src/session/cards/Cards.jsx b/net/web/src/session/cards/Cards.jsx new file mode 100644 index 00000000..a9f18de8 --- /dev/null +++ b/net/web/src/session/cards/Cards.jsx @@ -0,0 +1,4 @@ +export function Cards() { + return
CARDS
+} + diff --git a/net/web/src/session/channels/Channels.jsx b/net/web/src/session/channels/Channels.jsx new file mode 100644 index 00000000..ff7d2e40 --- /dev/null +++ b/net/web/src/session/channels/Channels.jsx @@ -0,0 +1,4 @@ +export function Channels() { + return <> +} + diff --git a/net/web/src/session/contact/Contact.jsx b/net/web/src/session/contact/Contact.jsx new file mode 100644 index 00000000..abb5080d --- /dev/null +++ b/net/web/src/session/contact/Contact.jsx @@ -0,0 +1,4 @@ +export function Contact() { + return
CONTACT
+} + diff --git a/net/web/src/session/conversation/Conversation.jsx b/net/web/src/session/conversation/Conversation.jsx new file mode 100644 index 00000000..469194bc --- /dev/null +++ b/net/web/src/session/conversation/Conversation.jsx @@ -0,0 +1,4 @@ +export function Conversation() { + return <> +} + diff --git a/net/web/src/session/details/Details.jsx b/net/web/src/session/details/Details.jsx new file mode 100644 index 00000000..e6c27388 --- /dev/null +++ b/net/web/src/session/details/Details.jsx @@ -0,0 +1,4 @@ +export function Details() { + return <> +} + diff --git a/net/web/src/session/identity/Identity.jsx b/net/web/src/session/identity/Identity.jsx new file mode 100644 index 00000000..e157f8cf --- /dev/null +++ b/net/web/src/session/identity/Identity.jsx @@ -0,0 +1,11 @@ +import { useContext } from 'react'; +import { AppContext } from 'context/AppContext'; +import { Button } from 'antd'; + +export function Identity() { + + const app = useContext(AppContext); + + return +} + diff --git a/net/web/src/session/profile/Profile.jsx b/net/web/src/session/profile/Profile.jsx new file mode 100644 index 00000000..43a48bfb --- /dev/null +++ b/net/web/src/session/profile/Profile.jsx @@ -0,0 +1,4 @@ +export function Profile() { + return <> +} + diff --git a/net/web/src/session/useSession.hook.js b/net/web/src/session/useSession.hook.js new file mode 100644 index 00000000..307b5811 --- /dev/null +++ b/net/web/src/session/useSession.hook.js @@ -0,0 +1,46 @@ +import { useState, useEffect } from 'react'; + +export function useSession() { + + const [state, setState] = useState({ + conversation: false, + details: false, + cards: false, + contact: false, + profile: false, + }); + + const updateState = (value) => { + setState((s) => ({ ...s, ...value })); + } + + useEffect(() => { + setTimeout(() => { + updateState({ cards: true }); + }, 1000); + setTimeout(() => { + updateState({ contact: true }); + }, 2000); + }, []); + + const actions = { + closeDetails: () => { + updateState({ details: false }); + }, + closeCards: () => { + updateState({ cards: false }); + }, + closeContact: () => { + updateState({ contact: false }); + }, + closeProfile: () => { + updateState({ profile: false }); + }, + closeConversation: () => { + updateState({ conversation: false }); + }, + }; + + return { state, actions }; +} + diff --git a/net/web/src/session/welcome/Welcome.jsx b/net/web/src/session/welcome/Welcome.jsx new file mode 100644 index 00000000..b7a9c4bd --- /dev/null +++ b/net/web/src/session/welcome/Welcome.jsx @@ -0,0 +1,4 @@ +export function Welcome() { + return <>; +} +