From ab635c0460b156760bf210b3ecc19b9b8e349637 Mon Sep 17 00:00:00 2001 From: Ren Amamiya <123083837+reyamir@users.noreply.github.com> Date: Sat, 22 Apr 2023 09:26:18 +0700 Subject: [PATCH] added create channel page and refactor layout --- src/app/nostr/channel/layout.tsx | 14 ++++++++++++ src/app/nostr/chat/layout.tsx | 14 ++++++++++++ src/app/nostr/create-channel/layout.tsx | 14 ++++++++++++ src/app/nostr/create-channel/page.tsx | 8 +++++++ src/app/nostr/layout.tsx | 18 +-------------- src/app/nostr/newsfeed/layout.tsx | 22 +++++++++++++++++++ src/app/nostr/user/layout.tsx | 14 ++++++++++++ src/components/channels/channelList.tsx | 29 ++++++++++++------------- src/components/multiAccounts/index.tsx | 2 +- 9 files changed, 102 insertions(+), 33 deletions(-) create mode 100644 src/app/nostr/channel/layout.tsx create mode 100644 src/app/nostr/chat/layout.tsx create mode 100644 src/app/nostr/create-channel/layout.tsx create mode 100644 src/app/nostr/create-channel/page.tsx create mode 100644 src/app/nostr/newsfeed/layout.tsx create mode 100644 src/app/nostr/user/layout.tsx diff --git a/src/app/nostr/channel/layout.tsx b/src/app/nostr/channel/layout.tsx new file mode 100644 index 00000000..a1f2e612 --- /dev/null +++ b/src/app/nostr/channel/layout.tsx @@ -0,0 +1,14 @@ +import Navigation from '@components/navigation'; + +export default function ChannelLayout({ children }: { children: React.ReactNode }) { + return ( +
+
+ +
+
+
{children}
+
+
+ ); +} diff --git a/src/app/nostr/chat/layout.tsx b/src/app/nostr/chat/layout.tsx new file mode 100644 index 00000000..e9cc8953 --- /dev/null +++ b/src/app/nostr/chat/layout.tsx @@ -0,0 +1,14 @@ +import Navigation from '@components/navigation'; + +export default function ChatLayout({ children }: { children: React.ReactNode }) { + return ( +
+
+ +
+
+
{children}
+
+
+ ); +} diff --git a/src/app/nostr/create-channel/layout.tsx b/src/app/nostr/create-channel/layout.tsx new file mode 100644 index 00000000..64aa6c53 --- /dev/null +++ b/src/app/nostr/create-channel/layout.tsx @@ -0,0 +1,14 @@ +import Navigation from '@components/navigation'; + +export default function CreateChannelLayout({ children }: { children: React.ReactNode }) { + return ( +
+
+ +
+
+
{children}
+
+
+ ); +} diff --git a/src/app/nostr/create-channel/page.tsx b/src/app/nostr/create-channel/page.tsx new file mode 100644 index 00000000..ed162df8 --- /dev/null +++ b/src/app/nostr/create-channel/page.tsx @@ -0,0 +1,8 @@ +export default function Page() { + return ( +
+

My page

+

My page content

+
+ ); +} diff --git a/src/app/nostr/layout.tsx b/src/app/nostr/layout.tsx index 0da145e3..ba210383 100644 --- a/src/app/nostr/layout.tsx +++ b/src/app/nostr/layout.tsx @@ -1,6 +1,5 @@ import AppHeader from '@components/appHeader'; import MultiAccounts from '@components/multiAccounts'; -import Navigation from '@components/navigation'; export default function NostrLayout({ children }: { children: React.ReactNode }) { return ( @@ -16,22 +15,7 @@ export default function NostrLayout({ children }: { children: React.ReactNode })
-
-
- -
-
-
{children}
-
-
-
-

- This feature hasn't implemented yet, so resize Lume to the initial size for a better experience. - I'm sorry for this inconvenience, and I swear I will add it soon 😁 -

-
-
-
+ {children} diff --git a/src/app/nostr/newsfeed/layout.tsx b/src/app/nostr/newsfeed/layout.tsx new file mode 100644 index 00000000..834f131b --- /dev/null +++ b/src/app/nostr/newsfeed/layout.tsx @@ -0,0 +1,22 @@ +import Navigation from '@components/navigation'; + +export default function ChannelLayout({ children }: { children: React.ReactNode }) { + return ( +
+
+ +
+
+
{children}
+
+
+
+

+ This feature hasn't implemented yet, so resize Lume to the initial size for a better experience. + I'm sorry for this inconvenience, and I swear I will add it soon 😁 +

+
+
+
+ ); +} diff --git a/src/app/nostr/user/layout.tsx b/src/app/nostr/user/layout.tsx new file mode 100644 index 00000000..b11d422f --- /dev/null +++ b/src/app/nostr/user/layout.tsx @@ -0,0 +1,14 @@ +import Navigation from '@components/navigation'; + +export default function UserLayout({ children }: { children: React.ReactNode }) { + return ( +
+
+ +
+
+
{children}
+
+
+ ); +} diff --git a/src/components/channels/channelList.tsx b/src/components/channels/channelList.tsx index e6ecb109..f09f3377 100644 --- a/src/components/channels/channelList.tsx +++ b/src/components/channels/channelList.tsx @@ -1,8 +1,9 @@ import { ChannelListItem } from '@components/channels/channelListItem'; -import { CreateChannelModal } from '@components/channels/createChannelModal'; import { DEFAULT_CHANNELS } from '@stores/constants'; +import { Plus } from 'iconoir-react'; +import Link from 'next/link'; import { useState } from 'react'; export default function ChannelList() { @@ -10,23 +11,21 @@ export default function ChannelList() { return (
- {/* - -
- -
-
-
Browse channels
-
- - */} {list.map((item) => ( ))} - + +
+ +
+
+
Add a new channel
+
+
); } diff --git a/src/components/multiAccounts/index.tsx b/src/components/multiAccounts/index.tsx index 853b1623..b305c6b3 100644 --- a/src/components/multiAccounts/index.tsx +++ b/src/components/multiAccounts/index.tsx @@ -40,7 +40,7 @@ export default function MultiAccounts() {