-
-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'mobile-app' into rav-22-image-viewer
- Loading branch information
Showing
24 changed files
with
421 additions
and
320 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,112 +1,53 @@ | ||
import { View } from 'react-native'; | ||
import { Pressable, SafeAreaView, ScrollView, View } from 'react-native'; | ||
import { ThemeToggle } from '@components/nativewindui/ThemeToggle'; | ||
import { Text } from '@components/nativewindui/Text'; | ||
import { useColorScheme } from '@hooks/useColorScheme'; | ||
import PlusIcon from '@assets/icons/PlusIcon.svg'; | ||
import { SearchInput } from '@components/nativewindui/SearchInput'; | ||
import ChannelList from '@components/features/chat/ChannelList/ChannelList'; | ||
import DMList from '@components/features/chat/DMList/DMList'; | ||
|
||
export default function Home() { | ||
|
||
const { colors } = useColorScheme() | ||
|
||
return ( | ||
<SafeAreaView style={{ flex: 1, backgroundColor: colors.primary }}> | ||
<View style={{ backgroundColor: colors.primary }} className="flex flex-col px-4 pb-4 pt-2 gap-2"> | ||
<View className='flex-row items-center justify-between'> | ||
<Pressable onPress={() => console.log('Workspace pressed')}> | ||
<Text className="text-white font-bold">Workspace</Text> | ||
</Pressable> | ||
<ThemeToggle /> | ||
</View> | ||
<SearchInput /> | ||
</View> | ||
<ScrollView style={{ backgroundColor: colors.background }} className="rounded-t-[2rem]"> | ||
<View className="flex flex-col"> | ||
<ChannelList /> | ||
<Divider /> | ||
<DMList /> | ||
<Divider /> | ||
<Pressable className='flex-row items-center p-5 rounded-lg' | ||
onPress={() => console.log('Create channel pressed')}> | ||
<PlusIcon fill={colors.icon} height={18} width={18} /> | ||
<Text className='ml-3 text-[16px]'>Add teammates</Text> | ||
</Pressable> | ||
</View> | ||
</ScrollView> | ||
</SafeAreaView> | ||
) | ||
} | ||
|
||
const Divider = () => { | ||
const { colors } = useColorScheme() | ||
return ( | ||
<View className="flex flex-col gap-4"> | ||
<ThemeToggle /> | ||
<ChannelList | ||
channels={[ | ||
{ | ||
name: "channel_001", | ||
channel_name: "general", | ||
type: "Public", | ||
channel_description: "A channel for general discussions.", | ||
is_direct_message: 0, | ||
is_self_message: 0, | ||
is_archived: 0, | ||
creation: "2024-01-01T12:00:00Z", | ||
owner: "user_001", | ||
last_message_details: { | ||
sender: "user_002", | ||
content: "Hello everyone!", | ||
}, | ||
last_message_timestamp: "2024-12-01T10:00:00Z", | ||
}, | ||
{ | ||
name: "channel_002", | ||
channel_name: "announcements", | ||
type: "Open", | ||
channel_description: "Official announcements and updates.", | ||
is_direct_message: 0, | ||
is_self_message: 0, | ||
is_archived: 0, | ||
creation: "2024-01-10T15:00:00Z", | ||
owner: "user_003", | ||
last_message_details: { | ||
sender: "admin", | ||
content: "Welcome to the new announcements channel!", | ||
}, | ||
last_message_timestamp: "2024-12-05T14:30:00Z", | ||
}, | ||
{ | ||
name: "channel_003", | ||
channel_name: "team-alpha", | ||
type: "Private", | ||
channel_description: "A private channel for Team Alpha members.", | ||
is_direct_message: 0, | ||
is_self_message: 0, | ||
is_archived: 0, | ||
creation: "2024-02-15T10:00:00Z", | ||
owner: "user_004", | ||
last_message_details: { | ||
sender: "user_005", | ||
content: "Let's finalize the project timeline.", | ||
}, | ||
last_message_timestamp: "2024-12-10T09:15:00Z", | ||
}, | ||
{ | ||
name: "channel_004", | ||
channel_name: "support", | ||
type: "Public", | ||
channel_description: "A place to get support and ask questions.", | ||
is_direct_message: 0, | ||
is_self_message: 0, | ||
is_archived: 0, | ||
creation: "2024-03-20T08:30:00Z", | ||
owner: "user_006", | ||
last_message_details: { | ||
sender: "user_007", | ||
content: "Can someone help with deployment?", | ||
}, | ||
last_message_timestamp: "2024-12-12T16:45:00Z", | ||
}, | ||
{ | ||
name: "channel_005", | ||
channel_name: "fun-zone", | ||
type: "Open", | ||
channel_description: "A channel for fun and casual chats.", | ||
is_direct_message: 0, | ||
is_self_message: 0, | ||
is_archived: 0, | ||
creation: "2024-04-01T12:00:00Z", | ||
owner: "user_008", | ||
last_message_details: { | ||
sender: "user_009", | ||
content: "Check out this meme!", | ||
}, | ||
last_message_timestamp: "2024-12-15T11:00:00Z", | ||
}, | ||
{ | ||
name: "channel_006", | ||
channel_name: "dev-discussions", | ||
type: "Private", | ||
channel_description: "Discussions about development and code.", | ||
is_direct_message: 0, | ||
is_self_message: 0, | ||
is_archived: 0, | ||
creation: "2024-05-25T09:00:00Z", | ||
owner: "user_010", | ||
last_message_details: { | ||
sender: "user_011", | ||
content: "Have you seen the latest React update?", | ||
}, | ||
last_message_timestamp: "2024-12-18T14:00:00Z", | ||
}, | ||
]} | ||
onChannelSelect={() => console.log('channel selected')} | ||
onLongPress={() => console.log('channel long pressed')} /> | ||
</View> | ||
<View | ||
style={{ | ||
borderBottomWidth: 1, | ||
borderBottomColor: colors.grey5, | ||
marginHorizontal: 16 | ||
}} | ||
/> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { View } from "react-native" | ||
import { Text } from '@components/nativewindui/Text' | ||
import { Stack } from "expo-router" | ||
|
||
const ChannelSettings = () => { | ||
return ( | ||
<View> | ||
<Stack.Screen options={{ | ||
title: 'Channel Settings', | ||
headerLargeTitle: true | ||
}} /> | ||
<Text>Channel Settings</Text> | ||
</View> | ||
) | ||
} | ||
|
||
export default ChannelSettings |
Oops, something went wrong.