Compare commits
12 Commits
1.2
...
code-split
| Author | SHA1 | Date | |
|---|---|---|---|
| 7086b4a68c | |||
| cd5175c663 | |||
| ed56365cc0 | |||
| afea10e5dd | |||
| 10360ecded | |||
| fe239abd26 | |||
| 50818d73f6 | |||
| 7021ea2745 | |||
| 441dd29685 | |||
| 89ddcdfa52 | |||
| a4422f1819 | |||
| e28093ec35 |
@@ -11,9 +11,9 @@
|
||||
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
|
||||
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
|
||||
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
|
||||
56F0250941FE75DA8CF8094A /* libPods-app-appTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F5D2424078D205E2F98F0707 /* libPods-app-appTests.a */; };
|
||||
379AA1F602EF704C84D7A02B /* libPods-app-appTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 05B90550DA1387B5C44FB80A /* libPods-app-appTests.a */; };
|
||||
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
|
||||
BFADB63545C91424F7C8293A /* libPods-app.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C668306DD1C0A63684EDCB0 /* libPods-app.a */; };
|
||||
8896F504D7727F539A45F5E3 /* libPods-app.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FC3B8692C2BCABAF5171340D /* libPods-app.a */; };
|
||||
E4BBD590292C1F5200296224 /* app.entitlements in Resources */ = {isa = PBXBuildFile; fileRef = E4437C9E28581FA7006DA9E7 /* app.entitlements */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
@@ -31,21 +31,21 @@
|
||||
00E356EE1AD99517003FC87E /* appTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = appTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
00E356F21AD99517003FC87E /* appTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = appTests.m; sourceTree = "<group>"; };
|
||||
05B90550DA1387B5C44FB80A /* libPods-app-appTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-app-appTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
13B07F961A680F5B00A75B9A /* app.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = app.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = app/AppDelegate.h; sourceTree = "<group>"; };
|
||||
13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = app/AppDelegate.mm; sourceTree = "<group>"; };
|
||||
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = app/Images.xcassets; sourceTree = "<group>"; };
|
||||
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = app/Info.plist; sourceTree = "<group>"; };
|
||||
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = app/main.m; sourceTree = "<group>"; };
|
||||
3D3D4D80CD734363E3EADE03 /* Pods-app.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app.release.xcconfig"; path = "Target Support Files/Pods-app/Pods-app.release.xcconfig"; sourceTree = "<group>"; };
|
||||
65D2EDDD9D88DA37994C7743 /* Pods-app-appTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app-appTests.debug.xcconfig"; path = "Target Support Files/Pods-app-appTests/Pods-app-appTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = app/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
9C668306DD1C0A63684EDCB0 /* libPods-app.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-app.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
A79BD0E1A3F5B868AD4F5D68 /* Pods-app.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app.debug.xcconfig"; path = "Target Support Files/Pods-app/Pods-app.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
AA0AD1B60CF7C90FFDB948B9 /* Pods-app-appTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app-appTests.release.xcconfig"; path = "Target Support Files/Pods-app-appTests/Pods-app-appTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
98E4A0BAD72B0C24AF5986D9 /* Pods-app.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app.debug.xcconfig"; path = "Target Support Files/Pods-app/Pods-app.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
9FA2BF4F6574C986E6B102F0 /* Pods-app.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app.release.xcconfig"; path = "Target Support Files/Pods-app/Pods-app.release.xcconfig"; sourceTree = "<group>"; };
|
||||
BC19D4073A1A93D07CD74999 /* Pods-app-appTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app-appTests.release.xcconfig"; path = "Target Support Files/Pods-app-appTests/Pods-app-appTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
E1EFCDF82E4E346591FBB028 /* Pods-app-appTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app-appTests.debug.xcconfig"; path = "Target Support Files/Pods-app-appTests/Pods-app-appTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
E4437C9E28581FA7006DA9E7 /* app.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = app.entitlements; path = app/app.entitlements; sourceTree = "<group>"; };
|
||||
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
|
||||
F5D2424078D205E2F98F0707 /* libPods-app-appTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-app-appTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FC3B8692C2BCABAF5171340D /* libPods-app.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-app.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -53,7 +53,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
56F0250941FE75DA8CF8094A /* libPods-app-appTests.a in Frameworks */,
|
||||
379AA1F602EF704C84D7A02B /* libPods-app-appTests.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -61,7 +61,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
BFADB63545C91424F7C8293A /* libPods-app.a in Frameworks */,
|
||||
8896F504D7727F539A45F5E3 /* libPods-app.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -103,8 +103,8 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
|
||||
9C668306DD1C0A63684EDCB0 /* libPods-app.a */,
|
||||
F5D2424078D205E2F98F0707 /* libPods-app-appTests.a */,
|
||||
FC3B8692C2BCABAF5171340D /* libPods-app.a */,
|
||||
05B90550DA1387B5C44FB80A /* libPods-app-appTests.a */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
@@ -143,10 +143,10 @@
|
||||
BBD78D7AC51CEA395F1C20DB /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A79BD0E1A3F5B868AD4F5D68 /* Pods-app.debug.xcconfig */,
|
||||
3D3D4D80CD734363E3EADE03 /* Pods-app.release.xcconfig */,
|
||||
65D2EDDD9D88DA37994C7743 /* Pods-app-appTests.debug.xcconfig */,
|
||||
AA0AD1B60CF7C90FFDB948B9 /* Pods-app-appTests.release.xcconfig */,
|
||||
98E4A0BAD72B0C24AF5986D9 /* Pods-app.debug.xcconfig */,
|
||||
9FA2BF4F6574C986E6B102F0 /* Pods-app.release.xcconfig */,
|
||||
E1EFCDF82E4E346591FBB028 /* Pods-app-appTests.debug.xcconfig */,
|
||||
BC19D4073A1A93D07CD74999 /* Pods-app-appTests.release.xcconfig */,
|
||||
);
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
@@ -158,11 +158,11 @@
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "appTests" */;
|
||||
buildPhases = (
|
||||
A8646FFAA087C80271BB2CC6 /* [CP] Check Pods Manifest.lock */,
|
||||
420689A074E4E7426A392B09 /* [CP] Check Pods Manifest.lock */,
|
||||
00E356EA1AD99517003FC87E /* Sources */,
|
||||
00E356EB1AD99517003FC87E /* Frameworks */,
|
||||
00E356EC1AD99517003FC87E /* Resources */,
|
||||
8DC349844744C81F79F94A1E /* [CP] Copy Pods Resources */,
|
||||
C5618360E9363F58ED30C68E /* [CP] Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -178,13 +178,13 @@
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "app" */;
|
||||
buildPhases = (
|
||||
AFA1F7779F8B1AF36C3A7914 /* [CP] Check Pods Manifest.lock */,
|
||||
1C451C95EB728E95B9CDD2FF /* [CP] Check Pods Manifest.lock */,
|
||||
FD10A7F022414F080027D42C /* Start Packager */,
|
||||
13B07F871A680F5B00A75B9A /* Sources */,
|
||||
13B07F8C1A680F5B00A75B9A /* Frameworks */,
|
||||
13B07F8E1A680F5B00A75B9A /* Resources */,
|
||||
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
|
||||
EEF3465D9B31EDDCEB2438EA /* [CP] Copy Pods Resources */,
|
||||
BC7FC72051CB585D346FAE10 /* [CP] Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -264,48 +264,9 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "set -e\n\nexport NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n";
|
||||
shellScript = "set -e\n\nexport BUNDLE_COMMAND=\"ram-bundle\"\nexport NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n";
|
||||
};
|
||||
8DC349844744C81F79F94A1E /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-resources-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-resources-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
A8646FFAA087C80271BB2CC6 /* [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-app-appTests-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;
|
||||
};
|
||||
AFA1F7779F8B1AF36C3A7914 /* [CP] Check Pods Manifest.lock */ = {
|
||||
1C451C95EB728E95B9CDD2FF /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
@@ -327,7 +288,29 @@
|
||||
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;
|
||||
};
|
||||
EEF3465D9B31EDDCEB2438EA /* [CP] Copy Pods Resources */ = {
|
||||
420689A074E4E7426A392B09 /* [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-app-appTests-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;
|
||||
};
|
||||
BC7FC72051CB585D346FAE10 /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
@@ -344,6 +327,23 @@
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-app/Pods-app-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
C5618360E9363F58ED30C68E /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-resources-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-resources-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
FD10A7F022414F080027D42C /* Start Packager */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -396,7 +396,7 @@
|
||||
/* Begin XCBuildConfiguration section */
|
||||
00E356F61AD99517003FC87E /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 65D2EDDD9D88DA37994C7743 /* Pods-app-appTests.debug.xcconfig */;
|
||||
baseConfigurationReference = E1EFCDF82E4E346591FBB028 /* Pods-app-appTests.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
@@ -424,7 +424,7 @@
|
||||
};
|
||||
00E356F71AD99517003FC87E /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = AA0AD1B60CF7C90FFDB948B9 /* Pods-app-appTests.release.xcconfig */;
|
||||
baseConfigurationReference = BC19D4073A1A93D07CD74999 /* Pods-app-appTests.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
@@ -449,7 +449,7 @@
|
||||
};
|
||||
13B07F941A680F5B00A75B9A /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = A79BD0E1A3F5B868AD4F5D68 /* Pods-app.debug.xcconfig */;
|
||||
baseConfigurationReference = 98E4A0BAD72B0C24AF5986D9 /* Pods-app.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
@@ -479,7 +479,7 @@
|
||||
};
|
||||
13B07F951A680F5B00A75B9A /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 3D3D4D80CD734363E3EADE03 /* Pods-app.release.xcconfig */;
|
||||
baseConfigurationReference = 9FA2BF4F6574C986E6B102F0 /* Pods-app.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
"react-dom": "17.0.2",
|
||||
"react-native": "0.68.2",
|
||||
"react-native-appstate-hook": "^1.0.6",
|
||||
"react-native-bundle-splitter": "^2.2.3",
|
||||
"react-native-gesture-handler": "^2.5.0",
|
||||
"react-native-image-crop-picker": "^0.38.1",
|
||||
"react-native-inappbrowser-reborn": "^3.6.3",
|
||||
|
||||
+3
-3
@@ -6,15 +6,15 @@ import {
|
||||
StyleSheet,
|
||||
useWindowDimensions,
|
||||
} from 'react-native'
|
||||
import {useAnimatedValue} from '../../lib/useAnimatedValue'
|
||||
import {colors} from '../../lib/styles'
|
||||
import {useAnimatedValue} from '../../../lib/useAnimatedValue'
|
||||
import {colors} from '../../../lib/styles'
|
||||
|
||||
interface AutocompleteItem {
|
||||
handle: string
|
||||
displayName?: string
|
||||
}
|
||||
|
||||
export function Autocomplete({
|
||||
export default function Autocomplete({
|
||||
active,
|
||||
items,
|
||||
onSelect,
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const Autocomplete = register({
|
||||
loader: () => import('./Autocomplete'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
+15
-15
@@ -12,29 +12,29 @@ import {
|
||||
} from 'react-native'
|
||||
import LinearGradient from 'react-native-linear-gradient'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import {UserAutocompleteViewModel} from '../../../state/models/user-autocomplete-view'
|
||||
import {Autocomplete} from './Autocomplete'
|
||||
import * as Toast from '../util/Toast'
|
||||
import {UserAutocompleteViewModel} from '../../../../state/models/user-autocomplete-view'
|
||||
import {Autocomplete} from '../Autocomplete'
|
||||
import * as Toast from '../../util/Toast'
|
||||
// @ts-ignore no type definition -prf
|
||||
import ProgressCircle from 'react-native-progress/Circle'
|
||||
// @ts-ignore no type definition -prf
|
||||
import ProgressPie from 'react-native-progress/Pie'
|
||||
import {TextLink} from '../util/Link'
|
||||
import {UserAvatar} from '../util/UserAvatar'
|
||||
import {useStores} from '../../../state'
|
||||
import * as apilib from '../../../state/lib/api'
|
||||
import {ComposerOpts} from '../../../state/models/shell-ui'
|
||||
import {s, colors, gradients} from '../../lib/styles'
|
||||
import {detectLinkables} from '../../../lib/strings'
|
||||
import {UserLocalPhotosModel} from '../../../state/models/user-local-photos'
|
||||
import {PhotoCarouselPicker} from './PhotoCarouselPicker'
|
||||
import {SelectedPhoto} from './SelectedPhoto'
|
||||
import {IMAGES_ENABLED} from '../../../build-flags'
|
||||
import {TextLink} from '../../util/Link'
|
||||
import {UserAvatar} from '../../util/UserAvatar'
|
||||
import {useStores} from '../../../../state'
|
||||
import * as apilib from '../../../../state/lib/api'
|
||||
import {ComposerOpts} from '../../../../state/models/shell-ui'
|
||||
import {s, colors, gradients} from '../../../lib/styles'
|
||||
import {detectLinkables} from '../../../../lib/strings'
|
||||
import {UserLocalPhotosModel} from '../../../../state/models/user-local-photos'
|
||||
import {PhotoCarouselPicker} from '../PhotoCarouselPicker'
|
||||
import {SelectedPhoto} from '../SelectedPhoto'
|
||||
import {IMAGES_ENABLED} from '../../../../build-flags'
|
||||
|
||||
const MAX_TEXT_LENGTH = 256
|
||||
const DANGER_TEXT_LENGTH = MAX_TEXT_LENGTH
|
||||
|
||||
export const ComposePost = observer(function ComposePost({
|
||||
export default observer(function ComposePost({
|
||||
replyTo,
|
||||
onPost,
|
||||
onClose,
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const ComposePost = register({
|
||||
loader: () => import('./ComposePost'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
+2
-2
@@ -1,14 +1,14 @@
|
||||
import React, {useCallback} from 'react'
|
||||
import {Image, StyleSheet, TouchableOpacity, ScrollView} from 'react-native'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import {colors} from '../../lib/styles'
|
||||
import {colors} from '../../../lib/styles'
|
||||
import {
|
||||
openPicker,
|
||||
openCamera,
|
||||
openCropper,
|
||||
} from 'react-native-image-crop-picker'
|
||||
|
||||
export const PhotoCarouselPicker = ({
|
||||
export default ({
|
||||
selectedPhotos,
|
||||
setSelectedPhotos,
|
||||
localPhotos,
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const PhotoCarouselPicker = register({
|
||||
loader: () => import('./PhotoCarouselPicker'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
@@ -1,10 +1,10 @@
|
||||
import React from 'react'
|
||||
import {StyleSheet, Text, TouchableOpacity, View} from 'react-native'
|
||||
import {colors} from '../../lib/styles'
|
||||
import {useStores} from '../../../state'
|
||||
import {UserAvatar} from '../util/UserAvatar'
|
||||
import {colors} from '../../../lib/styles'
|
||||
import {useStores} from '../../../../state'
|
||||
import {UserAvatar} from '../../util/UserAvatar'
|
||||
|
||||
export function ComposePrompt({
|
||||
export default function ComposePrompt({
|
||||
noAvi = false,
|
||||
text = "What's up?",
|
||||
btn = 'Post',
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const ComposePrompt = register({
|
||||
loader: () => import('./ComposePrompt'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
import React, {useCallback} from 'react'
|
||||
import {Image, StyleSheet, TouchableOpacity, View} from 'react-native'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import {colors} from '../../lib/styles'
|
||||
import {colors} from '../../../lib/styles'
|
||||
|
||||
export const SelectedPhoto = ({
|
||||
export default ({
|
||||
selectedPhotos,
|
||||
setSelectedPhotos,
|
||||
}: {
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const SelectedPhoto = register({
|
||||
loader: () => import('./SelectedPhoto'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
+9
-9
@@ -11,19 +11,19 @@ import LinearGradient from 'react-native-linear-gradient'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import {observer} from 'mobx-react-lite'
|
||||
import _omit from 'lodash.omit'
|
||||
import {ErrorScreen} from '../util/ErrorScreen'
|
||||
import {Link} from '../util/Link'
|
||||
import {UserAvatar} from '../util/UserAvatar'
|
||||
import * as Toast from '../util/Toast'
|
||||
import {useStores} from '../../../state'
|
||||
import * as apilib from '../../../state/lib/api'
|
||||
import {ErrorScreen} from '../../util/ErrorScreen'
|
||||
import {Link} from '../../util/Link'
|
||||
import {UserAvatar} from '../../util/UserAvatar'
|
||||
import * as Toast from '../../util/Toast'
|
||||
import {useStores} from '../../../../state'
|
||||
import * as apilib from '../../../../state/lib/api'
|
||||
import {
|
||||
SuggestedActorsViewModel,
|
||||
SuggestedActor,
|
||||
} from '../../../state/models/suggested-actors-view'
|
||||
import {s, colors, gradients} from '../../lib/styles'
|
||||
} from '../../../../state/models/suggested-actors-view'
|
||||
import {s, colors, gradients} from '../../../lib/styles'
|
||||
|
||||
export const SuggestedFollows = observer(
|
||||
export default observer(
|
||||
({
|
||||
onNoSuggestions,
|
||||
asLinks,
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const SuggestedFollows = register({
|
||||
loader: () => import('./SuggestedFollows'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
@@ -1,15 +1,15 @@
|
||||
import React from 'react'
|
||||
import {observer} from 'mobx-react-lite'
|
||||
import {View, FlatList} from 'react-native'
|
||||
import {NotificationsViewModel} from '../../../state/models/notifications-view'
|
||||
import {FeedItem} from './FeedItem'
|
||||
import {NotificationFeedLoadingPlaceholder} from '../util/LoadingPlaceholder'
|
||||
import {ErrorMessage} from '../util/ErrorMessage'
|
||||
import {EmptyState} from '../util/EmptyState'
|
||||
import {NotificationsViewModel} from '../../../../state/models/notifications-view'
|
||||
import {FeedItem} from '../FeedItem'
|
||||
import {NotificationFeedLoadingPlaceholder} from '../../util/LoadingPlaceholder'
|
||||
import {ErrorMessage} from '../../util/ErrorMessage'
|
||||
import {EmptyState} from '../../util/EmptyState'
|
||||
|
||||
const EMPTY_FEED_ITEM = {_reactKey: '__empty__'}
|
||||
|
||||
export const Feed = observer(function Feed({
|
||||
export default observer(function Feed({
|
||||
view,
|
||||
onPressTryAgain,
|
||||
}: {
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const Feed = register({
|
||||
loader: () => import('./Feed'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
+12
-12
@@ -1,22 +1,22 @@
|
||||
import React, {useMemo} from 'react'
|
||||
import {observer} from 'mobx-react-lite'
|
||||
import {StyleSheet, Text, View} from 'react-native'
|
||||
import {AtUri} from '../../../third-party/uri'
|
||||
import {AtUri} from '../../../../third-party/uri'
|
||||
import {FontAwesomeIcon, Props} from '@fortawesome/react-native-fontawesome'
|
||||
import {NotificationsViewItemModel} from '../../../state/models/notifications-view'
|
||||
import {PostThreadViewModel} from '../../../state/models/post-thread-view'
|
||||
import {s, colors} from '../../lib/styles'
|
||||
import {ago, pluralize} from '../../../lib/strings'
|
||||
import {UpIconSolid} from '../../lib/icons'
|
||||
import {UserAvatar} from '../util/UserAvatar'
|
||||
import {ErrorMessage} from '../util/ErrorMessage'
|
||||
import {Post} from '../post/Post'
|
||||
import {Link} from '../util/Link'
|
||||
import {InviteAccepter} from './InviteAccepter'
|
||||
import {NotificationsViewItemModel} from '../../../../state/models/notifications-view'
|
||||
import {PostThreadViewModel} from '../../../../state/models/post-thread-view'
|
||||
import {s, colors} from '../../../lib/styles'
|
||||
import {ago, pluralize} from '../../../../lib/strings'
|
||||
import {UpIconSolid} from '../../../lib/icons'
|
||||
import {UserAvatar} from '../../util/UserAvatar'
|
||||
import {ErrorMessage} from '../../util/ErrorMessage'
|
||||
import {Post} from '../../post/Post'
|
||||
import {Link} from '../../util/Link'
|
||||
import {InviteAccepter} from '../InviteAccepter'
|
||||
|
||||
const MAX_AUTHORS = 8
|
||||
|
||||
export const FeedItem = observer(function FeedItem({
|
||||
export default observer(function FeedItem({
|
||||
item,
|
||||
}: {
|
||||
item: NotificationsViewItemModel
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const FeedItem = register({
|
||||
loader: () => import('./FeedItem'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
+12
-8
@@ -2,15 +2,19 @@ import React, {useState} from 'react'
|
||||
import {StyleSheet, Text, TouchableOpacity, View} from 'react-native'
|
||||
import LinearGradient from 'react-native-linear-gradient'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import * as apilib from '../../../state/lib/api'
|
||||
import {NotificationsViewItemModel} from '../../../state/models/notifications-view'
|
||||
import {ConfirmModel} from '../../../state/models/shell-ui'
|
||||
import {useStores} from '../../../state'
|
||||
import {ProfileCard} from '../profile/ProfileCard'
|
||||
import * as Toast from '../util/Toast'
|
||||
import {s, colors, gradients} from '../../lib/styles'
|
||||
import * as apilib from '../../../../state/lib/api'
|
||||
import {NotificationsViewItemModel} from '../../../../state/models/notifications-view'
|
||||
import {ConfirmModel} from '../../../../state/models/shell-ui'
|
||||
import {useStores} from '../../../../state'
|
||||
import {ProfileCard} from '../../profile/ProfileCard'
|
||||
import * as Toast from '../../util/Toast'
|
||||
import {s, colors, gradients} from '../../../lib/styles'
|
||||
|
||||
export function InviteAccepter({item}: {item: NotificationsViewItemModel}) {
|
||||
export default function InviteAccepter({
|
||||
item,
|
||||
}: {
|
||||
item: NotificationsViewItemModel
|
||||
}) {
|
||||
const store = useStores()
|
||||
const [confirmationUri, setConfirmationUri] = useState<string>('')
|
||||
const isMember =
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const InviteAccepter = register({
|
||||
loader: () => import('./InviteAccepter'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
+6
-6
@@ -11,11 +11,11 @@ import {
|
||||
} from 'react-native'
|
||||
import {TabView, SceneMap, Route, TabBarProps} from 'react-native-tab-view'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import {UserGroupIcon} from '../../lib/icons'
|
||||
import {useStores} from '../../../state'
|
||||
import {s} from '../../lib/styles'
|
||||
import {SCENE_EXPLAINER, TABS_EXPLAINER} from '../../lib/assets'
|
||||
import {TABS_ENABLED} from '../../../build-flags'
|
||||
import {UserGroupIcon} from '../../../lib/icons'
|
||||
import {useStores} from '../../../../state'
|
||||
import {s} from '../../../lib/styles'
|
||||
import {SCENE_EXPLAINER, TABS_EXPLAINER} from '../../../lib/assets'
|
||||
import {TABS_ENABLED} from '../../../../build-flags'
|
||||
|
||||
const Intro = () => (
|
||||
<View style={styles.explainer}>
|
||||
@@ -79,7 +79,7 @@ const SCENE_MAP = {
|
||||
}
|
||||
const renderScene = SceneMap(SCENE_MAP)
|
||||
|
||||
export const FeatureExplainer = () => {
|
||||
export default () => {
|
||||
const layout = useWindowDimensions()
|
||||
const store = useStores()
|
||||
const [index, setIndex] = useState(0)
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const FeatureExplainer = register({
|
||||
loader: () => import('./FeatureExplainer'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
@@ -7,11 +7,11 @@ import {
|
||||
View,
|
||||
} from 'react-native'
|
||||
import {observer} from 'mobx-react-lite'
|
||||
import {SuggestedFollows} from '../discover/SuggestedFollows'
|
||||
import {useStores} from '../../../state'
|
||||
import {s} from '../../lib/styles'
|
||||
import {SuggestedFollows} from '../../discover/SuggestedFollows'
|
||||
import {useStores} from '../../../../state'
|
||||
import {s} from '../../../lib/styles'
|
||||
|
||||
export const Follows = observer(() => {
|
||||
export default observer(() => {
|
||||
const store = useStores()
|
||||
|
||||
const onNoSuggestions = () => {
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const Follows = register({
|
||||
loader: () => import('./Follows'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
+7
-11
@@ -4,18 +4,14 @@ import {ActivityIndicator, FlatList, StyleSheet, Text, View} from 'react-native'
|
||||
import {
|
||||
RepostedByViewModel,
|
||||
RepostedByViewItemModel,
|
||||
} from '../../../state/models/reposted-by-view'
|
||||
import {UserAvatar} from '../util/UserAvatar'
|
||||
import {ErrorMessage} from '../util/ErrorMessage'
|
||||
import {Link} from '../util/Link'
|
||||
import {useStores} from '../../../state'
|
||||
import {s, colors} from '../../lib/styles'
|
||||
} from '../../../../state/models/reposted-by-view'
|
||||
import {UserAvatar} from '../../util/UserAvatar'
|
||||
import {ErrorMessage} from '../../util/ErrorMessage'
|
||||
import {Link} from '../../util/Link'
|
||||
import {useStores} from '../../../../state'
|
||||
import {s, colors} from '../../../lib/styles'
|
||||
|
||||
export const PostRepostedBy = observer(function PostRepostedBy({
|
||||
uri,
|
||||
}: {
|
||||
uri: string
|
||||
}) {
|
||||
export default observer(function PostRepostedBy({uri}: {uri: string}) {
|
||||
const store = useStores()
|
||||
const [view, setView] = useState<RepostedByViewModel | undefined>()
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const PostRepostedBy = register({
|
||||
loader: () => import('./PostRepostedBy'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
+5
-5
@@ -4,12 +4,12 @@ import {ActivityIndicator, FlatList, Text, View} from 'react-native'
|
||||
import {
|
||||
PostThreadViewModel,
|
||||
PostThreadViewPostModel,
|
||||
} from '../../../state/models/post-thread-view'
|
||||
import {useStores} from '../../../state'
|
||||
import {PostThreadItem} from './PostThreadItem'
|
||||
import {ErrorMessage} from '../util/ErrorMessage'
|
||||
} from '../../../../state/models/post-thread-view'
|
||||
import {useStores} from '../../../../state'
|
||||
import {PostThreadItem} from '../PostThreadItem'
|
||||
import {ErrorMessage} from '../../util/ErrorMessage'
|
||||
|
||||
export const PostThread = observer(function PostThread({
|
||||
export default observer(function PostThread({
|
||||
uri,
|
||||
view,
|
||||
}: {
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const PostThread = register({
|
||||
loader: () => import('./PostThread'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
+16
-16
@@ -2,27 +2,27 @@ import React, {useMemo, useState} from 'react'
|
||||
import {observer} from 'mobx-react-lite'
|
||||
import {StyleSheet, Text, View} from 'react-native'
|
||||
import Clipboard from '@react-native-clipboard/clipboard'
|
||||
import {AtUri} from '../../../third-party/uri'
|
||||
import * as PostType from '../../../third-party/api/src/client/types/app/bsky/feed/post'
|
||||
import {AtUri} from '../../../../third-party/uri'
|
||||
import * as PostType from '../../../../third-party/api/src/client/types/app/bsky/feed/post'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import {PostThreadViewPostModel} from '../../../state/models/post-thread-view'
|
||||
import {Link} from '../util/Link'
|
||||
import {RichText} from '../util/RichText'
|
||||
import {PostDropdownBtn} from '../util/DropdownBtn'
|
||||
import * as Toast from '../util/Toast'
|
||||
import {UserAvatar} from '../util/UserAvatar'
|
||||
import {s, colors} from '../../lib/styles'
|
||||
import {ago, pluralize} from '../../../lib/strings'
|
||||
import {useStores} from '../../../state'
|
||||
import {PostMeta} from '../util/PostMeta'
|
||||
import {PostEmbeds} from '../util/PostEmbeds'
|
||||
import {PostCtrls} from '../util/PostCtrls'
|
||||
import {ComposePrompt} from '../composer/Prompt'
|
||||
import {PostThreadViewPostModel} from '../../../../state/models/post-thread-view'
|
||||
import {Link} from '../../util/Link'
|
||||
import {RichText} from '../../util/RichText'
|
||||
import PostDropdownBtn from '../../util/DropdownBtn/PostDropdownBtn'
|
||||
import * as Toast from '../../util/Toast'
|
||||
import {UserAvatar} from '../../util/UserAvatar'
|
||||
import {s, colors} from '../../../lib/styles'
|
||||
import {ago, pluralize} from '../../../../lib/strings'
|
||||
import {useStores} from '../../../../state'
|
||||
import {PostMeta} from '../../util/PostMeta'
|
||||
import {PostEmbeds} from '../../util/PostEmbeds'
|
||||
import {PostCtrls} from '../../util/PostCtrls'
|
||||
import {ComposePrompt} from '../../composer/Prompt'
|
||||
|
||||
const PARENT_REPLY_LINE_LENGTH = 8
|
||||
const REPLYING_TO_LINE_LENGTH = 6
|
||||
|
||||
export const PostThreadItem = observer(function PostThreadItem({
|
||||
export default observer(function PostThreadItem({
|
||||
item,
|
||||
onPostReply,
|
||||
}: {
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const PostThreadItem = register({
|
||||
loader: () => import('./PostThreadItem'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
+7
-7
@@ -4,14 +4,14 @@ import {ActivityIndicator, FlatList, StyleSheet, Text, View} from 'react-native'
|
||||
import {
|
||||
VotesViewModel,
|
||||
VotesViewItemModel,
|
||||
} from '../../../state/models/votes-view'
|
||||
import {Link} from '../util/Link'
|
||||
import {ErrorMessage} from '../util/ErrorMessage'
|
||||
import {UserAvatar} from '../util/UserAvatar'
|
||||
import {useStores} from '../../../state'
|
||||
import {s, colors} from '../../lib/styles'
|
||||
} from '../../../../state/models/votes-view'
|
||||
import {Link} from '../../util/Link'
|
||||
import {ErrorMessage} from '../../util/ErrorMessage'
|
||||
import {UserAvatar} from '../../util/UserAvatar'
|
||||
import {useStores} from '../../../../state'
|
||||
import {s, colors} from '../../../lib/styles'
|
||||
|
||||
export const PostVotedBy = observer(function PostVotedBy({
|
||||
export default observer(function PostVotedBy({
|
||||
uri,
|
||||
direction,
|
||||
}: {
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const PostVotedBy = register({
|
||||
loader: () => import('./PostVotedBy'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
@@ -9,21 +9,21 @@ import {
|
||||
} from 'react-native'
|
||||
import {observer} from 'mobx-react-lite'
|
||||
import Clipboard from '@react-native-clipboard/clipboard'
|
||||
import {AtUri} from '../../../third-party/uri'
|
||||
import * as PostType from '../../../third-party/api/src/client/types/app/bsky/feed/post'
|
||||
import {AtUri} from '../../../../third-party/uri'
|
||||
import * as PostType from '../../../../third-party/api/src/client/types/app/bsky/feed/post'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import {PostThreadViewModel} from '../../../state/models/post-thread-view'
|
||||
import {Link} from '../util/Link'
|
||||
import {UserInfoText} from '../util/UserInfoText'
|
||||
import {PostMeta} from '../util/PostMeta'
|
||||
import {PostCtrls} from '../util/PostCtrls'
|
||||
import {RichText} from '../util/RichText'
|
||||
import * as Toast from '../util/Toast'
|
||||
import {UserAvatar} from '../util/UserAvatar'
|
||||
import {useStores} from '../../../state'
|
||||
import {s, colors} from '../../lib/styles'
|
||||
import {PostThreadViewModel} from '../../../../state/models/post-thread-view'
|
||||
import {Link} from '../../util/Link'
|
||||
import {UserInfoText} from '../../util/UserInfoText'
|
||||
import {PostMeta} from '../../util/PostMeta'
|
||||
import {PostCtrls} from '../../util/PostCtrls'
|
||||
import {RichText} from '../../util/RichText'
|
||||
import * as Toast from '../../util/Toast'
|
||||
import {UserAvatar} from '../../util/UserAvatar'
|
||||
import {useStores} from '../../../../state'
|
||||
import {s, colors} from '../../../lib/styles'
|
||||
|
||||
export const Post = observer(function Post({
|
||||
export default observer(function Post({
|
||||
uri,
|
||||
initView,
|
||||
style,
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const Post = register({
|
||||
loader: () => import('./Post'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
@@ -1,12 +1,12 @@
|
||||
import React, {useState, useEffect} from 'react'
|
||||
import {observer} from 'mobx-react-lite'
|
||||
import {Text, View} from 'react-native'
|
||||
import {LoadingPlaceholder} from '../util/LoadingPlaceholder'
|
||||
import {ErrorMessage} from '../util/ErrorMessage'
|
||||
import {PostModel} from '../../../state/models/post'
|
||||
import {useStores} from '../../../state'
|
||||
import {LoadingPlaceholder} from '../../util/LoadingPlaceholder'
|
||||
import {ErrorMessage} from '../../util/ErrorMessage'
|
||||
import {PostModel} from '../../../../state/models/post'
|
||||
import {useStores} from '../../../../state'
|
||||
|
||||
export const PostText = observer(function PostText({
|
||||
export default observer(function PostText({
|
||||
uri,
|
||||
style,
|
||||
}: {
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const PostText = register({
|
||||
loader: () => import('./PostText'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
@@ -1,17 +1,17 @@
|
||||
import React, {MutableRefObject} from 'react'
|
||||
import {observer} from 'mobx-react-lite'
|
||||
import {View, FlatList, StyleProp, ViewStyle} from 'react-native'
|
||||
import {PostFeedLoadingPlaceholder} from '../util/LoadingPlaceholder'
|
||||
import {EmptyState} from '../util/EmptyState'
|
||||
import {ErrorMessage} from '../util/ErrorMessage'
|
||||
import {FeedModel} from '../../../state/models/feed-view'
|
||||
import {FeedItem} from './FeedItem'
|
||||
import {ComposePrompt} from '../composer/Prompt'
|
||||
import {PostFeedLoadingPlaceholder} from '../../util/LoadingPlaceholder'
|
||||
import {EmptyState} from '../../util/EmptyState'
|
||||
import {ErrorMessage} from '../../util/ErrorMessage'
|
||||
import {FeedModel} from '../../../../state/models/feed-view'
|
||||
import {FeedItem} from '../FeedItem'
|
||||
import {ComposePrompt} from '../../composer/Prompt'
|
||||
|
||||
const COMPOSE_PROMPT_ITEM = {_reactKey: '__prompt__'}
|
||||
const EMPTY_FEED_ITEM = {_reactKey: '__empty__'}
|
||||
|
||||
export const Feed = observer(function Feed({
|
||||
export default observer(function Feed({
|
||||
feed,
|
||||
style,
|
||||
scrollElRef,
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const Feed = register({
|
||||
loader: () => import('./Feed'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
@@ -2,29 +2,25 @@ import React, {useMemo, useState} from 'react'
|
||||
import {observer} from 'mobx-react-lite'
|
||||
import {StyleSheet, Text, View} from 'react-native'
|
||||
import Clipboard from '@react-native-clipboard/clipboard'
|
||||
import {AtUri} from '../../../third-party/uri'
|
||||
import * as PostType from '../../../third-party/api/src/client/types/app/bsky/feed/post'
|
||||
import {AtUri} from '../../../../third-party/uri'
|
||||
import * as PostType from '../../../../third-party/api/src/client/types/app/bsky/feed/post'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import {FeedItemModel} from '../../../state/models/feed-view'
|
||||
import {Link} from '../util/Link'
|
||||
import {UserInfoText} from '../util/UserInfoText'
|
||||
import {PostMeta} from '../util/PostMeta'
|
||||
import {PostCtrls} from '../util/PostCtrls'
|
||||
import {PostEmbeds} from '../util/PostEmbeds'
|
||||
import {RichText} from '../util/RichText'
|
||||
import * as Toast from '../util/Toast'
|
||||
import {UserAvatar} from '../util/UserAvatar'
|
||||
import {s, colors} from '../../lib/styles'
|
||||
import {useStores} from '../../../state'
|
||||
import {FeedItemModel} from '../../../../state/models/feed-view'
|
||||
import {Link} from '../../util/Link'
|
||||
import {UserInfoText} from '../../util/UserInfoText'
|
||||
import {PostMeta} from '../../util/PostMeta'
|
||||
import {PostCtrls} from '../../util/PostCtrls'
|
||||
import {PostEmbeds} from '../../util/PostEmbeds'
|
||||
import {RichText} from '../../util/RichText'
|
||||
import * as Toast from '../../util/Toast'
|
||||
import {UserAvatar} from '../../util/UserAvatar'
|
||||
import {s, colors} from '../../../lib/styles'
|
||||
import {useStores} from '../../../../state'
|
||||
|
||||
const TOP_REPLY_LINE_LENGTH = 12
|
||||
const REPLYING_TO_LINE_LENGTH = 8
|
||||
|
||||
export const FeedItem = observer(function FeedItem({
|
||||
item,
|
||||
}: {
|
||||
item: FeedItemModel
|
||||
}) {
|
||||
export default observer(function FeedItem({item}: {item: FeedItemModel}) {
|
||||
const store = useStores()
|
||||
const [deleted, setDeleted] = useState(false)
|
||||
const record = item.record as unknown as PostType.Record
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const FeedItem = register({
|
||||
loader: () => import('./FeedItem'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
import React from 'react'
|
||||
import {StyleSheet, Text, TouchableOpacity, View} from 'react-native'
|
||||
import {Link} from '../util/Link'
|
||||
import {UserAvatar} from '../util/UserAvatar'
|
||||
import {s, colors} from '../../lib/styles'
|
||||
import {Link} from '../../util/Link'
|
||||
import {UserAvatar} from '../../util/UserAvatar'
|
||||
import {s, colors} from '../../../lib/styles'
|
||||
|
||||
export function ProfileCard({
|
||||
export default function ProfileCard({
|
||||
did,
|
||||
handle,
|
||||
displayName,
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const ProfileCard = register({
|
||||
loader: () => import('./ProfileCard'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
+7
-11
@@ -4,18 +4,14 @@ import {ActivityIndicator, FlatList, StyleSheet, Text, View} from 'react-native'
|
||||
import {
|
||||
UserFollowersViewModel,
|
||||
FollowerItem,
|
||||
} from '../../../state/models/user-followers-view'
|
||||
import {Link} from '../util/Link'
|
||||
import {ErrorMessage} from '../util/ErrorMessage'
|
||||
import {UserAvatar} from '../util/UserAvatar'
|
||||
import {useStores} from '../../../state'
|
||||
import {s, colors} from '../../lib/styles'
|
||||
} from '../../../../state/models/user-followers-view'
|
||||
import {Link} from '../../util/Link'
|
||||
import {ErrorMessage} from '../../util/ErrorMessage'
|
||||
import {UserAvatar} from '../../util/UserAvatar'
|
||||
import {useStores} from '../../../../state'
|
||||
import {s, colors} from '../../../lib/styles'
|
||||
|
||||
export const ProfileFollowers = observer(function ProfileFollowers({
|
||||
name,
|
||||
}: {
|
||||
name: string
|
||||
}) {
|
||||
export default observer(function ProfileFollowers({name}: {name: string}) {
|
||||
const store = useStores()
|
||||
const [view, setView] = useState<UserFollowersViewModel | undefined>()
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const ProfileFollowers = register({
|
||||
loader: () => import('./ProfileFollowers'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
+7
-11
@@ -4,18 +4,14 @@ import {ActivityIndicator, FlatList, StyleSheet, Text, View} from 'react-native'
|
||||
import {
|
||||
UserFollowsViewModel,
|
||||
FollowItem,
|
||||
} from '../../../state/models/user-follows-view'
|
||||
import {useStores} from '../../../state'
|
||||
import {Link} from '../util/Link'
|
||||
import {ErrorMessage} from '../util/ErrorMessage'
|
||||
import {UserAvatar} from '../util/UserAvatar'
|
||||
import {s, colors} from '../../lib/styles'
|
||||
} from '../../../../state/models/user-follows-view'
|
||||
import {useStores} from '../../../../state'
|
||||
import {Link} from '../../util/Link'
|
||||
import {ErrorMessage} from '../../util/ErrorMessage'
|
||||
import {UserAvatar} from '../../util/UserAvatar'
|
||||
import {s, colors} from '../../../lib/styles'
|
||||
|
||||
export const ProfileFollows = observer(function ProfileFollows({
|
||||
name,
|
||||
}: {
|
||||
name: string
|
||||
}) {
|
||||
export default observer(function ProfileFollows({name}: {name: string}) {
|
||||
const store = useStores()
|
||||
const [view, setView] = useState<UserFollowsViewModel | undefined>()
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const ProfileFollows = register({
|
||||
loader: () => import('./ProfileFollows'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
+15
-15
@@ -3,26 +3,26 @@ import {observer} from 'mobx-react-lite'
|
||||
import {StyleSheet, Text, TouchableOpacity, View} from 'react-native'
|
||||
import LinearGradient from 'react-native-linear-gradient'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import {AtUri} from '../../../third-party/uri'
|
||||
import {ProfileViewModel} from '../../../state/models/profile-view'
|
||||
import {useStores} from '../../../state'
|
||||
import {AtUri} from '../../../../third-party/uri'
|
||||
import {ProfileViewModel} from '../../../../state/models/profile-view'
|
||||
import {useStores} from '../../../../state'
|
||||
import {
|
||||
ConfirmModel,
|
||||
EditProfileModel,
|
||||
InviteToSceneModel,
|
||||
} from '../../../state/models/shell-ui'
|
||||
import {pluralize} from '../../../lib/strings'
|
||||
import {s, colors} from '../../lib/styles'
|
||||
import {getGradient} from '../../lib/asset-gen'
|
||||
import {DropdownBtn, DropdownItem} from '../util/DropdownBtn'
|
||||
import * as Toast from '../util/Toast'
|
||||
import {LoadingPlaceholder} from '../util/LoadingPlaceholder'
|
||||
import {RichText} from '../util/RichText'
|
||||
import {UserAvatar} from '../util/UserAvatar'
|
||||
import {UserBanner} from '../util/UserBanner'
|
||||
import {UserInfoText} from '../util/UserInfoText'
|
||||
} from '../../../../state/models/shell-ui'
|
||||
import {pluralize} from '../../../../lib/strings'
|
||||
import {s, colors} from '../../../lib/styles'
|
||||
import {getGradient} from '../../../lib/asset-gen'
|
||||
import {DropdownBtn, DropdownItem} from '../../util/DropdownBtn'
|
||||
import * as Toast from '../../util/Toast'
|
||||
import {LoadingPlaceholder} from '../../util/LoadingPlaceholder'
|
||||
import {RichText} from '../../util/RichText'
|
||||
import {UserAvatar} from '../../util/UserAvatar'
|
||||
import {UserBanner} from '../../util/UserBanner'
|
||||
import {UserInfoText} from '../../util/UserInfoText'
|
||||
|
||||
export const ProfileHeader = observer(function ProfileHeader({
|
||||
export default observer(function ProfileHeader({
|
||||
view,
|
||||
onRefreshAll,
|
||||
}: {
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const ProfileHeader = register({
|
||||
loader: () => import('./ProfileHeader'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
+8
-9
@@ -1,16 +1,15 @@
|
||||
import React, {useState, useEffect} from 'react'
|
||||
import {observer} from 'mobx-react-lite'
|
||||
import {ActivityIndicator, FlatList, View} from 'react-native'
|
||||
import {MembersViewModel, MemberItem} from '../../../state/models/members-view'
|
||||
import {ProfileCard} from './ProfileCard'
|
||||
import {ErrorMessage} from '../util/ErrorMessage'
|
||||
import {useStores} from '../../../state'
|
||||
import {
|
||||
MembersViewModel,
|
||||
MemberItem,
|
||||
} from '../../../../state/models/members-view'
|
||||
import {ProfileCard} from '../ProfileCard'
|
||||
import {ErrorMessage} from '../../util/ErrorMessage'
|
||||
import {useStores} from '../../../../state'
|
||||
|
||||
export const ProfileMembers = observer(function ProfileMembers({
|
||||
name,
|
||||
}: {
|
||||
name: string
|
||||
}) {
|
||||
export default observer(function ProfileMembers({name}: {name: string}) {
|
||||
const store = useStores()
|
||||
const [view, setView] = useState<MembersViewModel | undefined>()
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const ProfileMembers = register({
|
||||
loader: () => import('./ProfileMembers'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
+1
-1
@@ -7,7 +7,7 @@ import Animated, {
|
||||
useAnimatedStyle,
|
||||
} from 'react-native-reanimated'
|
||||
|
||||
export function createCustomBackdrop(
|
||||
export default function createCustomBackdrop(
|
||||
onClose?: ((event: GestureResponderEvent) => void) | undefined,
|
||||
): React.FC<BottomSheetBackdropProps> {
|
||||
const CustomBackdrop = ({animatedIndex, style}: BottomSheetBackdropProps) => {
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const BottomSheetCustomBackdrop = register({
|
||||
loader: () => import('./BottomSheetCustomBackdrop'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
@@ -1,6 +1,5 @@
|
||||
import React, {useRef} from 'react'
|
||||
import {
|
||||
Share,
|
||||
StyleProp,
|
||||
StyleSheet,
|
||||
Text,
|
||||
@@ -12,11 +11,7 @@ import {
|
||||
import {IconProp} from '@fortawesome/fontawesome-svg-core'
|
||||
import RootSiblings from 'react-native-root-siblings'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import {colors} from '../../lib/styles'
|
||||
import {toShareUrl} from '../../../lib/strings'
|
||||
import {useStores} from '../../../state'
|
||||
import {ConfirmModel} from '../../../state/models/shell-ui'
|
||||
import {TABS_ENABLED} from '../../../build-flags'
|
||||
import {colors} from '../../../lib/styles'
|
||||
|
||||
const HITSLOP = {left: 10, top: 10, right: 10, bottom: 10}
|
||||
|
||||
@@ -26,7 +21,7 @@ export interface DropdownItem {
|
||||
onPress: () => void
|
||||
}
|
||||
|
||||
export function DropdownBtn({
|
||||
export default function DropdownBtn({
|
||||
style,
|
||||
items,
|
||||
menuWidth,
|
||||
@@ -73,73 +68,6 @@ export function DropdownBtn({
|
||||
)
|
||||
}
|
||||
|
||||
export function PostDropdownBtn({
|
||||
style,
|
||||
children,
|
||||
itemHref,
|
||||
itemTitle,
|
||||
isAuthor,
|
||||
onCopyPostText,
|
||||
onDeletePost,
|
||||
}: {
|
||||
style?: StyleProp<ViewStyle>
|
||||
children?: React.ReactNode
|
||||
itemHref: string
|
||||
itemTitle: string
|
||||
isAuthor: boolean
|
||||
onCopyPostText: () => void
|
||||
onDeletePost: () => void
|
||||
}) {
|
||||
const store = useStores()
|
||||
|
||||
const dropdownItems: DropdownItem[] = [
|
||||
TABS_ENABLED
|
||||
? {
|
||||
icon: ['far', 'clone'],
|
||||
label: 'Open in new tab',
|
||||
onPress() {
|
||||
store.nav.newTab(itemHref)
|
||||
},
|
||||
}
|
||||
: undefined,
|
||||
{
|
||||
icon: ['far', 'paste'],
|
||||
label: 'Copy post text',
|
||||
onPress() {
|
||||
onCopyPostText()
|
||||
},
|
||||
},
|
||||
{
|
||||
icon: 'share',
|
||||
label: 'Share...',
|
||||
onPress() {
|
||||
Share.share({url: toShareUrl(itemHref)})
|
||||
},
|
||||
},
|
||||
isAuthor
|
||||
? {
|
||||
icon: ['far', 'trash-can'],
|
||||
label: 'Delete post',
|
||||
onPress() {
|
||||
store.shell.openModal(
|
||||
new ConfirmModel(
|
||||
'Delete this post?',
|
||||
'Are you sure? This can not be undone.',
|
||||
onDeletePost,
|
||||
),
|
||||
)
|
||||
},
|
||||
}
|
||||
: undefined,
|
||||
].filter(Boolean) as DropdownItem[]
|
||||
|
||||
return (
|
||||
<DropdownBtn style={style} items={dropdownItems} menuWidth={200}>
|
||||
{children}
|
||||
</DropdownBtn>
|
||||
)
|
||||
}
|
||||
|
||||
function createDropdownMenu(
|
||||
x: number,
|
||||
y: number,
|
||||
@@ -0,0 +1,74 @@
|
||||
import React from 'react'
|
||||
import {Share, StyleProp, ViewStyle} from 'react-native'
|
||||
import {toShareUrl} from '../../../../lib/strings'
|
||||
import {useStores} from '../../../../state'
|
||||
import {ConfirmModel} from '../../../../state/models/shell-ui'
|
||||
import {TABS_ENABLED} from '../../../../build-flags'
|
||||
import DropdownBtn, {DropdownItem} from './DropdownBtn'
|
||||
|
||||
export default function PostDropdownBtn({
|
||||
style,
|
||||
children,
|
||||
itemHref,
|
||||
itemTitle,
|
||||
isAuthor,
|
||||
onCopyPostText,
|
||||
onDeletePost,
|
||||
}: {
|
||||
style?: StyleProp<ViewStyle>
|
||||
children?: React.ReactNode
|
||||
itemHref: string
|
||||
itemTitle: string
|
||||
isAuthor: boolean
|
||||
onCopyPostText: () => void
|
||||
onDeletePost: () => void
|
||||
}) {
|
||||
const store = useStores()
|
||||
|
||||
const dropdownItems: DropdownItem[] = [
|
||||
TABS_ENABLED
|
||||
? {
|
||||
icon: ['far', 'clone'],
|
||||
label: 'Open in new tab',
|
||||
onPress() {
|
||||
store.nav.newTab(itemHref)
|
||||
},
|
||||
}
|
||||
: undefined,
|
||||
{
|
||||
icon: ['far', 'paste'],
|
||||
label: 'Copy post text',
|
||||
onPress() {
|
||||
onCopyPostText()
|
||||
},
|
||||
},
|
||||
{
|
||||
icon: 'share',
|
||||
label: 'Share...',
|
||||
onPress() {
|
||||
Share.share({url: toShareUrl(itemHref)})
|
||||
},
|
||||
},
|
||||
isAuthor
|
||||
? {
|
||||
icon: ['far', 'trash-can'],
|
||||
label: 'Delete post',
|
||||
onPress() {
|
||||
store.shell.openModal(
|
||||
new ConfirmModel(
|
||||
'Delete this post?',
|
||||
'Are you sure? This can not be undone.',
|
||||
onDeletePost,
|
||||
),
|
||||
)
|
||||
},
|
||||
}
|
||||
: undefined,
|
||||
].filter(Boolean) as DropdownItem[]
|
||||
|
||||
return (
|
||||
<DropdownBtn style={style} items={dropdownItems} menuWidth={200}>
|
||||
{children}
|
||||
</DropdownBtn>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const DropdownBtn = register({
|
||||
loader: () => import('./DropdownBtn'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
@@ -2,10 +2,10 @@ import React from 'react'
|
||||
import {StyleProp, StyleSheet, Text, View, ViewStyle} from 'react-native'
|
||||
import {IconProp} from '@fortawesome/fontawesome-svg-core'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import {UserGroupIcon} from '../../lib/icons'
|
||||
import {colors} from '../../lib/styles'
|
||||
import {UserGroupIcon} from '../../../lib/icons'
|
||||
import {colors} from '../../../lib/styles'
|
||||
|
||||
export function EmptyState({
|
||||
export default function EmptyState({
|
||||
icon,
|
||||
message,
|
||||
style,
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const EmptyState = register({
|
||||
loader: () => import('./EmptyState'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
+2
-2
@@ -9,9 +9,9 @@ import {
|
||||
} from 'react-native'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import LinearGradient from 'react-native-linear-gradient'
|
||||
import {colors, gradients} from '../../lib/styles'
|
||||
import {colors, gradients} from '../../../lib/styles'
|
||||
|
||||
export function ErrorMessage({
|
||||
export default function ErrorMessage({
|
||||
message,
|
||||
numberOfLines,
|
||||
dark,
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const ErrorMessage = register({
|
||||
loader: () => import('./ErrorMessage'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from 'react'
|
||||
import {StyleSheet, Text, TouchableOpacity, View} from 'react-native'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import {colors} from '../../lib/styles'
|
||||
import {colors} from '../../../lib/styles'
|
||||
|
||||
export function ErrorScreen({
|
||||
export default function ErrorScreen({
|
||||
title,
|
||||
message,
|
||||
details,
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const ErrorScreen = register({
|
||||
loader: () => import('./ErrorScreen'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
+9
-3
@@ -8,11 +8,17 @@ import {
|
||||
import LinearGradient from 'react-native-linear-gradient'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import {IconProp} from '@fortawesome/fontawesome-svg-core'
|
||||
import {colors, gradients} from '../../lib/styles'
|
||||
import * as zIndex from '../../lib/z-index'
|
||||
import {colors, gradients} from '../../../lib/styles'
|
||||
import * as zIndex from '../../../lib/z-index'
|
||||
|
||||
type OnPress = ((event: GestureResponderEvent) => void) | undefined
|
||||
export function FAB({icon, onPress}: {icon: IconProp; onPress: OnPress}) {
|
||||
export default function FAB({
|
||||
icon,
|
||||
onPress,
|
||||
}: {
|
||||
icon: IconProp
|
||||
onPress: OnPress
|
||||
}) {
|
||||
return (
|
||||
<TouchableWithoutFeedback onPress={onPress}>
|
||||
<View style={styles.outer}>
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const FAB = register({
|
||||
loader: () => import('./FloatingActionButton'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
@@ -8,10 +8,10 @@ import {
|
||||
TextStyle,
|
||||
ViewStyle,
|
||||
} from 'react-native'
|
||||
import {useStores, RootStoreModel} from '../../../state'
|
||||
import {convertBskyAppUrlIfNeeded} from '../../../lib/strings'
|
||||
import {useStores, RootStoreModel} from '../../../../state'
|
||||
import {convertBskyAppUrlIfNeeded} from '../../../../lib/strings'
|
||||
|
||||
export const Link = observer(function Link({
|
||||
export default observer(function Link({
|
||||
style,
|
||||
href,
|
||||
title,
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const TextLink = register({
|
||||
loader: () => import('./Link'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
import React from 'react'
|
||||
import {StyleSheet, StyleProp, View, ViewStyle} from 'react-native'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import {UpIcon} from '../../lib/icons'
|
||||
import {s, colors} from '../../lib/styles'
|
||||
import {UpIcon} from '../../../lib/icons'
|
||||
import {s, colors} from '../../../lib/styles'
|
||||
|
||||
export function LoadingPlaceholder({
|
||||
width,
|
||||
@@ -36,7 +36,7 @@ export function LoadingPlaceholder({
|
||||
)
|
||||
}
|
||||
|
||||
export function PostLoadingPlaceholder({
|
||||
export default function PostLoadingPlaceholder({
|
||||
style,
|
||||
}: {
|
||||
style?: StyleProp<ViewStyle>
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const LoadingPlaceholder = register({
|
||||
loader: () => import('./LoadingPlaceholder'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
FontAwesomeIconStyle,
|
||||
} from '@fortawesome/react-native-fontawesome'
|
||||
import RootSiblings from 'react-native-root-siblings'
|
||||
import {colors} from '../../lib/styles'
|
||||
import {colors} from '../../../lib/styles'
|
||||
|
||||
interface PickerItem {
|
||||
value: string
|
||||
@@ -33,7 +33,7 @@ interface PickerOpts {
|
||||
|
||||
const MENU_WIDTH = 200
|
||||
|
||||
export function Picker({
|
||||
export default function Picker({
|
||||
style,
|
||||
labelStyle,
|
||||
iconStyle,
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const Picker = register({
|
||||
loader: () => import('./Picker'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from 'react'
|
||||
import {Animated, StyleSheet, Text, TouchableOpacity, View} from 'react-native'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import {UpIcon, UpIconSolid} from '../../lib/icons'
|
||||
import {s, colors} from '../../lib/styles'
|
||||
import {useAnimatedValue} from '../../lib/useAnimatedValue'
|
||||
import {UpIcon, UpIconSolid} from '../../../lib/icons'
|
||||
import {s, colors} from '../../../lib/styles'
|
||||
import {useAnimatedValue} from '../../../lib/useAnimatedValue'
|
||||
|
||||
interface PostCtrlsOpts {
|
||||
big?: boolean
|
||||
@@ -21,7 +21,7 @@ const redgray = '#7A6161'
|
||||
const sRedgray = {color: redgray}
|
||||
const HITSLOP = {top: 10, left: 10, bottom: 10, right: 10}
|
||||
|
||||
export function PostCtrls(opts: PostCtrlsOpts) {
|
||||
export default function PostCtrls(opts: PostCtrlsOpts) {
|
||||
const interp1 = useAnimatedValue(0)
|
||||
const interp2 = useAnimatedValue(0)
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const PostCtrls = register({
|
||||
loader: () => import('./PostCtrls'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
@@ -7,13 +7,13 @@ import {
|
||||
View,
|
||||
ViewStyle,
|
||||
} from 'react-native'
|
||||
import {Entity} from '../../../third-party/api/src/client/types/app/bsky/feed/post'
|
||||
import {Link} from '../util/Link'
|
||||
import {LinkMeta, getLikelyType, LikelyType} from '../../../lib/link-meta'
|
||||
import {colors} from '../../lib/styles'
|
||||
import {useStores} from '../../../state'
|
||||
import {Entity} from '../../../../third-party/api/src/client/types/app/bsky/feed/post'
|
||||
import {Link} from '../../util/Link'
|
||||
import {LinkMeta, getLikelyType, LikelyType} from '../../../../lib/link-meta'
|
||||
import {colors} from '../../../lib/styles'
|
||||
import {useStores} from '../../../../state'
|
||||
|
||||
export function PostEmbeds({
|
||||
export default function PostEmbeds({
|
||||
entities,
|
||||
style,
|
||||
}: {
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const PostEmbeds = register({
|
||||
loader: () => import('./PostEmbeds'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
@@ -1,10 +1,10 @@
|
||||
import React from 'react'
|
||||
import {StyleSheet, Text, View} from 'react-native'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import {Link} from '../util/Link'
|
||||
import {PostDropdownBtn} from '../util/DropdownBtn'
|
||||
import {s} from '../../lib/styles'
|
||||
import {ago} from '../../../lib/strings'
|
||||
import {Link} from '../../util/Link'
|
||||
import PostDropdownBtn from '../DropdownBtn/PostDropdownBtn'
|
||||
import {s} from '../../../lib/styles'
|
||||
import {ago} from '../../../../lib/strings'
|
||||
|
||||
interface PostMetaOpts {
|
||||
itemHref: string
|
||||
@@ -18,7 +18,7 @@ interface PostMetaOpts {
|
||||
onDeletePost: () => void
|
||||
}
|
||||
|
||||
export function PostMeta(opts: PostMetaOpts) {
|
||||
export default function PostMeta(opts: PostMetaOpts) {
|
||||
return (
|
||||
<View style={styles.meta}>
|
||||
<Link
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const PostMeta = register({
|
||||
loader: () => import('./PostMeta'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react'
|
||||
import {Text, TextStyle, StyleProp} from 'react-native'
|
||||
import {TextLink} from './Link'
|
||||
import {s} from '../../lib/styles'
|
||||
import {toShortUrl} from '../../../lib/strings'
|
||||
import {TextLink} from '../Link'
|
||||
import {s} from '../../../lib/styles'
|
||||
import {toShortUrl} from '../../../../lib/strings'
|
||||
|
||||
type TextSlice = {start: number; end: number}
|
||||
type Entity = {
|
||||
@@ -11,7 +11,7 @@ type Entity = {
|
||||
value: string
|
||||
}
|
||||
|
||||
export function RichText({
|
||||
export default function RichText({
|
||||
text,
|
||||
entities,
|
||||
style,
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const RichText = register({
|
||||
loader: () => import('./RichText'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
@@ -6,14 +6,14 @@ import {
|
||||
TouchableWithoutFeedback,
|
||||
View,
|
||||
} from 'react-native'
|
||||
import {colors} from '../../lib/styles'
|
||||
import {colors} from '../../../lib/styles'
|
||||
|
||||
interface Layout {
|
||||
x: number
|
||||
width: number
|
||||
}
|
||||
|
||||
export function Selector({
|
||||
export default function Selector({
|
||||
selectedIndex,
|
||||
items,
|
||||
panX,
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const Selector = register({
|
||||
loader: () => import('./Selector'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
@@ -8,10 +8,10 @@ import {
|
||||
openPicker,
|
||||
Image as PickedImage,
|
||||
} from 'react-native-image-crop-picker'
|
||||
import {getGradient} from '../../lib/asset-gen'
|
||||
import {colors} from '../../lib/styles'
|
||||
import {getGradient} from '../../../lib/asset-gen'
|
||||
import {colors} from '../../../lib/styles'
|
||||
|
||||
export function UserAvatar({
|
||||
export default function UserAvatar({
|
||||
size,
|
||||
handle,
|
||||
avatar,
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const UserAvatar = register({
|
||||
loader: () => import('./UserAvatar'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
@@ -2,16 +2,16 @@ import React, {useCallback} from 'react'
|
||||
import {StyleSheet, View, TouchableOpacity, Alert, Image} from 'react-native'
|
||||
import Svg, {Rect, Defs, LinearGradient, Stop} from 'react-native-svg'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import {getGradient} from '../../lib/asset-gen'
|
||||
import {colors} from '../../lib/styles'
|
||||
import {getGradient} from '../../../lib/asset-gen'
|
||||
import {colors} from '../../../lib/styles'
|
||||
import {
|
||||
openCamera,
|
||||
openCropper,
|
||||
openPicker,
|
||||
} from 'react-native-image-crop-picker'
|
||||
import {IMAGES_ENABLED} from '../../../build-flags'
|
||||
import {IMAGES_ENABLED} from '../../../../build-flags'
|
||||
|
||||
export function UserBanner({
|
||||
export default function UserBanner({
|
||||
handle,
|
||||
userBanner,
|
||||
setUserBanner,
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const UserBanner = register({
|
||||
loader: () => import('./UserBanner'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
+6
-6
@@ -1,9 +1,9 @@
|
||||
import React, {useState, useEffect} from 'react'
|
||||
import * as GetProfile from '../../../third-party/api/src/client/types/app/bsky/actor/getProfile'
|
||||
import * as GetProfile from '../../../../third-party/api/src/client/types/app/bsky/actor/getProfile'
|
||||
import {StyleProp, Text, TextStyle} from 'react-native'
|
||||
import {Link} from './Link'
|
||||
import {LoadingPlaceholder} from './LoadingPlaceholder'
|
||||
import {useStores} from '../../../state'
|
||||
import {TextLink} from '../Link'
|
||||
import {LoadingPlaceholder} from '../LoadingPlaceholder'
|
||||
import {useStores} from '../../../../state'
|
||||
|
||||
export function UserInfoText({
|
||||
did,
|
||||
@@ -67,11 +67,11 @@ export function UserInfoText({
|
||||
if (asLink) {
|
||||
const title = profile?.displayName || profile?.handle || 'User'
|
||||
return (
|
||||
<Link
|
||||
<TextLink
|
||||
href={`/profile/${profile?.handle ? profile.handle : did}`}
|
||||
title={title}>
|
||||
{inner}
|
||||
</Link>
|
||||
</TextLink>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const UserInfoText = register({
|
||||
loader: () => import('./UserInfoText'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
@@ -8,14 +8,14 @@ import {
|
||||
View,
|
||||
} from 'react-native'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import {s, colors} from '../../lib/styles'
|
||||
import {MagnifyingGlassIcon} from '../../lib/icons'
|
||||
import {useStores} from '../../../state'
|
||||
import {s, colors} from '../../../lib/styles'
|
||||
import {MagnifyingGlassIcon} from '../../../lib/icons'
|
||||
import {useStores} from '../../../../state'
|
||||
|
||||
const HITSLOP = {left: 10, top: 10, right: 10, bottom: 10}
|
||||
const BACK_HITSLOP = {left: 10, top: 10, right: 30, bottom: 10}
|
||||
|
||||
export const ViewHeader = observer(function ViewHeader({
|
||||
export default observer(function ViewHeader({
|
||||
title,
|
||||
subtitle,
|
||||
onPost,
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const ViewHeader = register({
|
||||
loader: () => import('./ViewHeader'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
+5
-5
@@ -1,15 +1,15 @@
|
||||
import React, {useEffect, useState, useMemo} from 'react'
|
||||
import {FlatList, StyleSheet, View} from 'react-native'
|
||||
import {Selector} from './Selector'
|
||||
import {HorzSwipe} from './gestures/HorzSwipe'
|
||||
import {useAnimatedValue} from '../../lib/useAnimatedValue'
|
||||
import {useStores} from '../../../state'
|
||||
import {Selector} from '../Selector'
|
||||
import {HorzSwipe} from '../gestures/HorzSwipe'
|
||||
import {useAnimatedValue} from '../../../lib/useAnimatedValue'
|
||||
import {useStores} from '../../../../state'
|
||||
|
||||
const HEADER_ITEM = {_reactKey: '__header__'}
|
||||
const SELECTOR_ITEM = {_reactKey: '__selector__'}
|
||||
const STICKY_HEADER_INDICES = [1]
|
||||
|
||||
export function ViewSelector({
|
||||
export default function ViewSelector({
|
||||
sections,
|
||||
items,
|
||||
refreshing,
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const ViewSelector = register({
|
||||
loader: () => import('./ViewSelector'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
+1
-1
@@ -24,7 +24,7 @@ interface Props {
|
||||
children: React.ReactNode
|
||||
}
|
||||
|
||||
export function HorzSwipe({
|
||||
export default function HorzSwipe({
|
||||
panX,
|
||||
canSwipeLeft = false,
|
||||
canSwipeRight = false,
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const HorzSwipe = register({
|
||||
loader: () => import('./HorzSwipe'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
@@ -1,14 +1,14 @@
|
||||
import React, {useEffect, useState, useRef} from 'react'
|
||||
import {StyleSheet, Text, TextInput, View} from 'react-native'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import {ProfileFollows as ProfileFollowsComponent} from '../com/profile/ProfileFollows'
|
||||
import {Selector} from '../com/util/Selector'
|
||||
import {colors} from '../lib/styles'
|
||||
import {ScreenParams} from '../routes'
|
||||
import {useStores} from '../../state'
|
||||
import {useAnimatedValue} from '../lib/useAnimatedValue'
|
||||
import {ProfileFollows as ProfileFollowsComponent} from '../../com/profile/ProfileFollows'
|
||||
import {Selector} from '../../com/util/Selector'
|
||||
import {colors} from '../../lib/styles'
|
||||
import {ScreenParams} from '../../routes'
|
||||
import {useStores} from '../../../state'
|
||||
import {useAnimatedValue} from '../../lib/useAnimatedValue'
|
||||
|
||||
export const Contacts = ({navIdx, visible, params}: ScreenParams) => {
|
||||
export default ({navIdx, visible, params}: ScreenParams) => {
|
||||
const store = useStores()
|
||||
const selectorInterp = useAnimatedValue(0)
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const Contacts = register({
|
||||
loader: () => import('./Contacts'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
@@ -3,16 +3,16 @@ import {StyleSheet, Text, TouchableOpacity, View} from 'react-native'
|
||||
import {observer} from 'mobx-react-lite'
|
||||
import useAppState from 'react-native-appstate-hook'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import {ViewHeader} from '../com/util/ViewHeader'
|
||||
import {Feed} from '../com/posts/Feed'
|
||||
import {useStores} from '../../state'
|
||||
import {FeedModel} from '../../state/models/feed-view'
|
||||
import {ScreenParams} from '../routes'
|
||||
import {s, colors} from '../lib/styles'
|
||||
import {ViewHeader} from '../../com/util/ViewHeader'
|
||||
import {Feed} from '../../com/posts/Feed'
|
||||
import {useStores} from '../../../state'
|
||||
import {FeedModel} from '../../../state/models/feed-view'
|
||||
import {ScreenParams} from '../../routes'
|
||||
import {s, colors} from '../../lib/styles'
|
||||
|
||||
const HITSLOP = {left: 20, top: 20, right: 20, bottom: 20}
|
||||
|
||||
export const Home = observer(function Home({
|
||||
export default observer(function Home({
|
||||
navIdx,
|
||||
visible,
|
||||
scrollElRef,
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const Home = register({
|
||||
loader: () => import('./Home'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
@@ -14,19 +14,20 @@ import Svg, {Circle, Line, Text as SvgText} from 'react-native-svg'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import * as EmailValidator from 'email-validator'
|
||||
import {observer} from 'mobx-react-lite'
|
||||
import {Picker} from '../com/util/Picker'
|
||||
import {TextLink} from '../com/util/Link'
|
||||
import {s, colors} from '../lib/styles'
|
||||
import {Picker} from '../../com/util/Picker'
|
||||
import {TextLink} from '../../com/util/Link'
|
||||
import {s, colors} from '../../lib/styles'
|
||||
import {
|
||||
makeValidHandle,
|
||||
createFullHandle,
|
||||
toNiceDomain,
|
||||
} from '../../lib/strings'
|
||||
import {useStores, DEFAULT_SERVICE} from '../../state'
|
||||
import {ServiceDescription} from '../../state/models/session'
|
||||
import {ServerInputModel} from '../../state/models/shell-ui'
|
||||
import {ComAtprotoAccountCreate} from '../../third-party/api/index'
|
||||
import {isNetworkError} from '../../lib/errors'
|
||||
} from '../../../lib/strings'
|
||||
import {useStores, DEFAULT_SERVICE} from '../../../state'
|
||||
import {ServiceDescription} from '../../../state/models/session'
|
||||
import {ServerInputModel} from '../../../state/models/shell-ui'
|
||||
import {ComAtprotoAccountCreate} from '../../../third-party/api/index'
|
||||
import {isNetworkError} from '../../../lib/errors'
|
||||
import {investigate} from 'react-native-bundle-splitter/dist/utils'
|
||||
|
||||
enum ScreenState {
|
||||
SigninOrCreateAccount,
|
||||
@@ -589,6 +590,12 @@ export const Login = observer(
|
||||
ScreenState.SigninOrCreateAccount,
|
||||
)
|
||||
|
||||
console.log(
|
||||
`Bundle:\nloaded:${investigate().loaded.length}\nwaiting:${
|
||||
investigate().waiting.length
|
||||
}`,
|
||||
)
|
||||
|
||||
return (
|
||||
<View style={styles.outer}>
|
||||
{screenState === ScreenState.SigninOrCreateAccount ? (
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from 'react'
|
||||
import {Text, Button, View} from 'react-native'
|
||||
import {ViewHeader} from '../com/util/ViewHeader'
|
||||
import {useStores} from '../../state'
|
||||
import {ViewHeader} from '../../com/util/ViewHeader'
|
||||
import {useStores} from '../../../state'
|
||||
|
||||
export const NotFound = () => {
|
||||
export default () => {
|
||||
const stores = useStores()
|
||||
return (
|
||||
<View>
|
||||
@@ -0,0 +1,16 @@
|
||||
import React from 'react'
|
||||
import {View, ActivityIndicator, StyleSheet} from 'react-native'
|
||||
import {register} from 'react-native-bundle-splitter'
|
||||
|
||||
export const NotFound = register({
|
||||
loader: () => import('./NotFound'),
|
||||
placeholder: () => (
|
||||
<View style={styles.loading}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
),
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {flex: 1, justifyContent: 'center'},
|
||||
})
|
||||
+6
-6
@@ -1,12 +1,12 @@
|
||||
import React, {useState, useEffect} from 'react'
|
||||
import {View} from 'react-native'
|
||||
import {ViewHeader} from '../com/util/ViewHeader'
|
||||
import {Feed} from '../com/notifications/Feed'
|
||||
import {useStores} from '../../state'
|
||||
import {NotificationsViewModel} from '../../state/models/notifications-view'
|
||||
import {ScreenParams} from '../routes'
|
||||
import {ViewHeader} from '../../com/util/ViewHeader'
|
||||
import {Feed} from '../../com/notifications/Feed'
|
||||
import {useStores} from '../../../state'
|
||||
import {NotificationsViewModel} from '../../../state/models/notifications-view'
|
||||
import {ScreenParams} from '../../routes'
|
||||
|
||||
export const Notifications = ({navIdx, visible}: ScreenParams) => {
|
||||
export default ({navIdx, visible}: ScreenParams) => {
|
||||
const store = useStores()
|
||||
|
||||
useEffect(() => {
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user