upd: redesign
Deskripsi: - fitur ganti mode tema - penerapan tema pada semua fitur NO Issues
This commit is contained in:
@@ -2,6 +2,7 @@ import Styles from "@/constants/Styles"
|
||||
import { apiAddLinkProject, apiDeleteProject } from "@/lib/api"
|
||||
import { setUpdateProject } from "@/lib/projectUpdate"
|
||||
import { useAuthSession } from "@/providers/AuthProvider"
|
||||
import { useTheme } from "@/providers/ThemeProvider"
|
||||
import { AntDesign, Feather, Ionicons, MaterialCommunityIcons, MaterialIcons } from "@expo/vector-icons"
|
||||
import { router } from "expo-router"
|
||||
import { useState } from "react"
|
||||
@@ -23,6 +24,7 @@ type Props = {
|
||||
export default function HeaderRightProjectDetail({ id, status }: Props) {
|
||||
const entityUser = useSelector((state: any) => state.user)
|
||||
const { token, decryptToken } = useAuthSession()
|
||||
const { colors } = useTheme();
|
||||
const [isVisible, setVisible] = useState(false)
|
||||
const dispatch = useDispatch()
|
||||
const update = useSelector((state: any) => state.projectUpdate)
|
||||
@@ -70,7 +72,7 @@ export default function HeaderRightProjectDetail({ id, status }: Props) {
|
||||
<DrawerBottom animation="slide" isVisible={isVisible} setVisible={setVisible} title="Menu" height={35}>
|
||||
<View style={Styles.rowItemsCenter}>
|
||||
<MenuItemRow
|
||||
icon={<AntDesign name="pluscircle" color="black" size={25} />}
|
||||
icon={<AntDesign name="pluscircle" color={colors.text} size={25} />}
|
||||
title="Tambah Tugas"
|
||||
onPress={() => {
|
||||
if (status == 3) return
|
||||
@@ -80,7 +82,7 @@ export default function HeaderRightProjectDetail({ id, status }: Props) {
|
||||
disabled={status == 3}
|
||||
/>
|
||||
<MenuItemRow
|
||||
icon={<MaterialCommunityIcons name="file-plus" color="black" size={25} />}
|
||||
icon={<MaterialCommunityIcons name="file-plus" color={colors.text} size={25} />}
|
||||
title="Tambah File"
|
||||
onPress={() => {
|
||||
if (status == 3) return
|
||||
@@ -90,7 +92,7 @@ export default function HeaderRightProjectDetail({ id, status }: Props) {
|
||||
disabled={status == 3}
|
||||
/>
|
||||
<MenuItemRow
|
||||
icon={<Feather name="link" color="black" size={25} />}
|
||||
icon={<Feather name="link" color={colors.text} size={25} />}
|
||||
title="Tambah Link"
|
||||
onPress={() => {
|
||||
if (status == 3) return
|
||||
@@ -104,7 +106,7 @@ export default function HeaderRightProjectDetail({ id, status }: Props) {
|
||||
</View>
|
||||
<View style={[Styles.rowItemsCenter, Styles.mt15]}>
|
||||
<MenuItemRow
|
||||
icon={<MaterialCommunityIcons name="file-document" color="black" size={25} />}
|
||||
icon={<MaterialCommunityIcons name="file-document" color={colors.text} size={25} />}
|
||||
title="Laporan"
|
||||
onPress={() => {
|
||||
if (status == 3) return
|
||||
@@ -117,7 +119,7 @@ export default function HeaderRightProjectDetail({ id, status }: Props) {
|
||||
entityUser.role != "user" && entityUser.role != "coadmin" &&
|
||||
<>
|
||||
<MenuItemRow
|
||||
icon={<MaterialIcons name="groups" color="black" size={25} />}
|
||||
icon={<MaterialIcons name="groups" color={colors.text} size={25} />}
|
||||
title="Tambah Anggota"
|
||||
onPress={() => {
|
||||
if (status == 3) return
|
||||
@@ -127,7 +129,7 @@ export default function HeaderRightProjectDetail({ id, status }: Props) {
|
||||
disabled={status == 3}
|
||||
/>
|
||||
<MenuItemRow
|
||||
icon={<MaterialCommunityIcons name="pencil-outline" color="black" size={25} />}
|
||||
icon={<MaterialCommunityIcons name="pencil-outline" color={colors.text} size={25} />}
|
||||
title="Edit"
|
||||
onPress={() => {
|
||||
if (status == 3) return
|
||||
@@ -146,7 +148,7 @@ export default function HeaderRightProjectDetail({ id, status }: Props) {
|
||||
status == 3
|
||||
?
|
||||
<MenuItemRow
|
||||
icon={<Ionicons name="trash" color="black" size={25} />}
|
||||
icon={<Ionicons name="trash" color={colors.text} size={25} />}
|
||||
title="Hapus"
|
||||
onPress={() => {
|
||||
setVisible(false)
|
||||
@@ -159,7 +161,7 @@ export default function HeaderRightProjectDetail({ id, status }: Props) {
|
||||
/>
|
||||
:
|
||||
<MenuItemRow
|
||||
icon={<MaterialIcons name="close" color="black" size={25} />}
|
||||
icon={<MaterialIcons name="close" color={colors.text} size={25} />}
|
||||
title="Batal"
|
||||
onPress={() => {
|
||||
setVisible(false)
|
||||
@@ -182,6 +184,7 @@ export default function HeaderRightProjectDetail({ id, status }: Props) {
|
||||
<InputForm
|
||||
type="default"
|
||||
placeholder="Masukkan link"
|
||||
bg={colors.card}
|
||||
value={link}
|
||||
onChange={(text) => { setLink(text) }}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user