Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { useFonts } from "expo-font";
import { EvaIconsPack } from "@ui-kitten/eva-icons";
import * as SplashScreen from "expo-splash-screen";
import { decode, encode } from "base-64";
import translations from './i18n';
import translations from "./i18n";

if (!global.btoa) {
global.btoa = encode;
Expand All @@ -41,13 +41,19 @@ i18n.use(initReactI18next).init({
fallbackLng: "en",
});

const hideSplash = () => {
setTimeout(async () => {
await SplashScreen.hideAsync();
}, 500);
};

function AppNavigator() {
const { serverUrl } = useAppContext();

//updateServerUrl("");

return (
<NavigationContainer>
<NavigationContainer onReady={hideSplash}>
<Stack.Navigator
screenOptions={{
headerShown: false,
Expand Down Expand Up @@ -91,13 +97,6 @@ export default function App() {
"Montserrat-Medium": require("./assets/fonts/Montserrat-Medium.ttf"),
});

// hide splash screen after 750ms
useEffect(() => {
setTimeout(async () => {
await SplashScreen.hideAsync();
}, 750);
}, []);

const toggleTheme = () => {
const nextTheme = theme === "light" ? "dark" : "light";
setTheme(nextTheme);
Expand Down
33 changes: 21 additions & 12 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,12 @@
"assetBundlePatterns": ["**/*"],
"ios": {
"jsEngine": "jsc",
"splash": {
"image": "./assets/splash-light.png",
"resizeMode": "cover",
"backgroundColor": "#0FDE41",
"dark": {
"image": "./assets/splash-dark.png",
"resizeMode": "cover",
"backgroundColor": "#010322"
}
},
"supportsTablet": true,
"icon": {
"light": "./assets/icon-light.png",
"dark": "./assets/icon-dark.png",
"tinted": "./assets/icon-tinted.png"
},
"bundleIdentifier": "io.evcc.ios",
"infoPlist": {
"CFBundleLocalizations": ["de"],
Expand Down Expand Up @@ -63,12 +58,14 @@
"de": "./i18n/de.json"
},
"plugins": [
["./scripts/removeNDKBuildId"],
[
"expo-build-properties",
{
"android": {
"usesCleartextTraffic": true
"usesCleartextTraffic": true,
"ndk": {
"arguments": "APP_LDFLAGS=--build-id=none"
}
}
}
],
Expand All @@ -81,6 +78,18 @@
]
}
],
[
"expo-splash-screen",
{
"image": "./assets/splash-icon-light.png",
"backgroundColor": "#0FDE41",
"resizeMode": "contain",
"dark": {
"image": "./assets/splash-icon-dark.png",
"backgroundColor": "#010322"
}
}
],
"expo-localization"
],
"extra": {
Expand Down
Binary file added assets/icon-tinted.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icon-trans-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icon-trans-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/splash-icon-dark.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 added assets/splash-icon-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading