feat: 统一文件名大小写,优化代码可读性;注释掉调试信息以减少控制台输出
This commit is contained in:
parent
56653da1dd
commit
a5b825e761
|
|
@ -1,16 +1,16 @@
|
|||
{
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": "explicit",
|
||||
"source.organizeImports": "never"
|
||||
},
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
|
||||
"eslint.useFlatConfig": true,
|
||||
"eslint.format.enable": true,
|
||||
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
|
||||
"eslint.workingDirectories": [
|
||||
{
|
||||
"mode": "auto"
|
||||
}
|
||||
]
|
||||
}
|
||||
// {
|
||||
// "editor.codeActionsOnSave": {
|
||||
// "source.fixAll.eslint": "explicit",
|
||||
// "source.organizeImports": "never"
|
||||
// },
|
||||
// "editor.formatOnSave": true,
|
||||
// "editor.defaultFormatter": "dbaeumer.vscode-eslint",
|
||||
// "eslint.useFlatConfig": true,
|
||||
// "eslint.format.enable": true,
|
||||
// "eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
|
||||
// "eslint.workingDirectories": [
|
||||
// {
|
||||
// "mode": "auto"
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import * as Sentry from '@sentry/react-native'
|
||||
import { type Directory, Paths } from 'expo-file-system'
|
||||
import * as FileSystem from 'expo-file-system/legacy'
|
||||
import * as ImagePicker from 'expo-image-picker'
|
||||
|
|
@ -243,8 +242,20 @@ export default observer(function TabTwoScreen() {
|
|||
<Button
|
||||
title="Try!"
|
||||
onPress={() => {
|
||||
Sentry.captureMessage('Test from Android Build')
|
||||
// throw new Error('Test Sentry Integration')
|
||||
// Sentry.captureMessage('Test from Android Build')
|
||||
throw new Error('Test Sentry Integration')
|
||||
// Sentry.captureException('useUpdateCheckerError11', {
|
||||
// level: 'error',
|
||||
// tags: {
|
||||
// useUpdateChecker: 'checkForUpdateAsync_failed',
|
||||
// component: 'useUpdateChecker',
|
||||
// },
|
||||
// contexts: {
|
||||
// update: {
|
||||
// __DEV__: __DEV__,
|
||||
// },
|
||||
// },
|
||||
// })
|
||||
}}
|
||||
/>
|
||||
|
||||
|
|
@ -379,7 +390,7 @@ export default observer(function TabTwoScreen() {
|
|||
// Array(5)
|
||||
// .fill('https://cdn.roasmax.cn/material/8836b879f2d44af48eef8da82d13a755.mp4')
|
||||
contents.map((item, index) => {
|
||||
console.log('item-----------', item)
|
||||
// console.log('item-----------', item)
|
||||
const url = buildCdnUrl(item)
|
||||
if (!url) return null
|
||||
const Width = 100
|
||||
|
|
|
|||
|
|
@ -83,7 +83,9 @@ const Index = observer(function Index() {
|
|||
return {
|
||||
id: template.id,
|
||||
type: isVideo ? 'video' : 'image',
|
||||
url: isVideo ? (template.previewUrl ?? '') : template.coverImageUrl || template.previewUrl || '',
|
||||
url: isVideo
|
||||
? (template?.webpPreviewUrl ?? template?.previewUrl)
|
||||
: template.coverImageUrl || template.previewUrl || '',
|
||||
poster: isVideo ? template.coverImageUrl : undefined,
|
||||
likeCount: template.likeCount || 0,
|
||||
price: template.price || 0,
|
||||
|
|
|
|||
|
|
@ -197,7 +197,6 @@ const Sync = observer(() => {
|
|||
templateId: '',
|
||||
asset: result,
|
||||
price: -1,
|
||||
// ...(typeof asset === 'object' ? asset : {}),
|
||||
}
|
||||
|
||||
setSelectedItem(newItem)
|
||||
|
|
@ -470,6 +469,8 @@ const UpdateNameModal = ({ initialName, onNameChange, onConfirm, onCancel }: any
|
|||
const SyncProgressToast = observer(() => {
|
||||
const { transferProgress } = bleStore.state
|
||||
|
||||
const progressHint =
|
||||
Number(transferProgress) <= 0 ? `正在同步文件` : `正在同步文件,进度 ${transferProgress.toFixed(2)}%`
|
||||
return (
|
||||
<Block
|
||||
className="flex w-full flex-row items-center justify-center border-[3px] border-white bg-black"
|
||||
|
|
@ -477,7 +478,7 @@ const SyncProgressToast = observer(() => {
|
|||
>
|
||||
<SpinningLoader />
|
||||
<Block style={{ marginLeft: 8 }}>
|
||||
<Text className="font-[bla]ck text-[14px] text-white">{`正在同步文件,进度 ${transferProgress.toFixed(2)}%`}</Text>
|
||||
<Text className="font-[bla]ck text-[14px] text-white">{progressHint}</Text>
|
||||
</Block>
|
||||
</Block>
|
||||
)
|
||||
|
|
@ -858,7 +859,7 @@ const HeaderBanner = observer(({ connectedDevice, onPick }: { connectedDevice: a
|
|||
if (isAuthenticated) {
|
||||
signOut().then(() => {
|
||||
Toast.show({ title: '已登出' })
|
||||
router.replace('/')
|
||||
// router.replace('/')
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import { bleManager } from '@/ble/managers/bleManager'
|
|||
import { HotUpdate } from '@/components/hot-update'
|
||||
import { useColorScheme } from '@/hooks/use-color-scheme'
|
||||
import { setupGlobalFetchLogger } from '@/lib/fetch-logger'
|
||||
import { useUserSession } from '@/stores/UserStore'
|
||||
import { useUserSession } from '@/stores/userStore'
|
||||
|
||||
const isProd = process.env.EXPO_PUBLIC_ENV !== 'development'
|
||||
|
||||
|
|
@ -23,7 +23,6 @@ Sentry.init({
|
|||
dsn: 'https://ef710a118839b1e86e38a3833a9a3c6c@o4507705403965440.ingest.us.sentry.io/4510576286302208',
|
||||
sendDefaultPii: true,
|
||||
enableLogs: true,
|
||||
// enabled: !__DEV__,
|
||||
enabled: isProd,
|
||||
})
|
||||
|
||||
|
|
@ -91,7 +90,7 @@ function RootLayout() {
|
|||
<Stack>
|
||||
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
|
||||
<Stack.Screen name="auth" options={{ headerShown: false }} />
|
||||
<Stack.Screen name="forgot-password" options={{ headerShown: false }} />
|
||||
<Stack.Screen name="forgotPassword" options={{ headerShown: false }} />
|
||||
<Stack.Screen name="pointList" options={{ headerShown: false }} />
|
||||
</Stack>
|
||||
</Providers>
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ class UserBalanceStore {
|
|||
return this.loadingPromise
|
||||
}
|
||||
|
||||
console.log('执行余额加载')
|
||||
// console.log('执行余额加载')
|
||||
this.lastLoadTime = now
|
||||
|
||||
this.loadingPromise = this.performLoad()
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ class UserStore {
|
|||
await authSignOut()
|
||||
this.reset()
|
||||
// 登出时重置余额store
|
||||
const { userBalanceStore } = await import('./UserBalanceStore')
|
||||
const { userBalanceStore } = await import('./userBalanceStore')
|
||||
userBalanceStore.reset()
|
||||
} catch (error) {
|
||||
this.setError(error instanceof Error ? error.message : '登出失败')
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
export { bleStore } from './BleStore'
|
||||
export { userBalanceStore } from './UserBalanceStore'
|
||||
export { userStore } from './UserStore'
|
||||
export { bleStore } from './bleStore'
|
||||
export { userBalanceStore } from './userBalanceStore'
|
||||
export { userStore } from './userStore'
|
||||
|
|
|
|||
Loading…
Reference in New Issue