From f9458093c914d668ccf4f76ab1e58c41402cf16b Mon Sep 17 00:00:00 2001 From: thoulee Date: Sat, 16 Nov 2024 00:31:27 +0800 Subject: [PATCH] =?UTF-8?q?refactor(TestScreen):=20=E9=87=8D=E6=9E=84=20Te?= =?UTF-8?q?stScreen=20=E7=BB=84=E4=BB=B6=EF=BC=8C=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E8=BA=AB=E4=BB=BD=E9=AA=8C=E8=AF=81=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E6=B7=BB=E5=8A=A0=20Lottie=20=E5=8A=A8?= =?UTF-8?q?=E7=94=BB=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android/app/build.gradle | 4 +- ios/jointplayer.xcodeproj/project.pbxproj | 4 +- ios/jointplayer/Info.plist | 4 +- ios/jointplayerTests/Info.plist | 4 +- package.json | 2 +- src/pages/test.tsx | 127 ++-------------------- 6 files changed, 17 insertions(+), 128 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index a02f63e0..b5be8625 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -87,8 +87,8 @@ android { applicationId 'com.thoulee.jointplayer' minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 5010000 - versionName "5.10.0" + versionCode 5010001 + versionName "5.10.1" } signingConfigs { debug { diff --git a/ios/jointplayer.xcodeproj/project.pbxproj b/ios/jointplayer.xcodeproj/project.pbxproj index 316e0597..bc4540d4 100644 --- a/ios/jointplayer.xcodeproj/project.pbxproj +++ b/ios/jointplayer.xcodeproj/project.pbxproj @@ -480,7 +480,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 5010000; + CURRENT_PROJECT_VERSION = 5010001; ENABLE_BITCODE = NO; INFOPLIST_FILE = jointplayer/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -507,7 +507,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 5010000; + CURRENT_PROJECT_VERSION = 5010001; INFOPLIST_FILE = jointplayer/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", diff --git a/ios/jointplayer/Info.plist b/ios/jointplayer/Info.plist index ba509e3d..3ff01bf1 100644 --- a/ios/jointplayer/Info.plist +++ b/ios/jointplayer/Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 5.10.0 + 5.10.1 CFBundleSignature ???? CFBundleVersion - 5010000 + 5010001 LSRequiresIPhoneOS NSAppTransportSecurity diff --git a/ios/jointplayerTests/Info.plist b/ios/jointplayerTests/Info.plist index 7c3f6f3b..bcf8ba1b 100644 --- a/ios/jointplayerTests/Info.plist +++ b/ios/jointplayerTests/Info.plist @@ -15,10 +15,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 5.10.0 + 5.10.1 CFBundleSignature ???? CFBundleVersion - 5010000 + 5010001 diff --git a/package.json b/package.json index 5ab133c6..16384ea1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jointplayer", - "version": "5.10.0", + "version": "5.10.1", "private": true, "homepage": "https://github.com/thoulee21/joint-player", "displayName": "Joint Player", diff --git a/src/pages/test.tsx b/src/pages/test.tsx index 121b527d..5fb9eff1 100644 --- a/src/pages/test.tsx +++ b/src/pages/test.tsx @@ -1,122 +1,11 @@ -import { - Header, - LargeHeader, - ScalingView, - ScrollViewWithHeaders, -} from '@codeherence/react-native-header'; -import type { LocalAuthenticationResult } from 'expo-local-authentication'; -import * as LocalAuthentication from 'expo-local-authentication'; -import React, { useEffect, useState } from 'react'; -import { StyleSheet } from 'react-native'; -import { Button, Card, Text } from 'react-native-paper'; -import type { SharedValue } from 'react-native-reanimated'; -import { useSafeAreaInsets } from 'react-native-safe-area-context'; -import { BlurBackground } from '../components/BlurBackground'; -import { rootLog } from '../utils/logger'; - -const HeaderComponent = ( - { showNavBar }: { showNavBar: SharedValue } -) => ( -
- react-native-header - - } - /> -); - -const LargeHeaderComponent = ( - { scrollY }: { scrollY: SharedValue } -) => { - return ( - - - Welcome! - react-native-header - - This project displays some header examples using the package. - - - - ); -}; +import React from 'react'; +import { LottieAnimation } from '../components/LottieAnimation'; export const TestScreen = () => { - const { bottom } = useSafeAreaInsets(); - const [isLoaded, setIsLoaded] = useState(false); - const [authResult, setAuthResult] = useState(); - - useEffect(() => { - const init = async () => { - const hasHardware = await LocalAuthentication.hasHardwareAsync(); - rootLog.debug('hasHardware', hasHardware); - - const supported = await LocalAuthentication.supportedAuthenticationTypesAsync(); - rootLog.debug('supported', supported); - - const enrolled = await LocalAuthentication.isEnrolledAsync(); - rootLog.info('enrolled', enrolled); - - const result = await LocalAuthentication.authenticateAsync(); - rootLog.info('result', result); - setAuthResult(result); - - if (result.success) { - rootLog.info('Authenticated!'); - } else { - rootLog.warn('Not authenticated!'); - } - }; - - if (!isLoaded) { - init().then(() => { - setIsLoaded(true); - }); - } - }, [isLoaded]); - - return ( - - - - - - - - - {JSON.stringify( - authResult, null, 2 - )} - - - - - - - - - - ); + return ( + + ); }; - -const styles = StyleSheet.create({ - main: { - flex: 1, - height: 1500, - marginTop: '10%', - marginHorizontal: '2.5%', - }, - headerTitle: { - fontSize: 16, - fontWeight: 'bold', - } -});