Add temp save buttons for settings, reorder chats

This commit is contained in:
Sacha Weatherstone
2022-02-13 22:40:54 +11:00
parent 97d3ecb80b
commit b98af7caca
10 changed files with 292 additions and 323 deletions
+12 -12
View File
@@ -38,12 +38,12 @@ export const Messages = (): JSX.Element => {
icon={<FiMessageCircle />}
sidebarContents={
<div className="flex flex-col gap-2">
{nodes
.filter((node) => node.number !== myNodeNum)
.map((node) => (
<DmChat
key={node.number}
node={node}
{channels
.filter((channel) => channel.settings?.name !== 'admin')
.map((channel) => (
<ChannelChat
key={channel.index}
channel={channel}
selectedIndex={selectedChatIndex}
setSelectedIndex={setSelectedChatIndex}
/>
@@ -51,12 +51,12 @@ export const Messages = (): JSX.Element => {
{nodes.length !== 0 && channels.length !== 0 && (
<div className="mx-2 rounded-md border-2 border-gray-300 dark:border-gray-600" />
)}
{channels
.filter((channel) => channel.settings?.name !== 'admin')
.map((channel) => (
<ChannelChat
key={channel.index}
channel={channel}
{nodes
.filter((node) => node.number !== myNodeNum)
.map((node) => (
<DmChat
key={node.number}
node={node}
selectedIndex={selectedChatIndex}
setSelectedIndex={setSelectedChatIndex}
/>
+8 -1
View File
@@ -116,7 +116,14 @@ export const NodeCard = ({
direction="x"
>
<CollapsibleSection title="User" icon={<FiUser />}>
<div>Info</div>
<div className="flex p-2">
<div className="m-auto flex flex-col gap-2">
<Hashicon value={node.number.toString()} size={180} />
<div className="text-center text-lg font-medium dark:text-white">
{node?.user?.longName || 'Unknown'}
</div>
</div>
</div>
</CollapsibleSection>
<CollapsibleSection title="Location" icon={<FiMapPin />}>
<div>Info</div>