This repository has been archived by the owner on Jan 4, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dependency list, about page, theming, refactoring, persistent dark mode
- Loading branch information
Showing
24 changed files
with
798 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ web-build/ | |
|
||
# macOS | ||
.DS_Store | ||
assets/licenses.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# MIT License | ||
|
||
Copyright (c) 2021 RazerMoon | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
import React from "react"; | ||
import { List, Divider } from "react-native-paper"; | ||
|
||
import { openBrowserAsync } from "expo-web-browser"; | ||
import { AboutProps as Props } from "../../utils/StackTypes"; | ||
|
||
const DependencyList = ({ | ||
navigation, | ||
}: Pick<Props, "navigation">): JSX.Element => { | ||
return ( | ||
<List.Section | ||
style={{ marginTop: 20 }} | ||
accessibilityComponentType="" | ||
accessibilityTraits="" | ||
> | ||
<Divider accessibilityComponentType="" accessibilityTraits="" /> | ||
<List.Item | ||
title="Expo" | ||
description="Used for app packaging and distribution." | ||
right={(props) => ( | ||
<List.Icon | ||
{...props} | ||
style={{ alignSelf: "center", ...props.style }} | ||
icon="open-in-new" | ||
/> | ||
)} | ||
onPress={() => openBrowserAsync("https://expo.io/")} | ||
accessibilityComponentType="" | ||
accessibilityTraits="" | ||
/> | ||
<Divider accessibilityComponentType="" accessibilityTraits="" /> | ||
<List.Item | ||
title="React Native" | ||
description="A framework for building native apps." | ||
right={(props) => ( | ||
<List.Icon | ||
{...props} | ||
style={{ alignSelf: "center", ...props.style }} | ||
icon="open-in-new" | ||
/> | ||
)} | ||
onPress={() => openBrowserAsync("https://reactnative.dev/")} | ||
accessibilityComponentType="" | ||
accessibilityTraits="" | ||
/> | ||
<Divider accessibilityComponentType="" accessibilityTraits="" /> | ||
<List.Item | ||
title="React Native Paper" | ||
description="Collection of customizable components." | ||
right={(props) => ( | ||
<List.Icon | ||
{...props} | ||
style={{ alignSelf: "center", ...props.style }} | ||
icon="open-in-new" | ||
/> | ||
)} | ||
onPress={() => openBrowserAsync("https://reactnativepaper.com/")} | ||
accessibilityComponentType="" | ||
accessibilityTraits="" | ||
/> | ||
<Divider accessibilityComponentType="" accessibilityTraits="" /> | ||
<List.Item | ||
title="Full list" | ||
description="A list of all the open source libraries being used." | ||
right={(props) => ( | ||
<List.Icon | ||
{...props} | ||
style={{ alignSelf: "center", ...props.style }} | ||
icon="open-in-new" | ||
/> | ||
)} | ||
onPress={() => navigation.navigate("Dependencies")} | ||
accessibilityComponentType="" | ||
accessibilityTraits="" | ||
/> | ||
<Divider accessibilityComponentType="" accessibilityTraits="" /> | ||
</List.Section> | ||
); | ||
}; | ||
|
||
export default DependencyList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from "react"; | ||
import { FlatList, FlatListProps } from "react-native"; | ||
import { LicensesType } from "../../utils/getLicensesFromJSON"; | ||
|
||
// TODO: Add dark mode support | ||
const LicenseList = ({ ...rest }: FlatListProps<LicensesType>): JSX.Element => { | ||
return ( | ||
<FlatList style={{ flex: 1 }} {...rest} keyExtractor={({ key }) => key} /> | ||
); | ||
}; | ||
|
||
export default LicenseList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import React from "react"; | ||
|
||
import { Avatar, List } from "react-native-paper"; | ||
|
||
import { openBrowserAsync } from "expo-web-browser"; | ||
import { StyleSheet } from "react-native"; | ||
import { LicensesType } from "../../utils/getLicensesFromJSON"; | ||
|
||
type Props = Omit<LicensesType, "parents" | "key">; | ||
|
||
const styles = StyleSheet.create({ | ||
avatar: { | ||
shadowColor: "#000", | ||
shadowOffset: { | ||
width: 0, | ||
height: 2, | ||
}, | ||
shadowOpacity: 1, | ||
shadowRadius: 2, | ||
|
||
elevation: 5, | ||
}, | ||
}); | ||
|
||
const LicensesListItem = ({ | ||
image, | ||
username, | ||
name, | ||
version, | ||
repository, | ||
licenses, | ||
}: Props): JSX.Element => { | ||
return ( | ||
<List.Item | ||
title={name} | ||
description={`${version} • ${licenses} • ${username}`} | ||
style={{ margin: 5 }} | ||
onPress={() => openBrowserAsync(repository)} | ||
accessibilityComponentType="" | ||
accessibilityTraits="" | ||
left={(props) => ( | ||
<Avatar.Image | ||
accessibilityComponentType="" | ||
accessibilityTraits="" | ||
{...props} | ||
style={[styles.avatar, props.style]} | ||
source={{ uri: image }} | ||
/> | ||
)} | ||
right={(props) => ( | ||
<List.Icon | ||
{...props} | ||
style={{ alignSelf: "center", ...props.style }} | ||
icon="open-in-new" | ||
/> | ||
)} | ||
/> | ||
); | ||
}; | ||
|
||
export default LicensesListItem; |
Oops, something went wrong.