Collacoration
Add : - collaboration page - collaboration component Component Fix: - Base box : tambah props background # No Issue
This commit is contained in:
@@ -107,6 +107,25 @@ export default function UserLayout() {
|
|||||||
headerLeft: () => <BackButton />,
|
headerLeft: () => <BackButton />,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
{/* ========== End Event Section ========= */}
|
||||||
|
|
||||||
|
{/* ========== Collaboration Section ========= */}
|
||||||
|
<Stack.Screen
|
||||||
|
name="collaboration/(tabs)"
|
||||||
|
options={{
|
||||||
|
title: "Collaboration",
|
||||||
|
headerLeft: () => <BackButton />,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Stack.Screen
|
||||||
|
name="collaboration/create"
|
||||||
|
options={{
|
||||||
|
title: "Tambah Proyek",
|
||||||
|
headerLeft: () => <BackButton />,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
{/* ========== End Collaboration Section ========= */}
|
||||||
|
|
||||||
{/* ========== Forum Section ========= */}
|
{/* ========== Forum Section ========= */}
|
||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
@@ -127,7 +146,7 @@ export default function UserLayout() {
|
|||||||
name="forum/[id]/forumku"
|
name="forum/[id]/forumku"
|
||||||
options={{
|
options={{
|
||||||
title: "Forumku",
|
title: "Forumku",
|
||||||
headerLeft: () => <BackButton icon={'close'} />,
|
headerLeft: () => <BackButton icon={"close"} />,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
|
|||||||
37
app/(application)/(user)/collaboration/(tabs)/_layout.tsx
Normal file
37
app/(application)/(user)/collaboration/(tabs)/_layout.tsx
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
import { TabsStyles } from "@/styles/tabs-styles";
|
||||||
|
import { Ionicons } from "@expo/vector-icons";
|
||||||
|
import { Tabs } from "expo-router";
|
||||||
|
|
||||||
|
export default function CollaborationTabsLayout() {
|
||||||
|
return (
|
||||||
|
<Tabs screenOptions={TabsStyles}>
|
||||||
|
<Tabs.Screen
|
||||||
|
name="index"
|
||||||
|
options={{
|
||||||
|
title: "Beranda",
|
||||||
|
tabBarIcon: ({ color }) => (
|
||||||
|
<Ionicons size={20} name="home" color={color} />
|
||||||
|
),
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Tabs.Screen
|
||||||
|
name="participans"
|
||||||
|
options={{
|
||||||
|
title: "Participans",
|
||||||
|
tabBarIcon: ({ color }) => (
|
||||||
|
<Ionicons size={20} name="people" color={color} />
|
||||||
|
),
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Tabs.Screen
|
||||||
|
name="group"
|
||||||
|
options={{
|
||||||
|
title: "Group",
|
||||||
|
tabBarIcon: ({ color }) => (
|
||||||
|
<Ionicons size={20} name="chatbox-ellipses" color={color} />
|
||||||
|
),
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Tabs>
|
||||||
|
);
|
||||||
|
}
|
||||||
10
app/(application)/(user)/collaboration/(tabs)/group.tsx
Normal file
10
app/(application)/(user)/collaboration/(tabs)/group.tsx
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import { TextCustom } from "@/components";
|
||||||
|
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
|
||||||
|
|
||||||
|
export default function CollaborationGroup() {
|
||||||
|
return (
|
||||||
|
<ViewWrapper>
|
||||||
|
<TextCustom>CollaborationGroup</TextCustom>
|
||||||
|
</ViewWrapper>
|
||||||
|
);
|
||||||
|
}
|
||||||
29
app/(application)/(user)/collaboration/(tabs)/index.tsx
Normal file
29
app/(application)/(user)/collaboration/(tabs)/index.tsx
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
import {
|
||||||
|
FloatingButton,
|
||||||
|
ViewWrapper
|
||||||
|
} from "@/components";
|
||||||
|
import Collaboration_BoxPublishSection from "@/screens/Collaboration/BoxPublishSection";
|
||||||
|
import { router } from "expo-router";
|
||||||
|
|
||||||
|
export default function CollaborationBeranda() {
|
||||||
|
return (
|
||||||
|
<ViewWrapper
|
||||||
|
hideFooter
|
||||||
|
floatingButton={
|
||||||
|
<FloatingButton
|
||||||
|
onPress={() => {
|
||||||
|
router.push("/collaboration/create")
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{Array.from({ length: 10 }).map((_, index) => (
|
||||||
|
<Collaboration_BoxPublishSection
|
||||||
|
key={index}
|
||||||
|
id={index.toString()}
|
||||||
|
href={`/collaboration`}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</ViewWrapper>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
import { TextCustom } from "@/components";
|
||||||
|
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
|
||||||
|
|
||||||
|
export default function CollaborationParticipans() {
|
||||||
|
return (
|
||||||
|
<ViewWrapper>
|
||||||
|
<TextCustom>CollaborationParticipans</TextCustom>
|
||||||
|
</ViewWrapper>
|
||||||
|
);
|
||||||
|
}
|
||||||
11
app/(application)/(user)/collaboration/create.tsx
Normal file
11
app/(application)/(user)/collaboration/create.tsx
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
import { TextCustom, ViewWrapper } from "@/components";
|
||||||
|
|
||||||
|
export default function CollaborationCreate() {
|
||||||
|
return (
|
||||||
|
<ViewWrapper>
|
||||||
|
<TextCustom bold size="xlarge">
|
||||||
|
Tambah Koleksi
|
||||||
|
</TextCustom>
|
||||||
|
</ViewWrapper>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
import { AccentColor } from "@/constants/color-palet";
|
import { AccentColor, MainColor } from "@/constants/color-palet";
|
||||||
import {
|
import {
|
||||||
PADDING_MEDIUM,
|
PADDING_MEDIUM,
|
||||||
PADDING_SMALL
|
PADDING_SMALL
|
||||||
} from "@/constants/constans-value";
|
} from "@/constants/constans-value";
|
||||||
import { Href, router } from "expo-router";
|
import { Href, router } from "expo-router";
|
||||||
import {
|
import {
|
||||||
|
AccessibilityInfo,
|
||||||
StyleProp,
|
StyleProp,
|
||||||
TouchableOpacity,
|
TouchableOpacity,
|
||||||
View,
|
View,
|
||||||
@@ -22,6 +23,7 @@ interface BaseBoxProps {
|
|||||||
paddingBottom?: number;
|
paddingBottom?: number;
|
||||||
paddingInline?: number;
|
paddingInline?: number;
|
||||||
paddingBlock?: number;
|
paddingBlock?: number;
|
||||||
|
backgroundColor?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function BaseBox({
|
export default function BaseBox({
|
||||||
@@ -34,6 +36,7 @@ export default function BaseBox({
|
|||||||
paddingInline = PADDING_SMALL,
|
paddingInline = PADDING_SMALL,
|
||||||
paddingTop = PADDING_MEDIUM,
|
paddingTop = PADDING_MEDIUM,
|
||||||
paddingBottom = PADDING_MEDIUM,
|
paddingBottom = PADDING_MEDIUM,
|
||||||
|
backgroundColor = AccentColor.darkblue,
|
||||||
}: BaseBoxProps) {
|
}: BaseBoxProps) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -44,7 +47,7 @@ export default function BaseBox({
|
|||||||
onPress={href ? () => router.navigate(href) : onPress}
|
onPress={href ? () => router.navigate(href) : onPress}
|
||||||
style={[
|
style={[
|
||||||
{
|
{
|
||||||
backgroundColor: AccentColor.darkblue,
|
backgroundColor,
|
||||||
borderColor: AccentColor.blue,
|
borderColor: AccentColor.blue,
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
borderRadius: 10,
|
borderRadius: 10,
|
||||||
@@ -63,7 +66,7 @@ export default function BaseBox({
|
|||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
{
|
{
|
||||||
backgroundColor: AccentColor.darkblue,
|
backgroundColor,
|
||||||
borderColor: AccentColor.blue,
|
borderColor: AccentColor.blue,
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
borderRadius: 10,
|
borderRadius: 10,
|
||||||
|
|||||||
15
components/_ShareComponent/TabBarBackground.tsx
Normal file
15
components/_ShareComponent/TabBarBackground.tsx
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import { AccentColor, MainColor } from "@/constants/color-palet";
|
||||||
|
import { View } from "react-native";
|
||||||
|
|
||||||
|
export default function TabBarBackground() {
|
||||||
|
return (
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
flex: 1,
|
||||||
|
backgroundColor: MainColor.darkblue,
|
||||||
|
borderTopWidth: 1,
|
||||||
|
borderTopColor: AccentColor.blue,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@ import LeftButtonCustom from "./Button/BackButton";
|
|||||||
import ButtonCenteredOnly from "./Button/ButtonCenteredOnly";
|
import ButtonCenteredOnly from "./Button/ButtonCenteredOnly";
|
||||||
import ButtonCustom from "./Button/ButtonCustom";
|
import ButtonCustom from "./Button/ButtonCustom";
|
||||||
import DotButton from "./Button/DotButton";
|
import DotButton from "./Button/DotButton";
|
||||||
|
import FloatingButton from "./Button/FloatingButton";
|
||||||
// Drawer
|
// Drawer
|
||||||
import DrawerCustom from "./Drawer/DrawerCustom";
|
import DrawerCustom from "./Drawer/DrawerCustom";
|
||||||
import MenuDrawerDynamicGrid from "./Drawer/MenuDrawerDynamicGird";
|
import MenuDrawerDynamicGrid from "./Drawer/MenuDrawerDynamicGird";
|
||||||
@@ -42,36 +43,46 @@ import ScrollableCustom from "./Scroll/ScrollCustom";
|
|||||||
import AvatarUsernameAndOtherComponent from "./_ShareComponent/AvataraAndOtherHeaderComponent";
|
import AvatarUsernameAndOtherComponent from "./_ShareComponent/AvataraAndOtherHeaderComponent";
|
||||||
import Spacing from "./_ShareComponent/Spacing";
|
import Spacing from "./_ShareComponent/Spacing";
|
||||||
import ViewWrapper from "./_ShareComponent/ViewWrapper";
|
import ViewWrapper from "./_ShareComponent/ViewWrapper";
|
||||||
|
import TabBarBackground from "./_ShareComponent/TabBarBackground";
|
||||||
|
|
||||||
export {
|
export {
|
||||||
AlertCustom,
|
AlertCustom,
|
||||||
// Image
|
// Image
|
||||||
AvatarCustom,
|
AvatarCustom,
|
||||||
// ShareComponent
|
// ShareComponent
|
||||||
AvatarUsernameAndOtherComponent, LeftButtonCustom as BackButton,
|
AvatarUsernameAndOtherComponent,
|
||||||
// Box
|
// Box
|
||||||
BaseBox,
|
BaseBox,
|
||||||
BoxButtonOnFooter, BoxWithHeaderSection,
|
BoxButtonOnFooter,
|
||||||
|
BoxWithHeaderSection,
|
||||||
// Button
|
// Button
|
||||||
|
LeftButtonCustom as BackButton,
|
||||||
ButtonCenteredOnly,
|
ButtonCenteredOnly,
|
||||||
ButtonCustom,
|
ButtonCustom,
|
||||||
|
FloatingButton,
|
||||||
|
DotButton,
|
||||||
// Center
|
// Center
|
||||||
CenterCustom,
|
CenterCustom,
|
||||||
// Clickable
|
// Clickable
|
||||||
ClickableCustom,
|
ClickableCustom,
|
||||||
// Divider
|
// Divider
|
||||||
DividerCustom, DotButton,
|
DividerCustom,
|
||||||
// Drawer
|
// Drawer
|
||||||
DrawerCustom,
|
DrawerCustom,
|
||||||
// Grid
|
// Grid
|
||||||
Grid, InformationBox, LandscapeFrameUploaded,
|
Grid,
|
||||||
|
InformationBox,
|
||||||
|
LandscapeFrameUploaded,
|
||||||
// Map
|
// Map
|
||||||
MapCustom, MenuDrawerDynamicGrid,
|
MapCustom,
|
||||||
|
MenuDrawerDynamicGrid,
|
||||||
// Scroll
|
// Scroll
|
||||||
ScrollableCustom,
|
ScrollableCustom,
|
||||||
// Select
|
// Select
|
||||||
SelectCustom,
|
SelectCustom,
|
||||||
// ShareComponent
|
// ShareComponent
|
||||||
Spacing,
|
Spacing,
|
||||||
|
TabBarBackground,
|
||||||
// Stack
|
// Stack
|
||||||
StackCustom,
|
StackCustom,
|
||||||
// TextArea
|
// TextArea
|
||||||
@@ -81,6 +92,5 @@ export {
|
|||||||
// TextInput
|
// TextInput
|
||||||
TextInputCustom,
|
TextInputCustom,
|
||||||
// ViewWrapper
|
// ViewWrapper
|
||||||
ViewWrapper
|
ViewWrapper,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -30,9 +30,9 @@ export default function LoginView() {
|
|||||||
const id = randomAlfabet + randomNumber + fixNumber;
|
const id = randomAlfabet + randomNumber + fixNumber;
|
||||||
console.log("login user id :", id);
|
console.log("login user id :", id);
|
||||||
|
|
||||||
router.navigate("/verification");
|
// router.navigate("/verification");
|
||||||
// router.navigate(`/(application)/(user)/profile/${id}`);
|
// router.navigate(`/(application)/(user)/profile/${id}`);
|
||||||
// router.navigate("/(application)/(user)/home");
|
router.navigate("/(application)/(user)/home");
|
||||||
// router.navigate(`/(application)/profile/${id}/edit`);
|
// router.navigate(`/(application)/profile/${id}/edit`);
|
||||||
// router.navigate(`/(application)/(user)/portofolio/${id}`)
|
// router.navigate(`/(application)/(user)/portofolio/${id}`)
|
||||||
// router.navigate(`/(application)/(image)/preview-image/${id}`);
|
// router.navigate(`/(application)/(image)/preview-image/${id}`);
|
||||||
|
|||||||
63
screens/Collaboration/BoxPublishSection.tsx
Normal file
63
screens/Collaboration/BoxPublishSection.tsx
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
import {
|
||||||
|
BoxWithHeaderSection,
|
||||||
|
StackCustom,
|
||||||
|
AvatarUsernameAndOtherComponent,
|
||||||
|
TextCustom,
|
||||||
|
BaseBox,
|
||||||
|
} from "@/components";
|
||||||
|
import { MainColor } from "@/constants/color-palet";
|
||||||
|
import { Href } from "expo-router";
|
||||||
|
|
||||||
|
function Collaboration_BoxPublishSection({
|
||||||
|
id,
|
||||||
|
title,
|
||||||
|
username,
|
||||||
|
description,
|
||||||
|
href,
|
||||||
|
|
||||||
|
// Avatar
|
||||||
|
sourceAvatar,
|
||||||
|
rightComponentAvatar,
|
||||||
|
}: {
|
||||||
|
id: string;
|
||||||
|
title?: string;
|
||||||
|
username?: string;
|
||||||
|
description?: string;
|
||||||
|
href: Href;
|
||||||
|
|
||||||
|
// Avatar
|
||||||
|
sourceAvatar?: string;
|
||||||
|
rightComponentAvatar?: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<BoxWithHeaderSection href={href}>
|
||||||
|
<StackCustom gap={0}>
|
||||||
|
<AvatarUsernameAndOtherComponent
|
||||||
|
avatarHref={`/profile/${id}`}
|
||||||
|
name={username || "Username"}
|
||||||
|
rightComponent={rightComponentAvatar}
|
||||||
|
avatar={sourceAvatar as any}
|
||||||
|
/>
|
||||||
|
<BaseBox backgroundColor={MainColor.soft_darkblue}>
|
||||||
|
<StackCustom>
|
||||||
|
<TextCustom truncate={2} size="large" bold align="center">
|
||||||
|
{title || "Lorem ipsum dolor sit"}
|
||||||
|
</TextCustom>
|
||||||
|
<TextCustom truncate={2}>
|
||||||
|
{description ||
|
||||||
|
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Porro sed doloremque tempora soluta. Dolorem ex quidem ipsum tempora, ipsa, obcaecati quia suscipit numquam, voluptates commodi porro impedit natus quos doloremque!"}
|
||||||
|
</TextCustom>
|
||||||
|
</StackCustom>
|
||||||
|
</BaseBox>
|
||||||
|
|
||||||
|
<TextCustom bold size="small" align="center">
|
||||||
|
2 Partisipan
|
||||||
|
</TextCustom>
|
||||||
|
</StackCustom>
|
||||||
|
</BoxWithHeaderSection>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Collaboration_BoxPublishSection;
|
||||||
@@ -14,7 +14,10 @@ export default function Home_FeatureSection() {
|
|||||||
<Ionicons name="analytics" size={48} color="white" />
|
<Ionicons name="analytics" size={48} color="white" />
|
||||||
<Text style={stylesHome.gridLabel}>Event</Text>
|
<Text style={stylesHome.gridLabel}>Event</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
<TouchableOpacity style={stylesHome.gridItem}>
|
<TouchableOpacity
|
||||||
|
style={stylesHome.gridItem}
|
||||||
|
onPress={() => router.push("/(application)/(user)/collaboration/(tabs)")}
|
||||||
|
>
|
||||||
<Ionicons name="share" size={48} color="white" />
|
<Ionicons name="share" size={48} color="white" />
|
||||||
<Text style={stylesHome.gridLabel}>Collaboration</Text>
|
<Text style={stylesHome.gridLabel}>Collaboration</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|||||||
25
styles/tabs-styles.ts
Normal file
25
styles/tabs-styles.ts
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
import { TabBarBackground } from "@/components";
|
||||||
|
import { MainColor } from "@/constants/color-palet";
|
||||||
|
import { OS_IOS_HEIGHT, OS_ANDROID_HEIGHT } from "@/constants/constans-value";
|
||||||
|
import { BottomTabNavigationOptions } from "@react-navigation/bottom-tabs";
|
||||||
|
import { Platform } from "react-native";
|
||||||
|
|
||||||
|
export const TabsStyles: BottomTabNavigationOptions = {
|
||||||
|
headerShown: false,
|
||||||
|
tabBarActiveTintColor: MainColor.yellow,
|
||||||
|
tabBarInactiveTintColor: MainColor.white_gray,
|
||||||
|
tabBarStyle: Platform.select({
|
||||||
|
ios: {
|
||||||
|
borderTopWidth: 0,
|
||||||
|
paddingTop: 5,
|
||||||
|
height: OS_IOS_HEIGHT,
|
||||||
|
},
|
||||||
|
android: {
|
||||||
|
borderTopWidth: 0,
|
||||||
|
paddingTop: 5,
|
||||||
|
height: OS_ANDROID_HEIGHT,
|
||||||
|
},
|
||||||
|
default: {},
|
||||||
|
}),
|
||||||
|
tabBarBackground: TabBarBackground,
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user