Merge branch 'main' into fix/issue-40-back-button-navigation
This commit is contained in:
commit
2130240b9e
13
.env
13
.env
|
|
@ -20,8 +20,13 @@
|
|||
# EXPO_PUBLIC_API_URL=https://api.acupedia.in/api
|
||||
# EXPO_PUBLIC_STOREFRONT_URL=https://acupedia.in/store
|
||||
# EXPO_PUBLIC_CONTENT_PREVIEW_ENABLED=true
|
||||
|
||||
|
||||
# QA Dev
|
||||
EXPO_PUBLIC_API_URL=https://api.acupedia.in/api
|
||||
EXPO_PUBLIC_STOREFRONT_URL=https://acupedia.in/store
|
||||
EXPO_PUBLIC_CONTENT_PREVIEW_ENABLED=true
|
||||
|
||||
# Local Dev
|
||||
EXPO_PUBLIC_API_URL=http://localhost:8000/api
|
||||
EXPO_PUBLIC_STOREFRONT_URL=http://localhost:3000
|
||||
EXPO_PUBLIC_CONTENT_PREVIEW_ENABLED=true
|
||||
# EXPO_PUBLIC_API_URL=http://localhost:8000/api
|
||||
# EXPO_PUBLIC_STOREFRONT_URL=http://localhost:3000
|
||||
# EXPO_PUBLIC_CONTENT_PREVIEW_ENABLED=true
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ yarn-error.*
|
|||
.env*.local
|
||||
.idea/
|
||||
.env
|
||||
package-locked.json
|
||||
package-lock.json
|
||||
|
||||
# typescript
|
||||
*.tsbuildinfo
|
||||
|
|
@ -43,5 +43,5 @@ versions
|
|||
example
|
||||
|
||||
# generated native folders
|
||||
/ios
|
||||
/android
|
||||
#/ios
|
||||
#/android
|
||||
|
|
|
|||
7
app.json
7
app.json
|
|
@ -5,12 +5,11 @@
|
|||
"version": "1.0.0",
|
||||
"orientation": "portrait",
|
||||
"icon": "./assets/images/icon.png",
|
||||
"scheme": "myapp",
|
||||
"scheme": "acupedia",
|
||||
"userInterfaceStyle": "automatic",
|
||||
"ios": {
|
||||
"bundleIdentifier": "com.anonymous.acupedia",
|
||||
"bundleIdentifier": "com.renownent.mobile.acupedia",
|
||||
"supportsTablet": true,
|
||||
"icon": "./assets/expo.icon",
|
||||
"infoPlist": {
|
||||
"NSAppTransportSecurity": {
|
||||
"NSAllowsArbitraryLoads": true
|
||||
|
|
@ -25,7 +24,7 @@
|
|||
"monochromeImage": "./assets/images/android-icon-monochrome.png"
|
||||
},
|
||||
"predictiveBackGestureEnabled": false,
|
||||
"package": "com.anonymous.acupedia",
|
||||
"package": "com.renownent.mobile.acupedia",
|
||||
"allowBackup": false
|
||||
},
|
||||
"web": {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
# OSX
|
||||
#
|
||||
.DS_Store
|
||||
|
||||
# Xcode
|
||||
#
|
||||
build/
|
||||
*.pbxuser
|
||||
!default.pbxuser
|
||||
*.mode1v3
|
||||
!default.mode1v3
|
||||
*.mode2v3
|
||||
!default.mode2v3
|
||||
*.perspectivev3
|
||||
!default.perspectivev3
|
||||
xcuserdata
|
||||
*.xccheckout
|
||||
*.moved-aside
|
||||
DerivedData
|
||||
*.hmap
|
||||
*.ipa
|
||||
*.xcuserstate
|
||||
project.xcworkspace
|
||||
.xcode.env.local
|
||||
|
||||
# Bundle artifacts
|
||||
*.jsbundle
|
||||
|
||||
# CocoaPods
|
||||
/Pods/
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
# This `.xcode.env` file is versioned and is used to source the environment
|
||||
# used when running script phases inside Xcode.
|
||||
# To customize your local environment, you can create an `.xcode.env.local`
|
||||
# file that is not versioned.
|
||||
|
||||
# NODE_BINARY variable contains the PATH to the node executable.
|
||||
#
|
||||
# Customize the NODE_BINARY variable here.
|
||||
# For example, to use nvm with brew, add the following line
|
||||
# . "$(brew --prefix nvm)/nvm.sh" --no-use
|
||||
export NODE_BINARY=$(command -v node)
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
|
||||
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>method</key>
|
||||
<string>release-testing</string>
|
||||
|
||||
<key>teamID</key>
|
||||
<string>FMXD47BSV9</string>
|
||||
|
||||
<key>signingStyle</key>
|
||||
<string>manual</string>
|
||||
|
||||
<key>signingCertificate</key>
|
||||
<string>Apple Distribution</string>
|
||||
|
||||
<key>provisioningProfiles</key>
|
||||
<dict>
|
||||
<key>com.renownent.mobile.acupedia</key>
|
||||
<string>AcuPedia AdHoc</string>
|
||||
</dict>
|
||||
|
||||
<key>stripSwiftSymbols</key>
|
||||
<true/>
|
||||
|
||||
<key>destination</key>
|
||||
<string>export</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
# Set by expo-router. This enables Fabric-only features from react-native-screens
|
||||
ENV['RNS_GAMMA_ENABLED'] ||= '1'
|
||||
require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
|
||||
require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods")
|
||||
|
||||
require 'json'
|
||||
podfile_properties = JSON.parse(File.read(File.join(__dir__, 'Podfile.properties.json'))) rescue {}
|
||||
|
||||
def ccache_enabled?(podfile_properties)
|
||||
# Environment variable takes precedence
|
||||
return ENV['USE_CCACHE'] == '1' if ENV['USE_CCACHE']
|
||||
|
||||
# Fall back to Podfile properties
|
||||
podfile_properties['apple.ccacheEnabled'] == 'true'
|
||||
end
|
||||
|
||||
ENV['EX_DEV_CLIENT_NETWORK_INSPECTOR'] ||= podfile_properties['EX_DEV_CLIENT_NETWORK_INSPECTOR']
|
||||
ENV['RCT_USE_RN_DEP'] ||= podfile_properties['ios.buildReactNativeFromSource'] == 'true' ? '0' : '1'
|
||||
ENV['RCT_USE_PREBUILT_RNCORE'] ||= podfile_properties['ios.buildReactNativeFromSource'] == 'true' ? '0' : '1'
|
||||
ENV['RCT_HERMES_V1_ENABLED'] ||= '0' if podfile_properties['expo.useHermesV1'] == 'false'
|
||||
# An explicit `ios.usePrecompiledModules: false` must win even when the env var is already set
|
||||
# (e.g. EXPO_USE_PRECOMPILED_MODULES exported by EAS Build), so force-disable here before the default.
|
||||
ENV['EXPO_USE_PRECOMPILED_MODULES'] = '0' if podfile_properties['EXPO_USE_PRECOMPILED_MODULES'] == 'false'
|
||||
ENV['EXPO_USE_PRECOMPILED_MODULES'] ||= '1'
|
||||
platform :ios, podfile_properties['ios.deploymentTarget'] || '16.4'
|
||||
|
||||
prepare_react_native_project!
|
||||
|
||||
target 'acupedia' do
|
||||
use_expo_modules!
|
||||
|
||||
if ENV['EXPO_USE_COMMUNITY_AUTOLINKING'] == '1'
|
||||
config_command = ['node', '-e', "process.argv=['', '', 'config'];require('@react-native-community/cli').run()"];
|
||||
else
|
||||
config_command = [
|
||||
'node',
|
||||
'--no-warnings',
|
||||
'--eval',
|
||||
'require(\'expo/bin/autolinking\')',
|
||||
'expo-modules-autolinking',
|
||||
'react-native-config',
|
||||
'--json',
|
||||
'--platform',
|
||||
'ios'
|
||||
]
|
||||
end
|
||||
|
||||
config = use_native_modules!(config_command)
|
||||
|
||||
use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks']
|
||||
use_frameworks! :linkage => ENV['USE_FRAMEWORKS'].to_sym if ENV['USE_FRAMEWORKS']
|
||||
|
||||
use_react_native!(
|
||||
:path => config[:reactNativePath],
|
||||
:hermes_enabled => podfile_properties['expo.jsEngine'] == nil || podfile_properties['expo.jsEngine'] == 'hermes',
|
||||
# An absolute path to your application root.
|
||||
:app_path => "#{Pod::Config.instance.installation_root}/..",
|
||||
:privacy_file_aggregation_enabled => podfile_properties['apple.privacyManifestAggregationEnabled'] != 'false',
|
||||
)
|
||||
|
||||
post_install do |installer|
|
||||
react_native_post_install(
|
||||
installer,
|
||||
config[:reactNativePath],
|
||||
:mac_catalyst_enabled => false,
|
||||
:ccache_enabled => ccache_enabled?(podfile_properties),
|
||||
)
|
||||
end
|
||||
end
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"expo.jsEngine": "hermes",
|
||||
"EX_DEV_CLIENT_NETWORK_INSPECTOR": "true",
|
||||
"expo.inlineModules.watchedDirectories": "[]",
|
||||
"expo.inlineModules.xcodeProjectTargets": "{\"mainTarget\":\"acupedia\",\"targets\":[]}",
|
||||
"ios.forceStaticLinking": "[]",
|
||||
"apple.privacyManifestAggregationEnabled": "true",
|
||||
"EXPO_USE_PRECOMPILED_MODULES": "true"
|
||||
}
|
||||
|
|
@ -0,0 +1,583 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 54;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
|
||||
28F23D8C8BB39626A7B8451F /* libPods-acupedia.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 40DA052F03EF3DDA215261F9 /* libPods-acupedia.a */; };
|
||||
3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */; };
|
||||
472935646C2222A050BD7A28 /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = D39ACF8C15AF41518E404F3F /* ExpoModulesProvider.swift */; };
|
||||
909D62B118AE32A7C5D5B124 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 11874ADFDBC6406C55385B4A /* PrivacyInfo.xcprivacy */; };
|
||||
BB2F792D24A3F905000567C9 /* Expo.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB2F792C24A3F905000567C9 /* Expo.plist */; };
|
||||
E31641A7FED44DF1A4421612 /* expo.icon in Resources */ = {isa = PBXBuildFile; fileRef = 83E893A6BA594804B458626B /* expo.icon */; };
|
||||
F11748422D0307B40044C1D9 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F11748412D0307B40044C1D9 /* AppDelegate.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
11874ADFDBC6406C55385B4A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = acupedia/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
|
||||
13B07F961A680F5B00A75B9A /* acupedia.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = acupedia.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = acupedia/Images.xcassets; sourceTree = "<group>"; };
|
||||
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = acupedia/Info.plist; sourceTree = "<group>"; };
|
||||
40DA052F03EF3DDA215261F9 /* libPods-acupedia.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-acupedia.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
83E893A6BA594804B458626B /* expo.icon */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = expo.icon; path = acupedia/expo.icon; sourceTree = "<group>"; };
|
||||
AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = SplashScreen.storyboard; path = acupedia/SplashScreen.storyboard; sourceTree = "<group>"; };
|
||||
B0C209570BAC0D585FD9E0DC /* Pods-acupedia.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-acupedia.release.xcconfig"; path = "Target Support Files/Pods-acupedia/Pods-acupedia.release.xcconfig"; sourceTree = "<group>"; };
|
||||
BB2F792C24A3F905000567C9 /* Expo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Expo.plist; sourceTree = "<group>"; };
|
||||
BBC0EE1AA4A244749771971C /* Pods-acupedia.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-acupedia.debug.xcconfig"; path = "Target Support Files/Pods-acupedia/Pods-acupedia.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
D39ACF8C15AF41518E404F3F /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-acupedia/ExpoModulesProvider.swift"; sourceTree = "<group>"; };
|
||||
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
|
||||
F11748412D0307B40044C1D9 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = acupedia/AppDelegate.swift; sourceTree = "<group>"; };
|
||||
F11748442D0722820044C1D9 /* acupedia-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "acupedia-Bridging-Header.h"; path = "acupedia/acupedia-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
28F23D8C8BB39626A7B8451F /* libPods-acupedia.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
004657BEA532BAC4D1E19E2B /* acupedia */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D39ACF8C15AF41518E404F3F /* ExpoModulesProvider.swift */,
|
||||
);
|
||||
name = acupedia;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
13B07FAE1A68108700A75B9A /* acupedia */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F11748412D0307B40044C1D9 /* AppDelegate.swift */,
|
||||
F11748442D0722820044C1D9 /* acupedia-Bridging-Header.h */,
|
||||
BB2F792B24A3F905000567C9 /* Supporting */,
|
||||
13B07FB51A68108700A75B9A /* Images.xcassets */,
|
||||
13B07FB61A68108700A75B9A /* Info.plist */,
|
||||
AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */,
|
||||
83E893A6BA594804B458626B /* expo.icon */,
|
||||
11874ADFDBC6406C55385B4A /* PrivacyInfo.xcprivacy */,
|
||||
);
|
||||
name = acupedia;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
|
||||
40DA052F03EF3DDA215261F9 /* libPods-acupedia.a */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
832341AE1AAA6A7D00B99B32 /* Libraries */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
name = Libraries;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
83CBB9F61A601CBA00E9B192 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
13B07FAE1A68108700A75B9A /* acupedia */,
|
||||
832341AE1AAA6A7D00B99B32 /* Libraries */,
|
||||
83CBBA001A601CBA00E9B192 /* Products */,
|
||||
2D16E6871FA4F8E400B85C8A /* Frameworks */,
|
||||
8E10178E6F3679EE2FBE86B5 /* Pods */,
|
||||
D5CE83AB1929140341356C2B /* ExpoModulesProviders */,
|
||||
);
|
||||
indentWidth = 2;
|
||||
sourceTree = "<group>";
|
||||
tabWidth = 2;
|
||||
usesTabs = 0;
|
||||
};
|
||||
83CBBA001A601CBA00E9B192 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
13B07F961A680F5B00A75B9A /* acupedia.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8E10178E6F3679EE2FBE86B5 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BBC0EE1AA4A244749771971C /* Pods-acupedia.debug.xcconfig */,
|
||||
B0C209570BAC0D585FD9E0DC /* Pods-acupedia.release.xcconfig */,
|
||||
);
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BB2F792B24A3F905000567C9 /* Supporting */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BB2F792C24A3F905000567C9 /* Expo.plist */,
|
||||
);
|
||||
name = Supporting;
|
||||
path = acupedia/Supporting;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D5CE83AB1929140341356C2B /* ExpoModulesProviders */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
004657BEA532BAC4D1E19E2B /* acupedia */,
|
||||
);
|
||||
name = ExpoModulesProviders;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
13B07F861A680F5B00A75B9A /* acupedia */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "acupedia" */;
|
||||
buildPhases = (
|
||||
08A4A3CD28434E44B6B9DE2E /* [CP] Check Pods Manifest.lock */,
|
||||
30E5F31EA5DA7D23133E2622 /* [Expo] Configure project */,
|
||||
13B07F871A680F5B00A75B9A /* Sources */,
|
||||
13B07F8C1A680F5B00A75B9A /* Frameworks */,
|
||||
13B07F8E1A680F5B00A75B9A /* Resources */,
|
||||
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
|
||||
800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */,
|
||||
1329097C29E93362FD1EE9C7 /* [CP] Embed Pods Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = acupedia;
|
||||
productName = acupedia;
|
||||
productReference = 13B07F961A680F5B00A75B9A /* acupedia.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
83CBB9F71A601CBA00E9B192 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = YES;
|
||||
LastUpgradeCheck = 1640;
|
||||
TargetAttributes = {
|
||||
13B07F861A680F5B00A75B9A = {
|
||||
LastSwiftMigration = 1250;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "acupedia" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 83CBB9F61A601CBA00E9B192;
|
||||
productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
13B07F861A680F5B00A75B9A /* acupedia */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
13B07F8E1A680F5B00A75B9A /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
BB2F792D24A3F905000567C9 /* Expo.plist in Resources */,
|
||||
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
|
||||
3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */,
|
||||
E31641A7FED44DF1A4421612 /* expo.icon in Resources */,
|
||||
909D62B118AE32A7C5D5B124 /* PrivacyInfo.xcprivacy in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"$(SRCROOT)/.xcode.env",
|
||||
"$(SRCROOT)/.xcode.env.local",
|
||||
);
|
||||
name = "Bundle React Native code and images";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "if [[ -f \"$PODS_ROOT/../.xcode.env\" ]]; then\n source \"$PODS_ROOT/../.xcode.env\"\nfi\nif [[ -f \"$PODS_ROOT/../.xcode.env.local\" ]]; then\n source \"$PODS_ROOT/../.xcode.env.local\"\nfi\n\n# The project root by default is one level up from the ios directory\nexport PROJECT_ROOT=\"$PROJECT_DIR\"/..\n\nif [[ \"$CONFIGURATION\" = *Debug* ]]; then\n export SKIP_BUNDLING=1\nfi\nif [[ -z \"$ENTRY_FILE\" ]]; then\n # Set the entry JS file using the bundler's entry resolution.\n export ENTRY_FILE=\"$(\"$NODE_BINARY\" -e \"require('expo/scripts/resolveAppEntry')\" \"$PROJECT_ROOT\" ios absolute | tail -n 1)\"\nfi\n\nif [[ -z \"$CLI_PATH\" ]]; then\n # Use Expo CLI\n export CLI_PATH=\"$(\"$NODE_BINARY\" --print \"require.resolve('@expo/cli', { paths: [require.resolve('expo/package.json')] })\")\"\nfi\nif [[ -z \"$BUNDLE_COMMAND\" ]]; then\n # Default Expo CLI command for bundling\n export BUNDLE_COMMAND=\"export:embed\"\nfi\n\n# Source .xcode.env.updates if it exists to allow\n# SKIP_BUNDLING to be unset if needed\nif [[ -f \"$PODS_ROOT/../.xcode.env.updates\" ]]; then\n source \"$PODS_ROOT/../.xcode.env.updates\"\nfi\n# Source local changes to allow overrides\n# if needed\nif [[ -f \"$PODS_ROOT/../.xcode.env.local\" ]]; then\n source \"$PODS_ROOT/../.xcode.env.local\"\nfi\n\n`\"$NODE_BINARY\" --print \"require('path').dirname(require.resolve('react-native/package.json')) + '/scripts/react-native-xcode.sh'\"`\n\n";
|
||||
};
|
||||
08A4A3CD28434E44B6B9DE2E /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-acupedia-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
1329097C29E93362FD1EE9C7 /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-acupedia/Pods-acupedia-frameworks.sh",
|
||||
"${PODS_XCFRAMEWORKS_BUILD_DIR}/React-Core-prebuilt/React.framework/React",
|
||||
"${PODS_XCFRAMEWORKS_BUILD_DIR}/ReactNativeDependencies/ReactNativeDependencies.framework/ReactNativeDependencies",
|
||||
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/React.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ReactNativeDependencies.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-acupedia/Pods-acupedia-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
30E5F31EA5DA7D23133E2622 /* [Expo] Configure project */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"$(SRCROOT)/.xcode.env",
|
||||
"$(SRCROOT)/.xcode.env.local",
|
||||
"$(SRCROOT)/acupedia/acupedia.entitlements",
|
||||
"$(SRCROOT)/Pods/Target Support Files/Pods-acupedia/expo-configure-project.sh",
|
||||
);
|
||||
name = "[Expo] Configure project";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(SRCROOT)/Pods/Target Support Files/Pods-acupedia/ExpoModulesProvider.swift",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "# This script configures Expo modules and generates the modules provider file.\nbash -l -c \"./Pods/Target\\ Support\\ Files/Pods-acupedia/expo-configure-project.sh\"\n";
|
||||
};
|
||||
800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-acupedia/Pods-acupedia-resources.sh",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/EXConstants.bundle",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/ExpoConstants_privacy.bundle",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/ExpoDevice/ExpoDevice_privacy.bundle",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/ExpoFileSystem/ExpoFileSystem_privacy.bundle",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/ExpoSystemUI/ExpoSystemUI_privacy.bundle",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/RNCAsyncStorage/RNCAsyncStorage_resources.bundle",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/React-Core_privacy.bundle",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/React-cxxreact/React-cxxreact_privacy.bundle",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.bundle",
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXConstants.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoConstants_privacy.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoDevice_privacy.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoFileSystem_privacy.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoSystemUI_privacy.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RNCAsyncStorage_resources.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/React-Core_privacy.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/React-cxxreact_privacy.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SDWebImage.bundle",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-acupedia/Pods-acupedia-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
13B07F871A680F5B00A75B9A /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
F11748422D0307B40044C1D9 /* AppDelegate.swift in Sources */,
|
||||
472935646C2222A050BD7A28 /* ExpoModulesProvider.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
13B07F941A680F5B00A75B9A /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = BBC0EE1AA4A244749771971C /* Pods-acupedia.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = acupedia/acupedia.entitlements;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
ENABLE_BITCODE = NO;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"$(inherited)",
|
||||
"FB_SONARKIT_ENABLED=1",
|
||||
);
|
||||
INFOPLIST_FILE = acupedia/Info.plist;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = AcuPedia;
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16.4;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 13.4;
|
||||
MARKETING_VERSION = 1.0;
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-ObjC",
|
||||
"-lc++",
|
||||
);
|
||||
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.renownent.mobile.acupedia;
|
||||
PRODUCT_NAME = acupedia;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "acupedia/acupedia-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
13B07F951A680F5B00A75B9A /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = B0C209570BAC0D585FD9E0DC /* Pods-acupedia.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = acupedia/acupedia.entitlements;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
INFOPLIST_FILE = acupedia/Info.plist;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = AcuPedia;
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16.4;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 13.4;
|
||||
MARKETING_VERSION = 1.0;
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-ObjC",
|
||||
"-lc++",
|
||||
);
|
||||
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.renownent.mobile.acupedia;
|
||||
PRODUCT_NAME = acupedia;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "acupedia/acupedia-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
83CBBA201A601CBA00E9B192 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEVELOPMENT_TEAM = FMXD47BSV9;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16.4;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
/usr/lib/swift,
|
||||
"$(inherited)",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = "$(SDKROOT)/usr/lib/swift\"$(inherited)\"";
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_CFLAGS = (
|
||||
"$(inherited)",
|
||||
"-DRCT_REMOVE_LEGACY_ARCH=1",
|
||||
);
|
||||
OTHER_CPLUSPLUSFLAGS = (
|
||||
"$(inherited)",
|
||||
"-DRCT_REMOVE_LEGACY_ARCH=1",
|
||||
);
|
||||
PODFILE_DIR = "$(SRCROOT)";
|
||||
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
|
||||
SWIFT_ENABLE_EXPLICIT_MODULES = NO;
|
||||
USE_HERMES = true;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
83CBBA211A601CBA00E9B192 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DEVELOPMENT_TEAM = FMXD47BSV9;
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16.4;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
/usr/lib/swift,
|
||||
"$(inherited)",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = "$(SDKROOT)/usr/lib/swift\"$(inherited)\"";
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
OTHER_CFLAGS = (
|
||||
"$(inherited)",
|
||||
"-DRCT_REMOVE_LEGACY_ARCH=1",
|
||||
);
|
||||
OTHER_CPLUSPLUSFLAGS = (
|
||||
"$(inherited)",
|
||||
"-DRCT_REMOVE_LEGACY_ARCH=1",
|
||||
);
|
||||
PODFILE_DIR = "$(SRCROOT)";
|
||||
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_ENABLE_EXPLICIT_MODULES = NO;
|
||||
USE_HERMES = true;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "acupedia" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
13B07F941A680F5B00A75B9A /* Debug */,
|
||||
13B07F951A680F5B00A75B9A /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "acupedia" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
83CBBA201A601CBA00E9B192 /* Debug */,
|
||||
83CBBA211A601CBA00E9B192 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
|
||||
}
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1640"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "acupedia.app"
|
||||
BlueprintName = "acupedia"
|
||||
ReferencedContainer = "container:acupedia.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
|
||||
BuildableName = "acupediaTests.xctest"
|
||||
BlueprintName = "acupediaTests"
|
||||
ReferencedContainer = "container:acupedia.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "acupedia.app"
|
||||
BlueprintName = "acupedia"
|
||||
ReferencedContainer = "container:acupedia.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "acupedia.app"
|
||||
BlueprintName = "acupedia"
|
||||
ReferencedContainer = "container:acupedia.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:acupedia.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:Pods/Pods.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
import Expo
|
||||
import React
|
||||
import ReactAppDependencyProvider
|
||||
|
||||
@main
|
||||
class AppDelegate: ExpoAppDelegate {
|
||||
var window: UIWindow?
|
||||
|
||||
var reactNativeDelegate: ExpoReactNativeFactoryDelegate?
|
||||
var reactNativeFactory: RCTReactNativeFactory?
|
||||
|
||||
public override func application(
|
||||
_ application: UIApplication,
|
||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
|
||||
) -> Bool {
|
||||
let delegate = ReactNativeDelegate()
|
||||
let factory = ExpoReactNativeFactory(delegate: delegate)
|
||||
delegate.dependencyProvider = RCTAppDependencyProvider()
|
||||
|
||||
reactNativeDelegate = delegate
|
||||
reactNativeFactory = factory
|
||||
bindReactNativeFactory(factory)
|
||||
|
||||
#if os(iOS) || os(tvOS)
|
||||
window = UIWindow(frame: UIScreen.main.bounds)
|
||||
factory.startReactNative(
|
||||
withModuleName: "main",
|
||||
in: window,
|
||||
launchOptions: launchOptions)
|
||||
#endif
|
||||
|
||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||
}
|
||||
|
||||
// Linking API
|
||||
public override func application(
|
||||
_ app: UIApplication,
|
||||
open url: URL,
|
||||
options: [UIApplication.OpenURLOptionsKey: Any] = [:]
|
||||
) -> Bool {
|
||||
return super.application(app, open: url, options: options) || RCTLinkingManager.application(app, open: url, options: options)
|
||||
}
|
||||
|
||||
// Universal Links
|
||||
public override func application(
|
||||
_ application: UIApplication,
|
||||
continue userActivity: NSUserActivity,
|
||||
restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void
|
||||
) -> Bool {
|
||||
let result = RCTLinkingManager.application(application, continue: userActivity, restorationHandler: restorationHandler)
|
||||
return super.application(application, continue: userActivity, restorationHandler: restorationHandler) || result
|
||||
}
|
||||
}
|
||||
|
||||
class ReactNativeDelegate: ExpoReactNativeFactoryDelegate {
|
||||
// Extension point for config-plugins
|
||||
|
||||
override func sourceURL(for bridge: RCTBridge) -> URL? {
|
||||
// needed to return the correct URL for expo-dev-client.
|
||||
bridge.bundleURL ?? bundleURL()
|
||||
}
|
||||
|
||||
override func bundleURL() -> URL? {
|
||||
#if DEBUG
|
||||
return RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: ".expo/.virtual-metro-entry")
|
||||
#else
|
||||
return Bundle.main.url(forResource: "main", withExtension: "jsbundle")
|
||||
#endif
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 780 KiB |
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"images": [
|
||||
{
|
||||
"filename": "AppIcon.png",
|
||||
"idiom": "universal",
|
||||
"platform": "ios",
|
||||
"size": "1024x1024"
|
||||
}
|
||||
],
|
||||
"info": {
|
||||
"author": "expo",
|
||||
"version": 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "expo"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"colors": [
|
||||
{
|
||||
"color": {
|
||||
"components": {
|
||||
"alpha": "1.000",
|
||||
"blue": "0.937254901960784",
|
||||
"green": "0.541176470588235",
|
||||
"red": "0.125490196078431"
|
||||
},
|
||||
"color-space": "srgb"
|
||||
},
|
||||
"idiom": "universal"
|
||||
}
|
||||
],
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "expo"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images": [
|
||||
{
|
||||
"idiom": "universal",
|
||||
"filename": "image.png",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"idiom": "universal",
|
||||
"filename": "image@2x.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"idiom": "universal",
|
||||
"filename": "image@3x.png",
|
||||
"scale": "3x"
|
||||
}
|
||||
],
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "expo"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
|
|
@ -0,0 +1,81 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<true/>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>acupedia</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>myapp</string>
|
||||
<string>com.renownent.acupedia</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>12.0</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>NSUserActivityTypes</key>
|
||||
<array>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route</string>
|
||||
</array>
|
||||
<key>RCTMetroPort</key>
|
||||
<string>$(RCT_METRO_PORT)</string>
|
||||
<key>RCTNewArchEnabled</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>SplashScreen</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>UIRequiresFullScreen</key>
|
||||
<false/>
|
||||
<key>UIStatusBarStyle</key>
|
||||
<string>UIStatusBarStyleLightContent</string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIUserInterfaceStyle</key>
|
||||
<string>Automatic</string>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSPrivacyAccessedAPITypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>NSPrivacyAccessedAPIType</key>
|
||||
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
|
||||
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||
<array>
|
||||
<string>CA92.1</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>NSPrivacyAccessedAPIType</key>
|
||||
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
|
||||
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||
<array>
|
||||
<string>35F9.1</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>NSPrivacyAccessedAPIType</key>
|
||||
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
|
||||
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||
<array>
|
||||
<string>0A2A.1</string>
|
||||
<string>3B52.1</string>
|
||||
<string>C617.1</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>NSPrivacyAccessedAPIType</key>
|
||||
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
|
||||
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||
<array>
|
||||
<string>E174.1</string>
|
||||
<string>85F4.1</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>NSPrivacyCollectedDataTypes</key>
|
||||
<array/>
|
||||
<key>NSPrivacyTracking</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="24093.7" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="EXPO-VIEWCONTROLLER-1">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="24053.1"/>
|
||||
<capability name="Named colors" minToolsVersion="9.0"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<scene sceneID="EXPO-SCENE-1">
|
||||
<objects>
|
||||
<viewController storyboardIdentifier="SplashScreenViewController" id="EXPO-VIEWCONTROLLER-1" sceneMemberID="viewController">
|
||||
<view key="view" userInteractionEnabled="NO" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="EXPO-ContainerView" userLabel="ContainerView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView id="EXPO-SplashScreen" userLabel="SplashScreenLogo" image="SplashScreenLogo" contentMode="scaleAspectFit" clipsSubviews="true" userInteractionEnabled="false" translatesAutoresizingMaskIntoConstraints="false">
|
||||
<rect key="frame" x="158.5" y="388" width="76" height="76"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="Rmq-lb-GrQ"/>
|
||||
<constraints>
|
||||
<constraint firstItem="EXPO-SplashScreen" firstAttribute="centerX" secondItem="EXPO-ContainerView" secondAttribute="centerX" id="cad2ab56f97c5429bf29decf850647a4216861d4"/>
|
||||
<constraint firstItem="EXPO-SplashScreen" firstAttribute="centerY" secondItem="EXPO-ContainerView" secondAttribute="centerY" id="1a145271b085b6ce89b1405a310f5b1bb7656595"/>
|
||||
</constraints>
|
||||
<color key="backgroundColor" name="SplashScreenBackground"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="EXPO-PLACEHOLDER-1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="0.0" y="0.0"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="SplashScreenLogo" width="76" height="76"/>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
<namedColor name="SplashScreenBackground">
|
||||
<color alpha="1.000" blue="0.937254901960784" green="0.541176470588235" red="0.125490196078431" customColorSpace="sRGB" colorSpace="custom"/>
|
||||
</namedColor>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>EXUpdatesCheckOnLaunch</key>
|
||||
<string>ALWAYS</string>
|
||||
<key>EXUpdatesEnableBsdiffPatchSupport</key>
|
||||
<true/>
|
||||
<key>EXUpdatesEnabled</key>
|
||||
<false/>
|
||||
<key>EXUpdatesLaunchWaitMs</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
//
|
||||
// Use this file to import your target's public headers that you would like to expose to Swift.
|
||||
//
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict/>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<svg width="652" height="606" viewBox="0 0 652 606" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M353.554 0H298.446C273.006 0 249.684 14.6347 237.962 37.9539L4.37994 502.646C-1.04325 513.435 -1.45067 526.178 3.2716 537.313L22.6123 582.918C34.6475 611.297 72.5404 614.156 88.4414 587.885L309.863 222.063C313.34 216.317 319.439 212.826 326 212.826C332.561 212.826 338.659 216.317 342.137 222.063L563.559 587.885C579.46 614.156 617.352 611.297 629.388 582.918L648.728 537.313C653.451 526.178 653.043 513.435 647.62 502.646L414.038 37.9539C402.316 14.6347 378.994 0 353.554 0Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 608 B |
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"fill" : {
|
||||
"automatic-gradient" : "extended-srgb:0.00000,0.47843,1.00000,1.00000"
|
||||
},
|
||||
"groups" : [
|
||||
{
|
||||
"layers" : [
|
||||
{
|
||||
"image-name" : "expo-symbol 2.svg",
|
||||
"name" : "expo-symbol 2",
|
||||
"position" : {
|
||||
"scale" : 1,
|
||||
"translation-in-points" : [
|
||||
1.1008400065293245e-05,
|
||||
-16.046875
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"image-name" : "grid.png",
|
||||
"name" : "grid"
|
||||
}
|
||||
],
|
||||
"shadow" : {
|
||||
"kind" : "neutral",
|
||||
"opacity" : 0.5
|
||||
},
|
||||
"translucency" : {
|
||||
"enabled" : true,
|
||||
"value" : 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"supported-platforms" : {
|
||||
"circles" : [
|
||||
"watchOS"
|
||||
],
|
||||
"squares" : "shared"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
64
package.json
64
package.json
|
|
@ -4,45 +4,45 @@
|
|||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
"@expo-google-fonts/inter": "^0.4.2",
|
||||
"@expo/ui": "~57.0.16",
|
||||
"@expo/vector-icons": "^15.1.1",
|
||||
"@react-native-async-storage/async-storage": "~2.2.0",
|
||||
"@react-native-community/netinfo": "12.0.1",
|
||||
"@expo/ui": "0.2.0-beta.9",
|
||||
"@expo/vector-icons": "^15.0.2",
|
||||
"@react-native-async-storage/async-storage": "2.2.0",
|
||||
"@react-native-community/netinfo": "11.4.1",
|
||||
"@tanstack/react-query": "^5.101.2",
|
||||
"axios": "^1.18.1",
|
||||
"expo": "~57.0.3",
|
||||
"expo-build-properties": "~57.0.22",
|
||||
"expo-constants": "~57.0.19",
|
||||
"expo-device": "~57.0.2",
|
||||
"expo-font": "~57.0.4",
|
||||
"expo-glass-effect": "~57.0.1",
|
||||
"expo-image": "~57.0.4",
|
||||
"expo-linear-gradient": "~57.0.2",
|
||||
"expo-linking": "~57.0.11",
|
||||
"expo-router": "~57.0.23",
|
||||
"expo-screen-capture": "~57.0.3",
|
||||
"expo-secure-store": "~57.0.4",
|
||||
"expo-splash-screen": "~57.0.9",
|
||||
"expo-status-bar": "~57.0.1",
|
||||
"expo-symbols": "~57.0.2",
|
||||
"expo-system-ui": "~57.0.4",
|
||||
"expo-web-browser": "~57.0.3",
|
||||
"react": "19.2.3",
|
||||
"react-dom": "19.2.3",
|
||||
"react-native": "0.86.3",
|
||||
"react-native-gesture-handler": "~2.32.0",
|
||||
"react-native-reanimated": "4.5.1",
|
||||
"react-native-safe-area-context": "~5.7.0",
|
||||
"react-native-screens": "~4.26.0",
|
||||
"expo": "~54.0.0",
|
||||
"expo-build-properties": "~1.0.10",
|
||||
"expo-constants": "~18.0.10",
|
||||
"expo-device": "~8.0.9",
|
||||
"expo-font": "~14.0.9",
|
||||
"expo-glass-effect": "~0.1.10",
|
||||
"expo-image": "~3.0.10",
|
||||
"expo-linear-gradient": "~15.0.7",
|
||||
"expo-linking": "~8.0.12",
|
||||
"expo-router": "~6.0.24",
|
||||
"expo-screen-capture": "~8.0.8",
|
||||
"expo-secure-store": "~15.0.7",
|
||||
"expo-splash-screen": "~31.0.11",
|
||||
"expo-status-bar": "~3.0.8",
|
||||
"expo-symbols": "~1.0.7",
|
||||
"expo-system-ui": "~6.0.9",
|
||||
"expo-web-browser": "~15.0.11",
|
||||
"react": "19.1.0",
|
||||
"react-dom": "19.1.0",
|
||||
"react-native": "0.81.5",
|
||||
"react-native-gesture-handler": "~2.28.0",
|
||||
"react-native-reanimated": "~4.1.1",
|
||||
"react-native-safe-area-context": "~5.6.0",
|
||||
"react-native-screens": "~4.16.0",
|
||||
"react-native-size-matters": "^0.4.2",
|
||||
"react-native-toast-message": "^2.3.3",
|
||||
"react-native-web": "~0.21.3",
|
||||
"react-native-worklets": "0.10.1",
|
||||
"react-native-web": "~0.21.0",
|
||||
"react-native-worklets": "0.5.1",
|
||||
"zustand": "^4.5.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "~19.2.2",
|
||||
"typescript": "~6.0.3"
|
||||
"@types/react": "~19.1.10",
|
||||
"typescript": "~5.9.2"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "expo start",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useCallback, useEffect, useMemo } from "react";
|
||||
import React, { useCallback, useEffect, useMemo, useRef } from "react";
|
||||
import {
|
||||
ScrollView,
|
||||
StyleSheet,
|
||||
|
|
@ -23,6 +23,8 @@ import {
|
|||
} from "@/features/modules/module-index";
|
||||
|
||||
export default function LibraryScreen() {
|
||||
const isNavigatingRef = useRef(false);
|
||||
|
||||
const {
|
||||
access,
|
||||
accessToken,
|
||||
|
|
@ -53,6 +55,7 @@ export default function LibraryScreen() {
|
|||
|
||||
useFocusEffect(
|
||||
useCallback(() => {
|
||||
isNavigatingRef.current = false;
|
||||
if (accessToken) {
|
||||
void refreshAccess().catch((error) => console.warn("Unable to refresh library access:", error));
|
||||
}
|
||||
|
|
@ -79,6 +82,12 @@ export default function LibraryScreen() {
|
|||
|
||||
const handleModulePress = useCallback(
|
||||
(item: ModuleIndexItem) => {
|
||||
if (isNavigatingRef.current) return;
|
||||
isNavigatingRef.current = true;
|
||||
setTimeout(() => {
|
||||
isNavigatingRef.current = false;
|
||||
}, 1000);
|
||||
|
||||
setLastViewedModule({
|
||||
moduleId: item.module.id,
|
||||
moduleCode: item.module.code,
|
||||
|
|
|
|||
|
|
@ -80,13 +80,16 @@ export default function ForgotPasswordScreen() {
|
|||
} else if (newPassword.length < 8) {
|
||||
setPasswordError("Must be at least 8 characters");
|
||||
hasError = true;
|
||||
} else if (/\s/.test(newPassword)) {
|
||||
setPasswordError("Password must not contain spaces");
|
||||
hasError = true;
|
||||
} else if (!/[A-Z]/.test(newPassword)) {
|
||||
setPasswordError("Must contain at least one uppercase letter");
|
||||
hasError = true;
|
||||
} else if (!/[0-9]/.test(newPassword)) {
|
||||
setPasswordError("Must contain at least one number");
|
||||
hasError = true;
|
||||
} else if (!/[^A-Za-z0-9]/.test(newPassword)) {
|
||||
} else if (!/[^A-Za-z0-9\s]/.test(newPassword)) {
|
||||
setPasswordError("Must contain at least one special character");
|
||||
hasError = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,13 +45,16 @@ export default function ChangePasswordScreen() {
|
|||
} else if (newPassword.length < 8) {
|
||||
setNewError("New password must be at least 8 characters");
|
||||
hasError = true;
|
||||
} else if (/\s/.test(newPassword)) {
|
||||
setNewError("Password must not contain spaces");
|
||||
hasError = true;
|
||||
} else if (!/[A-Z]/.test(newPassword)) {
|
||||
setNewError("Must contain at least one uppercase letter");
|
||||
hasError = true;
|
||||
} else if (!/[0-9]/.test(newPassword)) {
|
||||
setNewError("Must contain at least one number");
|
||||
hasError = true;
|
||||
} else if (!/[^A-Za-z0-9]/.test(newPassword)) {
|
||||
} else if (!/[^A-Za-z0-9\s]/.test(newPassword)) {
|
||||
setNewError("Must contain at least one special character");
|
||||
hasError = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import React, { useCallback, useMemo, useState } from "react";
|
||||
import {
|
||||
Alert,
|
||||
BackHandler,
|
||||
Linking,
|
||||
Platform,
|
||||
ScrollView,
|
||||
|
|
@ -53,6 +54,8 @@ function resolveStorefrontUrl(): string {
|
|||
return "http://localhost:3000";
|
||||
}
|
||||
|
||||
const DEFAULT_RETURN_ROUTE = "/modules";
|
||||
|
||||
export default function SubscriptionScreen() {
|
||||
const params = useLocalSearchParams();
|
||||
const accessToken = useAuthStore((state) => state.accessToken);
|
||||
|
|
@ -64,6 +67,7 @@ export default function SubscriptionScreen() {
|
|||
const title = param(params.title) || "Clinical Module";
|
||||
const description = param(params.desc);
|
||||
const planCode = param(params.planCode).trim().toUpperCase();
|
||||
const returnRoute = param(params.returnRoute) || param(params.returnTo) || DEFAULT_RETURN_ROUTE;
|
||||
|
||||
const [openingCheckout, setOpeningCheckout] = useState(false);
|
||||
|
||||
|
|
@ -81,6 +85,30 @@ export default function SubscriptionScreen() {
|
|||
}, [accessToken, refreshAccess]),
|
||||
);
|
||||
|
||||
const handleBack = useCallback(() => {
|
||||
if (unlocked) {
|
||||
router.replace(returnRoute as never);
|
||||
return true;
|
||||
}
|
||||
if (router.canGoBack()) {
|
||||
router.back();
|
||||
} else {
|
||||
router.replace(returnRoute as never);
|
||||
}
|
||||
return true;
|
||||
}, [unlocked, returnRoute]);
|
||||
|
||||
useFocusEffect(
|
||||
useCallback(() => {
|
||||
const onBackPress = () => handleBack();
|
||||
const subscription = BackHandler.addEventListener(
|
||||
"hardwareBackPress",
|
||||
onBackPress
|
||||
);
|
||||
return () => subscription.remove();
|
||||
}, [handleBack])
|
||||
);
|
||||
|
||||
const showAlert = (alertTitle: string, message: string, onConfirm?: () => void) => {
|
||||
if (Platform.OS === "web") {
|
||||
alert(`${alertTitle}\n\n${message}`);
|
||||
|
|
@ -114,6 +142,13 @@ export default function SubscriptionScreen() {
|
|||
if (apiUrl) query.set("apiUrl", apiUrl);
|
||||
if (moduleId) query.set("moduleId", moduleId);
|
||||
if (moduleCode) query.set("moduleCode", moduleCode);
|
||||
const returnRouteClean = returnRoute.replace(/^\/+/, "");
|
||||
if (returnRouteClean) query.set("returnRoute", returnRouteClean);
|
||||
|
||||
const appScheme = Array.isArray(Constants.expoConfig?.scheme)
|
||||
? Constants.expoConfig?.scheme[0]
|
||||
: Constants.expoConfig?.scheme;
|
||||
if (appScheme) query.set("scheme", appScheme);
|
||||
|
||||
const checkoutUrl = `${storefrontUrl}?${query.toString()}`;
|
||||
showAlert(
|
||||
|
|
@ -132,9 +167,11 @@ export default function SubscriptionScreen() {
|
|||
<SafeAreaView style={styles.safeArea} edges={["top", "bottom", "left", "right"]}>
|
||||
<View style={styles.header}>
|
||||
<TouchableOpacity
|
||||
onPress={() => router.back()}
|
||||
onPress={handleBack}
|
||||
style={styles.backButton}
|
||||
hitSlop={{ top: 12, bottom: 12, left: 12, right: 12 }}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel="Go back"
|
||||
>
|
||||
<Ionicons name="chevron-back" size={24} color={Colors.textPrimary} />
|
||||
</TouchableOpacity>
|
||||
|
|
@ -179,7 +216,7 @@ export default function SubscriptionScreen() {
|
|||
) : (
|
||||
<PrimaryButton
|
||||
title="Back to Modules"
|
||||
onPress={() => router.replace("/modules")}
|
||||
onPress={() => router.replace(returnRoute as never)}
|
||||
/>
|
||||
)}
|
||||
</View>
|
||||
|
|
|
|||
|
|
@ -71,6 +71,9 @@ export default function LoginForm({
|
|||
if (!password) {
|
||||
setPasswordError("Password is required");
|
||||
hasError = true;
|
||||
} else if (/\s/.test(password)) {
|
||||
setPasswordError("Password must not contain spaces");
|
||||
hasError = true;
|
||||
}
|
||||
|
||||
if (hasError) return;
|
||||
|
|
|
|||
|
|
@ -63,13 +63,16 @@ export default function SignUpForm() {
|
|||
} else if (password.length < 8) {
|
||||
setPasswordError("Password must be at least 8 characters");
|
||||
hasError = true;
|
||||
} else if (/\s/.test(password)) {
|
||||
setPasswordError("Password must not contain spaces");
|
||||
hasError = true;
|
||||
} else if (!/[A-Z]/.test(password)) {
|
||||
setPasswordError("Password must contain at least one uppercase letter (A-Z)");
|
||||
hasError = true;
|
||||
} else if (!/[0-9]/.test(password)) {
|
||||
setPasswordError("Password must contain at least one number (0-9)");
|
||||
hasError = true;
|
||||
} else if (!/[^A-Za-z0-9]/.test(password)) {
|
||||
} else if (!/[^A-Za-z0-9\s]/.test(password)) {
|
||||
setPasswordError("Password must contain at least one special character (!@#$)");
|
||||
hasError = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ export function ContentLink({
|
|||
disabled = false,
|
||||
}: ContentLinkProps) {
|
||||
const router = useRouter();
|
||||
const isNavigatingRef = React.useRef(false);
|
||||
const label = reference.label?.trim() || defaultReferenceLabel(reference);
|
||||
|
||||
return (
|
||||
|
|
@ -41,6 +42,12 @@ export function ContentLink({
|
|||
accessibilityState={{ disabled }}
|
||||
disabled={disabled}
|
||||
onPress={() => {
|
||||
if (isNavigatingRef.current) return;
|
||||
isNavigatingRef.current = true;
|
||||
setTimeout(() => {
|
||||
isNavigatingRef.current = false;
|
||||
}, 1000);
|
||||
|
||||
onPress?.(reference);
|
||||
router.push(buildContentReferenceRoute(reference) as never);
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,51 @@
|
|||
import React from "react";
|
||||
import { TextInput, View } from "react-native";
|
||||
export function ContentSearchBar({value,onChangeText}:{value:string;onChangeText:(v:string)=>void}){return <View style={{padding:16}}><TextInput value={value} onChangeText={onChangeText} placeholder="Search..." autoCapitalize="none" autoCorrect={false} style={{borderWidth:1,borderRadius:10,padding:10}}/></View>}
|
||||
import { StyleSheet, TextInput, View } from "react-native";
|
||||
import { Ionicons } from "@expo/vector-icons";
|
||||
import { Colors } from "@/theme";
|
||||
|
||||
export function ContentSearchBar({
|
||||
value,
|
||||
onChangeText,
|
||||
}: {
|
||||
value: string;
|
||||
onChangeText: (v: string) => void;
|
||||
}) {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<View style={styles.searchBox}>
|
||||
<Ionicons name="search" size={18} color={Colors.primaryDark} />
|
||||
<TextInput
|
||||
value={value}
|
||||
onChangeText={onChangeText}
|
||||
placeholder="Search…"
|
||||
placeholderTextColor={Colors.textSecondary}
|
||||
autoCapitalize="none"
|
||||
autoCorrect={false}
|
||||
style={styles.input}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
padding: 16,
|
||||
},
|
||||
searchBox: {
|
||||
flexDirection: "row",
|
||||
alignItems: "center",
|
||||
gap: 8,
|
||||
borderWidth: 1,
|
||||
borderColor: Colors.border,
|
||||
borderRadius: 10,
|
||||
paddingHorizontal: 12,
|
||||
backgroundColor: "#FAFAFA",
|
||||
},
|
||||
input: {
|
||||
flex: 1,
|
||||
paddingVertical: 10,
|
||||
fontSize: 14,
|
||||
color: Colors.textPrimary,
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,3 +1,52 @@
|
|||
import React from "react";
|
||||
import { TextInput, View } from "react-native";
|
||||
export function SearchHeader({value,onChangeText,placeholder="Search…"}:{value:string;onChangeText:(v:string)=>void;placeholder?:string}){ return <View style={{padding:12}}><TextInput value={value} onChangeText={onChangeText} placeholder={placeholder} autoCorrect={false} style={{borderWidth:1,borderRadius:10,paddingHorizontal:12,paddingVertical:10,fontSize:16}}/></View>; }
|
||||
import { StyleSheet, TextInput, View } from "react-native";
|
||||
import { Ionicons } from "@expo/vector-icons";
|
||||
import { Colors } from "@/theme";
|
||||
|
||||
export function SearchHeader({
|
||||
value,
|
||||
onChangeText,
|
||||
placeholder = "Search…",
|
||||
}: {
|
||||
value: string;
|
||||
onChangeText: (v: string) => void;
|
||||
placeholder?: string;
|
||||
}) {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<View style={styles.searchBox}>
|
||||
<Ionicons name="search" size={18} color={Colors.primaryDark} />
|
||||
<TextInput
|
||||
value={value}
|
||||
onChangeText={onChangeText}
|
||||
placeholder={placeholder}
|
||||
placeholderTextColor={Colors.textSecondary}
|
||||
autoCorrect={false}
|
||||
style={styles.input}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
padding: 12,
|
||||
},
|
||||
searchBox: {
|
||||
flexDirection: "row",
|
||||
alignItems: "center",
|
||||
gap: 8,
|
||||
borderWidth: 1,
|
||||
borderColor: Colors.border,
|
||||
borderRadius: 10,
|
||||
paddingHorizontal: 12,
|
||||
backgroundColor: "#FAFAFA",
|
||||
},
|
||||
input: {
|
||||
flex: 1,
|
||||
paddingVertical: 10,
|
||||
fontSize: 16,
|
||||
color: Colors.textPrimary,
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ function sortMedia(media: ContentMediaItem[]): ContentMediaItem[] {
|
|||
.sort((a, b) => {
|
||||
if (a.media_role === "primary" && b.media_role !== "primary") return -1;
|
||||
if (b.media_role === "primary" && a.media_role !== "primary") return 1;
|
||||
return a.sort_order - b.sort_order || a.id.localeCompare(b.id);
|
||||
return (a.sort_order ?? 0) - (b.sort_order ?? 0) || a.id.localeCompare(b.id);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -232,7 +232,7 @@ const styles = StyleSheet.create({
|
|||
slide: { height: 290, alignItems: "center", justifyContent: "center" },
|
||||
image: { width: "100%", height: "100%", backgroundColor: Colors.surface },
|
||||
loadingOverlay: {
|
||||
...StyleSheet.absoluteFillObject,
|
||||
...(StyleSheet.absoluteFill as object),
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
backgroundColor: Colors.surface,
|
||||
|
|
|
|||
|
|
@ -10,13 +10,14 @@ import {
|
|||
View,
|
||||
ViewToken,
|
||||
} from "react-native";
|
||||
import { GestureHandlerRootView } from "react-native-gesture-handler";
|
||||
import { SafeAreaView } from "react-native-safe-area-context";
|
||||
|
||||
import { useAuthStore } from "@/store/auth.store";
|
||||
import { Colors } from "@/theme/colors";
|
||||
import type { ContentMediaItem } from "../types/media.types";
|
||||
import { mediaLabel } from "./media-source";
|
||||
import { ZoomableImage } from "./ZoomableImage";
|
||||
import { ZoomableImage, type ZoomableImageHandle } from "./ZoomableImage";
|
||||
|
||||
interface FullScreenMediaViewerProps {
|
||||
visible: boolean;
|
||||
|
|
@ -32,6 +33,7 @@ export function FullScreenMediaViewer({
|
|||
onClose,
|
||||
}: FullScreenMediaViewerProps) {
|
||||
const listRef = useRef<FlatList<ContentMediaItem>>(null);
|
||||
const imageRefs = useRef<Map<string, ZoomableImageHandle>>(new Map());
|
||||
const { width, height } = useWindowDimensions();
|
||||
const accessToken = useAuthStore((state) => state.accessToken);
|
||||
const [activeIndex, setActiveIndex] = useState(initialIndex);
|
||||
|
|
@ -61,6 +63,24 @@ export function FullScreenMediaViewer({
|
|||
|
||||
const active = images[activeIndex];
|
||||
|
||||
const handleZoomIn = () => {
|
||||
if (active) {
|
||||
imageRefs.current.get(active.id)?.zoomIn();
|
||||
}
|
||||
};
|
||||
|
||||
const handleZoomOut = () => {
|
||||
if (active) {
|
||||
imageRefs.current.get(active.id)?.zoomOut();
|
||||
}
|
||||
};
|
||||
|
||||
const handleResetZoom = () => {
|
||||
if (active) {
|
||||
imageRefs.current.get(active.id)?.resetZoom();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Modal
|
||||
visible={visible}
|
||||
|
|
@ -69,63 +89,108 @@ export function FullScreenMediaViewer({
|
|||
statusBarTranslucent
|
||||
onRequestClose={onClose}
|
||||
>
|
||||
<SafeAreaView style={styles.root}>
|
||||
<View style={styles.toolbar}>
|
||||
<Text style={styles.counter} accessibilityLiveRegion="polite">
|
||||
{activeIndex + 1} / {images.length}
|
||||
</Text>
|
||||
<Pressable
|
||||
onPress={onClose}
|
||||
hitSlop={16}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel="Close image viewer"
|
||||
style={({ pressed }) => [styles.closeButton, pressed && styles.pressed]}
|
||||
>
|
||||
<Ionicons name="close" size={28} color={Colors.white} />
|
||||
</Pressable>
|
||||
</View>
|
||||
<GestureHandlerRootView style={styles.modalRoot}>
|
||||
<SafeAreaView style={styles.root}>
|
||||
<View style={styles.toolbar}>
|
||||
<Text style={styles.counter} accessibilityLiveRegion="polite">
|
||||
{activeIndex + 1} / {images.length}
|
||||
</Text>
|
||||
|
||||
<FlatList
|
||||
ref={listRef}
|
||||
data={images}
|
||||
horizontal
|
||||
pagingEnabled
|
||||
scrollEnabled={!zoomed}
|
||||
showsHorizontalScrollIndicator={false}
|
||||
keyExtractor={(item) => item.id}
|
||||
initialScrollIndex={Math.min(initialIndex, Math.max(images.length - 1, 0))}
|
||||
getItemLayout={(_data, index) => ({ length: width, offset: width * index, index })}
|
||||
onScrollToIndexFailed={(info) => {
|
||||
requestAnimationFrame(() => {
|
||||
listRef.current?.scrollToOffset({ offset: info.index * width, animated: false });
|
||||
});
|
||||
}}
|
||||
viewabilityConfig={{ itemVisiblePercentThreshold: 60 }}
|
||||
onViewableItemsChanged={onViewableItemsChanged}
|
||||
renderItem={({ item, index }) => (
|
||||
<ZoomableImage
|
||||
item={item}
|
||||
accessToken={accessToken}
|
||||
width={width}
|
||||
height={Math.max(height - 150, 320)}
|
||||
active={index === activeIndex}
|
||||
onZoomStateChange={index === activeIndex ? setZoomed : undefined}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
<View style={styles.controlsGroup}>
|
||||
<Pressable
|
||||
onPress={handleZoomOut}
|
||||
hitSlop={8}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel="Zoom out"
|
||||
style={({ pressed }) => [styles.controlButton, pressed && styles.pressed]}
|
||||
>
|
||||
<Ionicons name="remove" size={20} color={Colors.white} />
|
||||
</Pressable>
|
||||
|
||||
<View style={styles.footer}>
|
||||
<Text numberOfLines={2} style={styles.caption}>
|
||||
{mediaLabel(active, activeIndex)}
|
||||
</Text>
|
||||
<Text style={styles.hint}>Pinch or double-tap to zoom</Text>
|
||||
</View>
|
||||
</SafeAreaView>
|
||||
<Pressable
|
||||
onPress={handleResetZoom}
|
||||
hitSlop={8}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel="Reset zoom"
|
||||
style={({ pressed }) => [styles.controlButton, pressed && styles.pressed]}
|
||||
>
|
||||
<Ionicons name="refresh" size={16} color={Colors.white} />
|
||||
</Pressable>
|
||||
|
||||
<Pressable
|
||||
onPress={handleZoomIn}
|
||||
hitSlop={8}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel="Zoom in"
|
||||
style={({ pressed }) => [styles.controlButton, pressed && styles.pressed]}
|
||||
>
|
||||
<Ionicons name="add" size={20} color={Colors.white} />
|
||||
</Pressable>
|
||||
</View>
|
||||
|
||||
<Pressable
|
||||
onPress={onClose}
|
||||
hitSlop={16}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel="Close image viewer"
|
||||
style={({ pressed }) => [styles.closeButton, pressed && styles.pressed]}
|
||||
>
|
||||
<Ionicons name="close" size={26} color={Colors.white} />
|
||||
</Pressable>
|
||||
</View>
|
||||
|
||||
<FlatList
|
||||
ref={listRef}
|
||||
data={images}
|
||||
horizontal
|
||||
pagingEnabled
|
||||
scrollEnabled={!zoomed}
|
||||
showsHorizontalScrollIndicator={false}
|
||||
keyExtractor={(item) => item.id}
|
||||
initialScrollIndex={Math.min(initialIndex, Math.max(images.length - 1, 0))}
|
||||
getItemLayout={(_data, index) => ({ length: width, offset: width * index, index })}
|
||||
onScrollToIndexFailed={(info) => {
|
||||
requestAnimationFrame(() => {
|
||||
listRef.current?.scrollToOffset({ offset: info.index * width, animated: false });
|
||||
});
|
||||
}}
|
||||
viewabilityConfig={{ itemVisiblePercentThreshold: 60 }}
|
||||
onViewableItemsChanged={onViewableItemsChanged}
|
||||
renderItem={({ item, index }) => (
|
||||
<ZoomableImage
|
||||
ref={(handle) => {
|
||||
if (handle) {
|
||||
imageRefs.current.set(item.id, handle);
|
||||
} else {
|
||||
imageRefs.current.delete(item.id);
|
||||
}
|
||||
}}
|
||||
item={item}
|
||||
accessToken={accessToken}
|
||||
width={width}
|
||||
height={Math.max(height - 150, 320)}
|
||||
active={index === activeIndex}
|
||||
onZoomStateChange={index === activeIndex ? setZoomed : undefined}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
|
||||
<View style={styles.footer}>
|
||||
<Text numberOfLines={2} style={styles.caption}>
|
||||
{mediaLabel(active, activeIndex)}
|
||||
</Text>
|
||||
<Text style={styles.hint}>
|
||||
Pinch, double-tap, or use +/- to zoom · Drag to pan
|
||||
</Text>
|
||||
</View>
|
||||
</SafeAreaView>
|
||||
</GestureHandlerRootView>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
modalRoot: { flex: 1, backgroundColor: Colors.black },
|
||||
root: { flex: 1, backgroundColor: Colors.black },
|
||||
toolbar: {
|
||||
height: 56,
|
||||
|
|
@ -136,6 +201,21 @@ const styles = StyleSheet.create({
|
|||
justifyContent: "space-between",
|
||||
},
|
||||
counter: { color: Colors.white, fontSize: 15, fontWeight: "700" },
|
||||
controlsGroup: {
|
||||
flexDirection: "row",
|
||||
alignItems: "center",
|
||||
backgroundColor: "rgba(255,255,255,0.12)",
|
||||
borderRadius: 20,
|
||||
paddingHorizontal: 4,
|
||||
gap: 4,
|
||||
},
|
||||
controlButton: {
|
||||
width: 36,
|
||||
height: 36,
|
||||
borderRadius: 18,
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
},
|
||||
closeButton: {
|
||||
width: 44,
|
||||
height: 44,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,11 @@
|
|||
import React, { memo, useEffect, useMemo, useState } from "react";
|
||||
import React, {
|
||||
forwardRef,
|
||||
memo,
|
||||
useEffect,
|
||||
useImperativeHandle,
|
||||
useMemo,
|
||||
useState,
|
||||
} from "react";
|
||||
import { ActivityIndicator, StyleSheet, Text, View } from "react-native";
|
||||
import { Image } from "expo-image";
|
||||
import { Gesture, GestureDetector } from "react-native-gesture-handler";
|
||||
|
|
@ -16,6 +23,13 @@ import { buildMediaImageSourceFromValues } from "./media-source";
|
|||
const MIN_SCALE = 1;
|
||||
const MAX_SCALE = 4;
|
||||
const DOUBLE_TAP_SCALE = 2.5;
|
||||
const SCALE_STEP = 0.75;
|
||||
|
||||
export interface ZoomableImageHandle {
|
||||
zoomIn: () => void;
|
||||
zoomOut: () => void;
|
||||
resetZoom: () => void;
|
||||
}
|
||||
|
||||
interface ZoomableImageProps {
|
||||
item: ContentMediaItem;
|
||||
|
|
@ -31,185 +45,216 @@ function clamp(value: number, min: number, max: number): number {
|
|||
return Math.min(Math.max(value, min), max);
|
||||
}
|
||||
|
||||
export const ZoomableImage = memo(function ZoomableImage({
|
||||
item,
|
||||
accessToken,
|
||||
width,
|
||||
height,
|
||||
active,
|
||||
onZoomStateChange,
|
||||
}: ZoomableImageProps) {
|
||||
const scale = useSharedValue(1);
|
||||
const savedScale = useSharedValue(1);
|
||||
const translateX = useSharedValue(0);
|
||||
const translateY = useSharedValue(0);
|
||||
const savedX = useSharedValue(0);
|
||||
const savedY = useSharedValue(0);
|
||||
export const ZoomableImage = memo(
|
||||
forwardRef<ZoomableImageHandle, ZoomableImageProps>(function ZoomableImage(
|
||||
{
|
||||
item,
|
||||
accessToken,
|
||||
width,
|
||||
height,
|
||||
active,
|
||||
onZoomStateChange,
|
||||
},
|
||||
ref,
|
||||
) {
|
||||
const scale = useSharedValue(1);
|
||||
const savedScale = useSharedValue(1);
|
||||
const translateX = useSharedValue(0);
|
||||
const translateY = useSharedValue(0);
|
||||
const savedX = useSharedValue(0);
|
||||
const savedY = useSharedValue(0);
|
||||
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [failed, setFailed] = useState(false);
|
||||
const [isZoomed, setIsZoomed] = useState(false);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [failed, setFailed] = useState(false);
|
||||
|
||||
const source = useMemo(
|
||||
() =>
|
||||
buildMediaImageSourceFromValues(
|
||||
item.url,
|
||||
item.storage_key,
|
||||
item.requires_auth,
|
||||
accessToken,
|
||||
),
|
||||
[item.url, item.storage_key, item.requires_auth, accessToken],
|
||||
);
|
||||
const source = useMemo(
|
||||
() =>
|
||||
buildMediaImageSourceFromValues(
|
||||
item.url,
|
||||
item.storage_key,
|
||||
item.requires_auth,
|
||||
accessToken,
|
||||
),
|
||||
[item.url, item.storage_key, item.requires_auth, accessToken],
|
||||
);
|
||||
|
||||
const sourceUri =
|
||||
source && typeof source === "object" && !Array.isArray(source)
|
||||
? source.uri ?? null
|
||||
: null;
|
||||
const sourceUri =
|
||||
source && typeof source === "object" && !Array.isArray(source)
|
||||
? source.uri ?? null
|
||||
: null;
|
||||
|
||||
useEffect(() => {
|
||||
setFailed(false);
|
||||
setLoading(Boolean(sourceUri));
|
||||
}, [sourceUri]);
|
||||
useEffect(() => {
|
||||
setFailed(false);
|
||||
setLoading(Boolean(sourceUri));
|
||||
}, [sourceUri]);
|
||||
|
||||
const notifyZoom = (zoomed: boolean) => {
|
||||
setIsZoomed(zoomed);
|
||||
onZoomStateChange?.(zoomed);
|
||||
};
|
||||
const notifyZoom = (zoomed: boolean) => {
|
||||
onZoomStateChange?.(zoomed);
|
||||
};
|
||||
|
||||
const reset = () => {
|
||||
"worklet";
|
||||
scale.value = withTiming(1);
|
||||
savedScale.value = 1;
|
||||
translateX.value = withTiming(0);
|
||||
translateY.value = withTiming(0);
|
||||
savedX.value = 0;
|
||||
savedY.value = 0;
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (!active) {
|
||||
scale.value = 1;
|
||||
const reset = () => {
|
||||
"worklet";
|
||||
scale.value = withTiming(1, { duration: 250 });
|
||||
savedScale.value = 1;
|
||||
translateX.value = 0;
|
||||
translateY.value = 0;
|
||||
translateX.value = withTiming(0, { duration: 250 });
|
||||
translateY.value = withTiming(0, { duration: 250 });
|
||||
savedX.value = 0;
|
||||
savedY.value = 0;
|
||||
setIsZoomed(false);
|
||||
onZoomStateChange?.(false);
|
||||
}
|
||||
}, [active, onZoomStateChange, savedScale, savedX, savedY, scale, translateX, translateY]);
|
||||
};
|
||||
|
||||
const pinch = Gesture.Pinch()
|
||||
.onBegin(() => {
|
||||
runOnJS(notifyZoom)(true);
|
||||
})
|
||||
.onUpdate((event) => {
|
||||
scale.value = clamp(savedScale.value * event.scale, MIN_SCALE, MAX_SCALE);
|
||||
})
|
||||
.onEnd(() => {
|
||||
savedScale.value = scale.value;
|
||||
if (scale.value <= 1.01) {
|
||||
reset();
|
||||
runOnJS(notifyZoom)(false);
|
||||
useImperativeHandle(
|
||||
ref,
|
||||
() => ({
|
||||
zoomIn: () => {
|
||||
const next = Math.min(savedScale.value + SCALE_STEP, MAX_SCALE);
|
||||
savedScale.value = next;
|
||||
scale.value = withTiming(next, { duration: 250 });
|
||||
notifyZoom(next > 1.01);
|
||||
},
|
||||
zoomOut: () => {
|
||||
const next = Math.max(savedScale.value - SCALE_STEP, MIN_SCALE);
|
||||
savedScale.value = next;
|
||||
scale.value = withTiming(next, { duration: 250 });
|
||||
if (next <= 1.01) {
|
||||
translateX.value = withTiming(0, { duration: 250 });
|
||||
translateY.value = withTiming(0, { duration: 250 });
|
||||
savedX.value = 0;
|
||||
savedY.value = 0;
|
||||
notifyZoom(false);
|
||||
}
|
||||
},
|
||||
resetZoom: () => {
|
||||
reset();
|
||||
notifyZoom(false);
|
||||
},
|
||||
}),
|
||||
[],
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (!active) {
|
||||
scale.value = 1;
|
||||
savedScale.value = 1;
|
||||
translateX.value = 0;
|
||||
translateY.value = 0;
|
||||
savedX.value = 0;
|
||||
savedY.value = 0;
|
||||
onZoomStateChange?.(false);
|
||||
}
|
||||
});
|
||||
}, [active, onZoomStateChange, savedScale, savedX, savedY, scale, translateX, translateY]);
|
||||
|
||||
const pan = Gesture.Pan()
|
||||
.enabled(isZoomed)
|
||||
.maxPointers(1)
|
||||
.onUpdate((event) => {
|
||||
if (scale.value <= 1) return;
|
||||
const maxX = ((scale.value - 1) * width) / 2;
|
||||
const maxY = ((scale.value - 1) * height) / 2;
|
||||
translateX.value = clamp(savedX.value + event.translationX, -maxX, maxX);
|
||||
translateY.value = clamp(savedY.value + event.translationY, -maxY, maxY);
|
||||
})
|
||||
.onEnd(() => {
|
||||
savedX.value = translateX.value;
|
||||
savedY.value = translateY.value;
|
||||
});
|
||||
|
||||
const doubleTap = Gesture.Tap()
|
||||
.numberOfTaps(2)
|
||||
.maxDuration(250)
|
||||
.onEnd((_event, success) => {
|
||||
if (!success) return;
|
||||
if (scale.value > 1.01) {
|
||||
reset();
|
||||
runOnJS(notifyZoom)(false);
|
||||
} else {
|
||||
scale.value = withTiming(DOUBLE_TAP_SCALE);
|
||||
savedScale.value = DOUBLE_TAP_SCALE;
|
||||
const pinch = Gesture.Pinch()
|
||||
.onBegin(() => {
|
||||
runOnJS(notifyZoom)(true);
|
||||
}
|
||||
});
|
||||
})
|
||||
.onUpdate((event) => {
|
||||
scale.value = clamp(savedScale.value * event.scale, MIN_SCALE, MAX_SCALE);
|
||||
})
|
||||
.onEnd(() => {
|
||||
savedScale.value = scale.value;
|
||||
if (scale.value <= 1.01) {
|
||||
reset();
|
||||
runOnJS(notifyZoom)(false);
|
||||
}
|
||||
});
|
||||
|
||||
const gesture = Gesture.Race(doubleTap, Gesture.Simultaneous(pinch, pan));
|
||||
const pan = Gesture.Pan()
|
||||
.minDistance(8)
|
||||
.maxPointers(1)
|
||||
.onUpdate((event) => {
|
||||
if (scale.value <= 1.01) return;
|
||||
const maxX = Math.max(0, ((scale.value - 1) * width) / 2);
|
||||
const maxY = Math.max(0, ((scale.value - 1) * height) / 2);
|
||||
translateX.value = clamp(savedX.value + event.translationX, -maxX, maxX);
|
||||
translateY.value = clamp(savedY.value + event.translationY, -maxY, maxY);
|
||||
})
|
||||
.onEnd(() => {
|
||||
savedX.value = translateX.value;
|
||||
savedY.value = translateY.value;
|
||||
});
|
||||
|
||||
const animatedStyle = useAnimatedStyle(() => ({
|
||||
transform: [
|
||||
{ translateX: translateX.value },
|
||||
{ translateY: translateY.value },
|
||||
{ scale: scale.value },
|
||||
],
|
||||
}));
|
||||
const doubleTap = Gesture.Tap()
|
||||
.numberOfTaps(2)
|
||||
.maxDuration(250)
|
||||
.onEnd((_event, success) => {
|
||||
if (!success) return;
|
||||
if (scale.value > 1.01) {
|
||||
reset();
|
||||
runOnJS(notifyZoom)(false);
|
||||
} else {
|
||||
scale.value = withTiming(DOUBLE_TAP_SCALE, { duration: 250 });
|
||||
savedScale.value = DOUBLE_TAP_SCALE;
|
||||
runOnJS(notifyZoom)(true);
|
||||
}
|
||||
});
|
||||
|
||||
const gesture = Gesture.Exclusive(doubleTap, Gesture.Simultaneous(pinch, pan));
|
||||
|
||||
const animatedStyle = useAnimatedStyle(() => ({
|
||||
transform: [
|
||||
{ translateX: translateX.value },
|
||||
{ translateY: translateY.value },
|
||||
{ scale: scale.value },
|
||||
],
|
||||
}));
|
||||
|
||||
if (!source) {
|
||||
return (
|
||||
<View style={[styles.frame, { width, height }]}>
|
||||
<View style={styles.error}>
|
||||
<Text style={styles.errorTitle}>Image unavailable</Text>
|
||||
<Text style={styles.errorText}>No media URL is available for this image.</Text>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
if (!source) {
|
||||
return (
|
||||
<View style={[styles.frame, { width, height }]}>
|
||||
<View style={styles.error}>
|
||||
<Text style={styles.errorTitle}>Image unavailable</Text>
|
||||
<Text style={styles.errorText}>No media URL is available for this image.</Text>
|
||||
</View>
|
||||
{loading && !failed ? (
|
||||
<View style={styles.loader} pointerEvents="none">
|
||||
<ActivityIndicator size="large" color={Colors.white} />
|
||||
</View>
|
||||
) : null}
|
||||
|
||||
{failed ? (
|
||||
<View style={styles.error}>
|
||||
<Text style={styles.errorTitle}>Unable to load image</Text>
|
||||
<Text style={styles.errorText}>Check your connection and try again.</Text>
|
||||
</View>
|
||||
) : (
|
||||
<GestureDetector gesture={gesture}>
|
||||
<Animated.View style={[styles.imageWrap, animatedStyle]}>
|
||||
<Image
|
||||
source={source}
|
||||
contentFit="contain"
|
||||
style={styles.image}
|
||||
accessible
|
||||
accessibilityRole="image"
|
||||
accessibilityLabel={item.alt_text || item.caption || "Content image"}
|
||||
onLoad={() => setLoading(false)}
|
||||
onError={(error) => {
|
||||
console.warn("Failed to load ZoomableImage:", source, error);
|
||||
setLoading(false);
|
||||
setFailed(true);
|
||||
}}
|
||||
/>
|
||||
</Animated.View>
|
||||
</GestureDetector>
|
||||
)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<View style={[styles.frame, { width, height }]}>
|
||||
{loading && !failed ? (
|
||||
<View style={styles.loader} pointerEvents="none">
|
||||
<ActivityIndicator size="large" color={Colors.white} />
|
||||
</View>
|
||||
) : null}
|
||||
|
||||
{failed ? (
|
||||
<View style={styles.error}>
|
||||
<Text style={styles.errorTitle}>Unable to load image</Text>
|
||||
<Text style={styles.errorText}>Check your connection and try again.</Text>
|
||||
</View>
|
||||
) : (
|
||||
<GestureDetector gesture={gesture}>
|
||||
<Animated.View style={[styles.imageWrap, animatedStyle]}>
|
||||
<Image
|
||||
source={source}
|
||||
contentFit="contain"
|
||||
style={styles.image}
|
||||
accessible
|
||||
accessibilityRole="image"
|
||||
accessibilityLabel={item.alt_text || item.caption || "Content image"}
|
||||
onLoad={() => setLoading(false)}
|
||||
onError={(error) => {
|
||||
console.warn("Failed to load ZoomableImage:", source, error);
|
||||
setLoading(false);
|
||||
setFailed(true);
|
||||
}}
|
||||
/>
|
||||
</Animated.View>
|
||||
</GestureDetector>
|
||||
)}
|
||||
</View>
|
||||
);;
|
||||
}, (previous, next) =>
|
||||
previous.item.id === next.item.id &&
|
||||
previous.item.url === next.item.url &&
|
||||
previous.item.storage_key === next.item.storage_key &&
|
||||
previous.item.requires_auth === next.item.requires_auth &&
|
||||
previous.accessToken === next.accessToken &&
|
||||
previous.width === next.width &&
|
||||
previous.height === next.height &&
|
||||
previous.active === next.active &&
|
||||
previous.onZoomStateChange === next.onZoomStateChange
|
||||
}),
|
||||
(previous, next) =>
|
||||
previous.item.id === next.item.id &&
|
||||
previous.item.url === next.item.url &&
|
||||
previous.item.storage_key === next.item.storage_key &&
|
||||
previous.item.requires_auth === next.item.requires_auth &&
|
||||
previous.accessToken === next.accessToken &&
|
||||
previous.width === next.width &&
|
||||
previous.height === next.height &&
|
||||
previous.active === next.active &&
|
||||
previous.onZoomStateChange === next.onZoomStateChange,
|
||||
);
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
|
|
@ -222,7 +267,7 @@ const styles = StyleSheet.create({
|
|||
imageWrap: { width: "100%", height: "100%" },
|
||||
image: { width: "100%", height: "100%" },
|
||||
loader: {
|
||||
...StyleSheet.absoluteFillObject,
|
||||
...(StyleSheet.absoluteFill as object),
|
||||
zIndex: 2,
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ export function mediaLabel(item: ContentMediaItem, index: number): string {
|
|||
return (
|
||||
item.alt_text?.trim() ||
|
||||
item.caption?.trim() ||
|
||||
item.usage_type.replace(/_/g, " ").trim() ||
|
||||
(item.usage_type ? item.usage_type.replace(/_/g, " ").trim() : "") ||
|
||||
`Image ${index + 1}`
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ import { ContentMediaGallery } from "../../media/ContentMediaGallery";
|
|||
import { useRelationalContentMedia } from "../../media/ContentMediaContext";
|
||||
import { asString } from "../helpers/value";
|
||||
|
||||
import type { ContentMediaItem } from "../../types/media.types";
|
||||
|
||||
export function ImageGallery({ images }: { images: Record<string, unknown>[] }) {
|
||||
const relationalMedia = useRelationalContentMedia();
|
||||
|
||||
|
|
@ -15,22 +17,27 @@ export function ImageGallery({ images }: { images: Record<string, unknown>[] })
|
|||
const visible = images.filter((item) => asString(item.image_path).trim().length > 0);
|
||||
if (!visible.length) return null;
|
||||
|
||||
return (
|
||||
<View style={styles.root}>
|
||||
{visible.map((item, index) => {
|
||||
const path = asString(item.image_path);
|
||||
const name = asString(item.image_name);
|
||||
return (
|
||||
<View key={`${path}-${index}`} style={styles.item}>
|
||||
<View style={styles.imageFrame}>
|
||||
<Image source={{ uri: path }} contentFit="contain" style={styles.image} />
|
||||
</View>
|
||||
{name ? <Text style={styles.caption}>{name}</Text> : null}
|
||||
</View>
|
||||
);
|
||||
})}
|
||||
</View>
|
||||
);
|
||||
const fallbackMedia: ContentMediaItem[] = visible.map((item, index) => {
|
||||
const path = asString(item.image_path).trim();
|
||||
const name = asString(item.image_name).trim();
|
||||
return {
|
||||
id: `${path}-${index}`,
|
||||
media_asset_id: `${path}-${index}`,
|
||||
media_role: index === 0 ? "primary" : "gallery",
|
||||
usage_type: "visual_reference",
|
||||
sort_order: index,
|
||||
caption: name || null,
|
||||
alt_text: name || "Module image",
|
||||
mime_type: "image/jpeg",
|
||||
width: null,
|
||||
height: null,
|
||||
url: path,
|
||||
storage_key: null,
|
||||
requires_auth: false,
|
||||
};
|
||||
});
|
||||
|
||||
return <ContentMediaGallery media={fallbackMedia} title="Visual reference" />;
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ export function CollectionTemplateScreen({
|
|||
}
|
||||
style={({ pressed }) => [styles.iconButton, pressed && styles.pressed]}
|
||||
>
|
||||
<Ionicons name="search" size={21} color={Colors.textPrimary} />
|
||||
<Ionicons name="search" size={22} color={Colors.primaryDark} />
|
||||
</Pressable>
|
||||
|
||||
{hasSort ? (
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React from "react";
|
||||
import { useRouter } from "expo-router";
|
||||
import React, { useCallback, useRef } from "react";
|
||||
import { useRouter, useFocusEffect } from "expo-router";
|
||||
import { ScreenError, ScreenLoading } from "../components/ContentScreenState";
|
||||
import { useTemplateContractQuery } from "../hooks/use-template-contract-query";
|
||||
import { CollectionTemplateScreen } from "./CollectionTemplateScreen";
|
||||
|
|
@ -27,6 +27,13 @@ export function TemplateScreen({
|
|||
const router = useRouter();
|
||||
const module = normalized(moduleCode);
|
||||
const template = normalized(templateCode);
|
||||
const isNavigatingRef = useRef(false);
|
||||
|
||||
useFocusEffect(
|
||||
useCallback(() => {
|
||||
isNavigatingRef.current = false;
|
||||
}, []),
|
||||
);
|
||||
|
||||
if (!module || !template) {
|
||||
return (
|
||||
|
|
@ -45,6 +52,12 @@ export function TemplateScreen({
|
|||
onOpenFilters={onOpenFilters}
|
||||
onOpenSort={onOpenSort}
|
||||
navigateToContent={(contentId) => {
|
||||
if (isNavigatingRef.current) return;
|
||||
isNavigatingRef.current = true;
|
||||
setTimeout(() => {
|
||||
isNavigatingRef.current = false;
|
||||
}, 1000);
|
||||
|
||||
router.push(
|
||||
`/modules/${encodeURIComponent(module)}/${encodeURIComponent(template)}/${encodeURIComponent(contentId)}` as never,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ export function FacetValueTypeaheadModal({ visible, facet, scope, activeFilters,
|
|||
const apply = () => { if(!selected.size) return; onApply({ facet_code: facet.code, values:[...selected.keys()], value_mode:"any", display_values:[...selected.values()] }); close(); };
|
||||
return <Modal visible={visible} animationType="slide" transparent onRequestClose={close}><View style={styles.overlay}><Pressable style={styles.scrim} onPress={close}/><View style={styles.sheet}>
|
||||
<View style={styles.header}><View><Text style={styles.title}>{facet.label}</Text><Text style={styles.subtitle}>Select {facet.allow_multiple_values ? "one or more values" : "a value"}</Text></View><Pressable onPress={close}><Ionicons name="close" size={22} color={Colors.textPrimary}/></Pressable></View>
|
||||
<View style={styles.search}><Ionicons name="search" size={18} color={Colors.textSecondary}/><TextInput value={query} onChangeText={setQuery} placeholder={`Search ${facet.label.toLowerCase()}…`} placeholderTextColor={Colors.textSecondary} style={styles.input}/></View>
|
||||
<View style={styles.search}><Ionicons name="search" size={18} color={Colors.primaryDark}/><TextInput value={query} onChangeText={setQuery} placeholder={`Search ${facet.label.toLowerCase()}…`} placeholderTextColor={Colors.textSecondary} style={styles.input}/></View>
|
||||
<ScrollView contentContainerStyle={styles.content}>{values.isLoading ? <ActivityIndicator color={Colors.primary}/> : values.data?.items.map((item) => { const active=selected.has(item.value_key); return <Pressable key={item.value_key} style={[styles.valueRow,active&&styles.valueRowActive]} onPress={() => toggle(item.value_key,item.label)}><View style={{flex:1}}><Text style={styles.valueLabel}>{item.label}</Text><Text style={styles.count}>{item.result_count} matching item{item.result_count===1?"":"s"}</Text></View><Ionicons name={active?"checkbox":"square-outline"} size={20} color={active?Colors.primary:Colors.textSecondary}/></Pressable>; })}</ScrollView>
|
||||
<View style={styles.footer}><Pressable onPress={close} style={styles.cancel}><Text style={styles.cancelText}>Cancel</Text></Pressable><Pressable onPress={apply} style={[styles.apply,!selected.size&&styles.disabled]} disabled={!selected.size}><Text style={styles.applyText}>Add {selected.size ? `(${selected.size})` : ""}</Text></Pressable></View>
|
||||
</View></View></Modal>;
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ export default function FacetedSearchScreen({
|
|||
const [facetPickerVisible, setFacetPickerVisible] = useState(false);
|
||||
const [selectedFacet, setSelectedFacet] =
|
||||
useState<SearchFacetDefinition | null>(null);
|
||||
const [isSearchFocused, setIsSearchFocused] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (!isModuleMode || !normalizedModuleCode) return;
|
||||
|
|
@ -176,15 +177,22 @@ export default function FacetedSearchScreen({
|
|||
</Text>
|
||||
) : null}
|
||||
|
||||
<View style={styles.searchBox}>
|
||||
<View
|
||||
style={[
|
||||
styles.searchBox,
|
||||
isSearchFocused && styles.searchBoxFocused,
|
||||
]}
|
||||
>
|
||||
<Ionicons
|
||||
name="search"
|
||||
size={19}
|
||||
color={Colors.textSecondary}
|
||||
color={Colors.primaryDark}
|
||||
/>
|
||||
<TextInput
|
||||
value={query}
|
||||
onChangeText={setQuery}
|
||||
onFocus={() => setIsSearchFocused(true)}
|
||||
onBlur={() => setIsSearchFocused(false)}
|
||||
placeholder={
|
||||
isModuleMode
|
||||
? `Search within ${resolvedModuleName}…`
|
||||
|
|
@ -373,6 +381,10 @@ const styles = StyleSheet.create({
|
|||
paddingHorizontal: 13,
|
||||
backgroundColor: "#FAFAFA",
|
||||
},
|
||||
searchBoxFocused: {
|
||||
borderColor: Colors.primary,
|
||||
backgroundColor: "#FFFFFF",
|
||||
},
|
||||
input: {
|
||||
flex: 1,
|
||||
minHeight: 46,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useCallback, useEffect, useMemo } from "react";
|
||||
import React, { useCallback, useEffect, useMemo, useRef } from "react";
|
||||
import {
|
||||
ScrollView,
|
||||
StyleSheet,
|
||||
|
|
@ -24,6 +24,7 @@ import {
|
|||
import type { LastViewedModule } from "@/store/auth.store";
|
||||
|
||||
export default function HomeScreen() {
|
||||
const isNavigatingRef = useRef(false);
|
||||
const {
|
||||
user,
|
||||
accessToken,
|
||||
|
|
@ -94,7 +95,19 @@ export default function HomeScreen() {
|
|||
return lastViewedModule;
|
||||
}, [access, lastViewedModule, modules]);
|
||||
|
||||
useFocusEffect(
|
||||
useCallback(() => {
|
||||
isNavigatingRef.current = false;
|
||||
}, []),
|
||||
);
|
||||
|
||||
const handleModulePress = useCallback((module: LastViewedModule) => {
|
||||
if (isNavigatingRef.current) return;
|
||||
isNavigatingRef.current = true;
|
||||
setTimeout(() => {
|
||||
isNavigatingRef.current = false;
|
||||
}, 1000);
|
||||
|
||||
router.push(
|
||||
buildContentReferenceRoute({
|
||||
type: "template_ref",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useCallback, useEffect, useMemo } from "react";
|
||||
import React, { useCallback, useEffect, useMemo, useRef } from "react";
|
||||
import {
|
||||
Platform,
|
||||
ScrollView,
|
||||
|
|
@ -25,6 +25,8 @@ import {
|
|||
} from "@/features/modules/module-index";
|
||||
|
||||
export default function ModulesIndexScreen() {
|
||||
const isNavigatingRef = useRef(false);
|
||||
|
||||
const {
|
||||
access,
|
||||
accessToken,
|
||||
|
|
@ -73,6 +75,7 @@ export default function ModulesIndexScreen() {
|
|||
|
||||
useFocusEffect(
|
||||
useCallback(() => {
|
||||
isNavigatingRef.current = false;
|
||||
if (accessToken) {
|
||||
void refreshAccess().catch((error) => {
|
||||
console.warn("Unable to refresh module access:", error);
|
||||
|
|
@ -102,6 +105,12 @@ export default function ModulesIndexScreen() {
|
|||
|
||||
const handleModulePress = useCallback(
|
||||
(item: ModuleIndexItem) => {
|
||||
if (isNavigatingRef.current) return;
|
||||
isNavigatingRef.current = true;
|
||||
setTimeout(() => {
|
||||
isNavigatingRef.current = false;
|
||||
}, 1000);
|
||||
|
||||
if (!accessToken) {
|
||||
router.push("/register");
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue