-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* install react-native-skia, start implementing UI with it * mocked animated toggle button WIP * preserve state before trying to randomize * random orbs traversing the conduit * color button text with action colour * cleanup unused values * add inproxyprovider mock for animation testing * show some values for connected peers and bytes transferred, add graph, unify layout * add app icons, setup splash screen and placeholder loading animation * fade conduit status elements in and out depending on InProxy state * cleanup AndroidManifest.xml and Info.plist
- Loading branch information
Showing
54 changed files
with
1,209 additions
and
129 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
Binary file modified
BIN
-50.7 KB
(13%)
android/app/src/main/res/drawable-hdpi/splashscreen_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-50.7 KB
(13%)
android/app/src/main/res/drawable-mdpi/splashscreen_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-50.7 KB
(13%)
android/app/src/main/res/drawable-xhdpi/splashscreen_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-50.7 KB
(13%)
android/app/src/main/res/drawable-xxhdpi/splashscreen_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-50.7 KB
(13%)
android/app/src/main/res/drawable-xxxhdpi/splashscreen_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+30 KB
(480%)
android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+14.2 KB
(390%)
android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+49.8 KB
(560%)
android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+30.6 KB
(320%)
android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+99 KB
(660%)
android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+156 KB
(740%)
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+99.7 KB
(430%)
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<resources> | ||
<color name="splashscreen_background">#ffffff</color> | ||
<color name="iconBackground">#ffffff</color> | ||
<color name="splashscreen_background">#000000</color> | ||
<color name="iconBackground">#000000</color> | ||
<color name="colorPrimary">#023c69</color> | ||
<color name="colorPrimaryDark">#ffffff</color> | ||
<color name="colorPrimaryDark">#000000</color> | ||
</resources> |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Binary file modified
BIN
+329 KB
(670%)
ios/conduit/Images.xcassets/AppIcon.appiconset/[email protected]
Oops, something went wrong.
Oops, something went wrong.
Binary file modified
BIN
+0 Bytes
(100%)
ios/conduit/Images.xcassets/SplashScreenBackground.imageset/image.png
Oops, something went wrong.
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 |
---|---|---|
@@ -1,5 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict/> | ||
<dict> | ||
<key>aps-environment</key> | ||
<string>development</string> | ||
</dict> | ||
</plist> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,77 +1,25 @@ | ||
import * as Notifications from "expo-notifications"; | ||
import React from "react"; | ||
import { useTranslation } from "react-i18next"; | ||
import { Pressable, Text, View } from "react-native"; | ||
import { useSafeAreaInsets } from "react-native-safe-area-context"; | ||
import { useWindowDimensions } from "react-native"; | ||
|
||
import { useAccountContext } from "@/src/account/context"; | ||
import { NotificationsStatus } from "@/src/components/NotificationsStatus"; | ||
import { ProxyID } from "@/src/components/ProxyID"; | ||
import { getProxyId } from "@/src/psiphon/inproxy"; | ||
import { palette, sharedStyles as ss } from "@/src/styles"; | ||
import { ConduitHeader } from "@/src/components/ConduitHeader"; | ||
import { ConduitOrbToggle } from "@/src/components/ConduitOrbToggle"; | ||
import { ConduitStatus } from "@/src/components/ConduitStatus"; | ||
import { SafeAreaView } from "@/src/components/SafeAreaView"; | ||
|
||
export default function HomeScreen() { | ||
const insets = useSafeAreaInsets(); | ||
const { conduitKeyPair } = useAccountContext(); | ||
const { t } = useTranslation(); | ||
|
||
const [message, setMessage] = React.useState("Conduit is OFF"); | ||
const win = useWindowDimensions(); | ||
|
||
return ( | ||
<View | ||
style={[ | ||
ss.flex, | ||
ss.column, | ||
{ | ||
marginTop: insets.top, | ||
marginBottom: insets.bottom, | ||
marginLeft: insets.left, | ||
marginRight: insets.right, | ||
}, | ||
]} | ||
> | ||
<View style={[ss.flex, ss.padded]}> | ||
<Text style={[ss.whiteText, ss.extraLargeFont]}> | ||
{">"} Conduit | ||
</Text> | ||
</View> | ||
<View | ||
style={[ss.flex, ss.column, ss.justifyCenter, ss.alignCenter]} | ||
> | ||
<Pressable | ||
style={({ pressed }) => [ | ||
ss.justifyCenter, | ||
ss.alignCenter, | ||
ss.whiteBorder, | ||
ss.circle158, | ||
{ | ||
backgroundColor: pressed | ||
? palette.blue | ||
: palette.grey, | ||
}, | ||
]} | ||
onPress={async () => { | ||
await Notifications.requestPermissionsAsync(); | ||
setMessage("Conduit is not implemented yet!"); | ||
setTimeout( | ||
() => setMessage(t("CONDUIT_OFF_I18N.string")), | ||
5000, | ||
); | ||
}} | ||
> | ||
<Text style={[ss.whiteText, ss.boldFont]}> | ||
{t("TURN_ON_I18N.string")} | ||
</Text> | ||
</Pressable> | ||
<Text style={[ss.whiteText, ss.bodyFont]}>{message}</Text> | ||
<NotificationsStatus /> | ||
</View> | ||
<View style={[ss.flex, ss.row, ss.justifyCenter, ss.alignCenter]}> | ||
<Text style={[ss.whiteText, ss.bodyFont]}> | ||
{t("YOUR_ID_I18N.string")}{" "} | ||
</Text> | ||
<ProxyID proxyId={getProxyId(conduitKeyPair)} /> | ||
</View> | ||
</View> | ||
<SafeAreaView> | ||
{/* Header takes up 10% of vertical space */} | ||
<ConduitHeader width={win.width} height={win.height * 0.1} /> | ||
{/* Orb takes up a square, full width */} | ||
<ConduitOrbToggle size={win.width} /> | ||
{/* Status takes up the rest of the vertical space */} | ||
<ConduitStatus | ||
width={win.width} | ||
height={win.height - win.width - 100} | ||
/> | ||
</SafeAreaView> | ||
); | ||
} |
Oops, something went wrong.