Add login button where logout button is on menu (#2891)

* Add login button in menu where the logout button is

* Update snapshots

* Changes to fit design
This commit is contained in:
Angie
2025-05-14 10:00:04 -07:00
committed by GitHub
parent e01b4aa9bf
commit cd6d6543f1
15 changed files with 73 additions and 61 deletions

View File

Binary file not shown.

View File

@@ -3,7 +3,7 @@
"data": [
{
"path": "assets/fonts/INatIcon.ttf",
"sha1": "f51ed08f10d74894f6d3eb576cfdc4ad070f84fc"
"sha1": "5d5f17b0bc5f9c93ed4c91ff0dedb22bd9533c8e"
},
{
"path": "assets/fonts/Lato-Bold.ttf",

View File

Binary file not shown.

View File

@@ -23,7 +23,6 @@
54EB1EFEC1F74152902EED02 /* Lato-BoldItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 8C2D97D72EED451C887998A8 /* Lato-BoldItalic.ttf */; };
5A8D64AB921678B40E0229C8 /* BuildFile in Frameworks */ = {isa = PBXBuildFile; };
725BA058C5384A9185E8036A /* Lato-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 00752F4ADC554701A45A848A /* Lato-Bold.ttf */; };
7A60305B97C941CFBBA50182 /* INatIcon.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 143F005AC7CD49879C8520C3 /* INatIcon.ttf */; };
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
8B65ED3129F575C10054CCEF /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8B65ED2F29F575C10054CCEF /* MainInterface.storyboard */; };
8B65ED3529F575C10054CCEF /* iNaturalistReactNative-ShareExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 8B65ED2B29F575C10054CCEF /* iNaturalistReactNative-ShareExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
@@ -35,6 +34,7 @@
AE4DC81B3A87484CB3FD6750 /* Lato-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 4B0AEEF6CA584BCF9880EB35 /* Lato-Regular.ttf */; };
E23E0899594A7C6DF680FFDB /* libPods-iNaturalistReactNative-ShareExtension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A336AF0ADEAE537AB1B73F98 /* libPods-iNaturalistReactNative-ShareExtension.a */; };
E5DFC1C6FBFA45739CE91C69 /* Lato-MediumItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 69DF855D92EA4ADFB73B47F1 /* Lato-MediumItalic.ttf */; };
A5C00A8934ED4A48A1495179 /* INatIcon.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 0972395C34134C71A54A2A5D /* INatIcon.ttf */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -79,7 +79,6 @@
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = iNaturalistReactNative/Images.xcassets; sourceTree = "<group>"; };
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = iNaturalistReactNative/Info.plist; sourceTree = "<group>"; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = iNaturalistReactNative/main.m; sourceTree = "<group>"; };
143F005AC7CD49879C8520C3 /* INatIcon.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = INatIcon.ttf; path = ../assets/fonts/INatIcon.ttf; sourceTree = "<group>"; };
191A91122CD1916800ECC774 /* InfoPlist.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; path = InfoPlist.xcstrings; sourceTree = "<group>"; };
1956B4902A7C3C1E00BBBDE4 /* link-inat-model-files.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "link-inat-model-files.sh"; sourceTree = "<group>"; };
197A169B2A7C2567001A03DC /* cvmodel.mlmodel */ = {isa = PBXFileReference; lastKnownFileType = file.mlmodel; path = cvmodel.mlmodel; sourceTree = "<group>"; };
@@ -108,6 +107,7 @@
D7AE5BDBC584A83878A04344 /* Pods-iNaturalistReactNative-ShareExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iNaturalistReactNative-ShareExtension.debug.xcconfig"; path = "Target Support Files/Pods-iNaturalistReactNative-ShareExtension/Pods-iNaturalistReactNative-ShareExtension.debug.xcconfig"; sourceTree = "<group>"; };
D8663889EABFBFC3077401E3 /* Pods-iNaturalistReactNative-ShareExtension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iNaturalistReactNative-ShareExtension.release.xcconfig"; path = "Target Support Files/Pods-iNaturalistReactNative-ShareExtension/Pods-iNaturalistReactNative-ShareExtension.release.xcconfig"; sourceTree = "<group>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
0972395C34134C71A54A2A5D /* INatIcon.ttf */ = {isa = PBXFileReference; name = "INatIcon.ttf"; path = "../assets/fonts/INatIcon.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -261,7 +261,7 @@
3A9BAF07FCF24F668E2EF5AB /* Lato-Medium.ttf */,
69DF855D92EA4ADFB73B47F1 /* Lato-MediumItalic.ttf */,
4B0AEEF6CA584BCF9880EB35 /* Lato-Regular.ttf */,
143F005AC7CD49879C8520C3 /* INatIcon.ttf */,
0972395C34134C71A54A2A5D /* INatIcon.ttf */,
);
name = Resources;
sourceTree = "<group>";
@@ -398,7 +398,7 @@
085DD3205807404CAFC32228 /* Lato-Medium.ttf in Resources */,
E5DFC1C6FBFA45739CE91C69 /* Lato-MediumItalic.ttf in Resources */,
AE4DC81B3A87484CB3FD6750 /* Lato-Regular.ttf in Resources */,
7A60305B97C941CFBBA50182 /* INatIcon.ttf in Resources */,
A5C00A8934ED4A48A1495179 /* INatIcon.ttf in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View File

@@ -3,7 +3,7 @@
"data": [
{
"path": "assets/fonts/INatIcon.ttf",
"sha1": "f51ed08f10d74894f6d3eb576cfdc4ad070f84fc"
"sha1": "5d5f17b0bc5f9c93ed4c91ff0dedb22bd9533c8e"
},
{
"path": "assets/fonts/Lato-Bold.ttf",

View File

@@ -84,39 +84,40 @@
"feedback": 61779,
"edit-comment": 61780,
"door-exit": 61781,
"currentlocation": 61782,
"crop": 61783,
"creative-commons": 61784,
"copyright": 61785,
"copy": 61786,
"compass-rose-outline": 61787,
"comments": 61788,
"comments-outline": 61789,
"close": 61790,
"close-bold": 61791,
"clock-outline": 61792,
"circle-dots": 61793,
"chevron-right-circle": 61794,
"chevron-left": 61795,
"chevron-left-circle": 61796,
"checkmark-circle": 61797,
"checkmark-circle-outline": 61798,
"check": 61799,
"caret": 61800,
"camera": 61801,
"briefcase": 61802,
"book": 61803,
"binoculars": 61804,
"ban": 61805,
"arrow-up": 61806,
"arrow-up-small": 61807,
"arrow-up-circle-dots": 61808,
"arrow-up-bold-circle": 61809,
"arrow-up-bold-circle-outline": 61810,
"arrow-turn-down-right": 61811,
"arrow-down-bold-circle": 61812,
"arrow-down-bold-circle-outline": 61813,
"apple": 61814,
"aicamera": 61815,
"add-comment-outline": 61816
"door-enter": 61782,
"currentlocation": 61783,
"crop": 61784,
"creative-commons": 61785,
"copyright": 61786,
"copy": 61787,
"compass-rose-outline": 61788,
"comments": 61789,
"comments-outline": 61790,
"close": 61791,
"close-bold": 61792,
"clock-outline": 61793,
"circle-dots": 61794,
"chevron-right-circle": 61795,
"chevron-left": 61796,
"chevron-left-circle": 61797,
"checkmark-circle": 61798,
"checkmark-circle-outline": 61799,
"check": 61800,
"caret": 61801,
"camera": 61802,
"briefcase": 61803,
"book": 61804,
"binoculars": 61805,
"ban": 61806,
"arrow-up": 61807,
"arrow-up-small": 61808,
"arrow-up-circle-dots": 61809,
"arrow-up-bold-circle": 61810,
"arrow-up-bold-circle-outline": 61811,
"arrow-turn-down-right": 61812,
"arrow-down-bold-circle": 61813,
"arrow-down-bold-circle-outline": 61814,
"apple": 61815,
"aicamera": 61816,
"add-comment-outline": 61817
}

View File

@@ -0,0 +1,4 @@
<?xml version="1.0"?>
<svg width="24" height="24" viewBox="0 0 24 24">
<path d="M9,24.02h10.8c.64,0,1.25-.25,1.7-.7.45-.45.7-1.06.7-1.7V2.42c0-.64-.25-1.25-.7-1.7-.45-.45-1.06-.7-1.7-.7h-10.8c-.64,0-1.25.25-1.7.7-.45.45-.7,1.06-.7,1.7v1.2c0,.32.13.62.35.85.23.23.53.35.85.35s.62-.13.85-.35c.23-.23.35-.53.35-.85v-1.2h10.8v19.2h-10.8v-1.2c0-.32-.13-.62-.35-.85-.23-.22-.53-.35-.85-.35s-.62.13-.85.35c-.23.23-.35.53-.35.85v1.2c0,.64.25,1.25.7,1.7.45.45,1.06.7,1.7.7ZM12.85,17.18c-.47.47-1.22.47-1.69,0-.22-.22-.35-.53-.35-.85s.13-.62.35-.85l2.25-2.26H3c-.32,0-.62-.13-.85-.35-.23-.23-.35-.53-.35-.85s.13-.62.35-.85c.23-.23.53-.35.85-.35h10.4l-2.25-2.26c-.21-.23-.32-.53-.31-.83,0-.31.13-.6.35-.82.22-.22.51-.34.82-.35.31,0,.61.1.83.31l4.31,4.31c.22.23.35.53.35.85s-.13.62-.35.85l-4.31,4.31Z"/>
</svg>

After

Width:  |  Height:  |  Size: 801 B

View File

@@ -144,6 +144,18 @@ const CustomDrawerContent = ( { state, navigation, descriptors }: Props ) => {
},
onPress: ( ) => setShowConfirm( true )
};
} else {
items.login = {
label: t( "LOG-IN" ),
icon: "door-enter",
color: colors.inatGreen,
style: {
display: "flex"
},
onPress: ( ) => {
navigation.navigate( "LoginStackNavigator" );
}
};
}
if ( isDebug ) {
items.debug = {
@@ -154,12 +166,7 @@ const CustomDrawerContent = ( { state, navigation, descriptors }: Props ) => {
};
}
return items;
}, [
currentUser,
isConnected,
isDebug,
t
] );
}, [currentUser, isConnected, isDebug, navigation, t] );
const onSignOut = async ( ) => {
await signOut( { realm, clearRealm: true, queryClient } );

View File

@@ -36,7 +36,7 @@ exports[`ActivityCount renders reliably 1`] = `
]
}
>
</Text>
<Text
maxFontSizeMultiplier={2}

View File

@@ -36,7 +36,7 @@ exports[`CommentsCount renders default reliably 1`] = `
]
}
>
</Text>
<Text
maxFontSizeMultiplier={2}
@@ -111,7 +111,7 @@ exports[`CommentsCount renders filled reliably 1`] = `
]
}
>
</Text>
<Text
maxFontSizeMultiplier={2}
@@ -186,7 +186,7 @@ exports[`CommentsCount renders white reliably 1`] = `
]
}
>
</Text>
<Text
maxFontSizeMultiplier={2}

View File

@@ -87,7 +87,7 @@ exports[`INatIconButton renders correctly 1`] = `
]
}
>
</Text>
</View>
</View>

View File

@@ -97,7 +97,7 @@ exports[`UploadStatus displays complete icon when progress is 1 1`] = `
]
}
>
</Text>
</View>
</View>
@@ -191,7 +191,7 @@ exports[`UploadStatus displays progress bar when progress is greater than 5% 1`]
]
}
>
</Text>
</View>
<CircularProgress
@@ -281,7 +281,7 @@ exports[`UploadStatus displays rotating circle progress when upload is queued bu
]
}
>
</Text>
</View>
<View
@@ -329,7 +329,7 @@ exports[`UploadStatus displays rotating circle progress when upload is queued bu
]
}
>
</Text>
</View>
</View>
@@ -477,7 +477,7 @@ exports[`UploadStatus displays start icon when upload is unsynced and not queued
]
}
>
</Text>
</View>
<View
@@ -525,7 +525,7 @@ exports[`UploadStatus displays start icon when upload is unsynced and not queued
]
}
>
</Text>
</View>
</View>

View File

@@ -278,7 +278,7 @@ exports[`Checkbox renders reliably being checked 1`] = `
]
}
>
</Text>
</View>
</View>

View File

@@ -606,7 +606,7 @@ exports[`TaxonResult should render correctly 1`] = `
]
}
>
</Text>
</View>
</View>

View File

@@ -20,6 +20,6 @@ exports[`INatIcon renders correctly 1`] = `
]
}
>
</Text>
`;