u
This commit is contained in:
1 parent
6a8c31e20c
commit
572011017a
25 files changed
+599
-563
No files matched your search
@@ -5,7 +5,8 @@ import { useCallback, useEffect, useState } from 'react'
|
||||
import { Text, TouchableOpacity, View } from 'react-native'
|
||||
import Animated, { useAnimatedRef } from 'react-native-reanimated'
|
||||
import Sortable from 'react-native-sortables'
|
||||
import { ADivider, ADrawer, LucideIcon } from '@/components/common/ao'
|
||||
import { ADrawer, LucideIcon } from '@/components/common/ao'
|
||||
import { Divider } from '@/components/ui/divider'
|
||||
import { useNavStore } from '@/store/navigation'
|
||||
|
||||
export default function TabsLayout() {
|
||||
@@ -92,9 +93,7 @@ export default function TabsLayout() {
|
||||
<LucideIcon icon="Bot" size={24} clickable={false} strokeWidth={2} />
|
||||
</TouchableOpacity>
|
||||
|
||||
<ADivider
|
||||
direction="vertical"
|
||||
/>
|
||||
<Divider orientation="vertical" className="h-8" />
|
||||
|
||||
<TouchableOpacity
|
||||
className="flex-1 items-center justify-center flex flex-row"
|
||||
@@ -106,7 +105,7 @@ export default function TabsLayout() {
|
||||
<Text className="font-semibold text-lg ml-2">{currentNav.label}</Text>
|
||||
</TouchableOpacity>
|
||||
|
||||
<ADivider direction="vertical" />
|
||||
<Divider orientation="vertical" className="h-8" />
|
||||
|
||||
<TouchableOpacity className="w-12 items-center justify-center" onPress={refreshPage}>
|
||||
<LucideIcon icon="RefreshCcw" size={24} clickable={false} strokeWidth={2} />
|
||||
|
||||
@@ -5,7 +5,7 @@ import { Pressable, RefreshControl, SectionList, Text, Vibration, View } from 'r
|
||||
import { LucideIcon } from '@/components/common/ao'
|
||||
import EmptyState from '@/components/common/EmptyStatus'
|
||||
import MoneyCategoryIcon from '@/components/common/MoneyCategoryIcon'
|
||||
import { Menu, MenuItem, MenuItemLabel } from '@/components/ui/menu'
|
||||
import { Menu, MenuItem, MenuItemLabel, MenuSeparator } from '@/components/ui/menu'
|
||||
import { useMoneyCategoryStore } from '@/store/moneyCategory'
|
||||
import { useUserStore } from '@/store/user'
|
||||
import { MoneyCategoryEnum } from '@/types/money/category'
|
||||
@@ -125,6 +125,7 @@ export default function StaticTransactions({
|
||||
shadowColor: '#000',
|
||||
borderRadius: 4,
|
||||
width: 160,
|
||||
padding: 0,
|
||||
}}
|
||||
offset={0}
|
||||
placement="bottom"
|
||||
@@ -186,53 +187,69 @@ export default function StaticTransactions({
|
||||
>
|
||||
{
|
||||
userID === item.user_id && (
|
||||
<MenuItem
|
||||
key="update"
|
||||
textValue="update"
|
||||
className="flex gap-2"
|
||||
style={{
|
||||
paddingVertical: 10,
|
||||
minWidth: 150,
|
||||
}}
|
||||
onPress={() => {
|
||||
onUpdate?.(item)
|
||||
}}
|
||||
>
|
||||
<LucideIcon icon="Pencil" size={18} />
|
||||
<MenuItemLabel>更新</MenuItemLabel>
|
||||
</MenuItem>
|
||||
<>
|
||||
<MenuItem
|
||||
key="update"
|
||||
textValue="update"
|
||||
className="flex gap-3"
|
||||
style={{
|
||||
minWidth: 150,
|
||||
height: 42,
|
||||
paddingTop: 0,
|
||||
paddingBottom: 0,
|
||||
alignItems: 'center',
|
||||
borderRadius: 0,
|
||||
}}
|
||||
onPress={() => {
|
||||
onUpdate?.(item)
|
||||
}}
|
||||
>
|
||||
<LucideIcon icon="Pencil" size={18} />
|
||||
<MenuItemLabel className="text-lg">更新</MenuItemLabel>
|
||||
</MenuItem>
|
||||
<MenuSeparator />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
<MenuItem
|
||||
key="delete"
|
||||
textValue="delete"
|
||||
className="flex gap-2"
|
||||
className="flex gap-3"
|
||||
style={{
|
||||
paddingVertical: 10,
|
||||
minWidth: 150,
|
||||
height: 42,
|
||||
paddingTop: 0,
|
||||
paddingBottom: 0,
|
||||
alignItems: 'center',
|
||||
borderRadius: 0,
|
||||
}}
|
||||
onPress={() => {
|
||||
onDelete?.(item.id)
|
||||
}}
|
||||
>
|
||||
<LucideIcon icon="Trash" size={18} />
|
||||
<MenuItemLabel>删除</MenuItemLabel>
|
||||
<MenuItemLabel className="text-lg">删除</MenuItemLabel>
|
||||
</MenuItem>
|
||||
<MenuSeparator />
|
||||
<MenuItem
|
||||
key="detail"
|
||||
textValue="detail"
|
||||
className="flex gap-2"
|
||||
className="flex gap-3"
|
||||
style={{
|
||||
paddingVertical: 10,
|
||||
minWidth: 150,
|
||||
height: 42,
|
||||
paddingTop: 0,
|
||||
paddingBottom: 0,
|
||||
alignItems: 'center',
|
||||
borderRadius: 0,
|
||||
}}
|
||||
onPress={() => {
|
||||
onDetail?.(item.id)
|
||||
}}
|
||||
>
|
||||
<LucideIcon icon="ReceiptText" size={18} />
|
||||
<MenuItemLabel>详细</MenuItemLabel>
|
||||
<MenuItemLabel className="text-lg">详细</MenuItemLabel>
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user