From 6de419cc56bebef2c60b964dc11e79272ddfa54c Mon Sep 17 00:00:00 2001 From: Ewo Date: Sun, 25 Aug 2024 22:56:30 +0200 Subject: [PATCH 1/3] Some minor changes Papillon logo on top on Welcome Screen Directly show "not supported" dialog when selecting unsupported services Removed Unused imports Added "More services coming soon" text on service selection view The need help button sends to the Discord server --- src/views/login/ServiceSelector.tsx | 31 +++++++++++++++++++------ src/views/welcome/FirstInstallation.tsx | 14 ++++++----- 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/src/views/login/ServiceSelector.tsx b/src/views/login/ServiceSelector.tsx index 2f4eb5a56..856ddd1f8 100644 --- a/src/views/login/ServiceSelector.tsx +++ b/src/views/login/ServiceSelector.tsx @@ -1,5 +1,5 @@ import React, { memo, useEffect, useState } from "react"; -import { Image, View, StyleSheet, StatusBar } from "react-native"; +import { Image, View, StyleSheet, Text } from "react-native"; import { SafeAreaView } from "react-native-safe-area-context"; import Reanimated, { LinearTransition, FlipInXDown } from "react-native-reanimated"; @@ -15,6 +15,8 @@ import { useTheme } from "@react-navigation/native"; import GetV6Data from "@/utils/login/GetV6Data"; const ServiceSelector: Screen<"ServiceSelector"> = ({ navigation }) => { + const theme = useTheme(); + const { colors } = theme; const [sound, setSound] = useState(null); const { showAlert } = useAlert(); @@ -28,7 +30,7 @@ const ServiceSelector: Screen<"ServiceSelector"> = ({ navigation }) => { setTimeout(async () => { const v6Data = await GetV6Data(); setV6Data(v6Data); - if(v6Data.restore && !v6Data.imported) { + if (v6Data.restore && !v6Data.imported) { navigation.navigate("PronoteV6Import", { data: v6Data.data }); } }, 1); @@ -45,13 +47,17 @@ const ServiceSelector: Screen<"ServiceSelector"> = ({ navigation }) => { playSound(); break; default: - showAlert({ - title: "Service non supporté", - message: "Désolé, ce service n'est pas encore supporté. Veuillez réessayer dans une prochaine version." - }); + UnsupportedAlert(); } }; + const UnsupportedAlert = () => { + showAlert({ + title: "Service non supporté", + message: "Désolé, ce service n'est pas encore supporté. Veuillez réessayer dans une prochaine version." + }); + }; + useEffect(() => { const loadSound = async () => { const { sound } = await Audio.Sound.createAsync( @@ -140,9 +146,12 @@ const ServiceSelector: Screen<"ServiceSelector"> = ({ navigation }) => { } text="Skolengo" enabled={service === "skolengo"} - onPress={() => setService("skolengo")} + onPress={() => UnsupportedAlert()} /> + + Et encore plus de services à venir ! + @@ -186,6 +195,14 @@ const styles = StyleSheet.create({ marginBottom: 16, }, + coming_soon_text: { + fontSize: 16, + textAlign: "center", + fontFamily: "medium", + marginHorizontal: 20, + marginTop: 15, + }, + image: { width: 32, height: 32, diff --git a/src/views/welcome/FirstInstallation.tsx b/src/views/welcome/FirstInstallation.tsx index f35d27620..1ca541372 100644 --- a/src/views/welcome/FirstInstallation.tsx +++ b/src/views/welcome/FirstInstallation.tsx @@ -52,6 +52,12 @@ const FirstInstallation: Screen<"FirstInstallation"> = ({ navigation }) => { return ( + = ({ navigation }) => { - = ({ navigation }) => { openUrl("https://discord.gg/ywkBZx2jFB")} /> @@ -118,6 +119,7 @@ const styles = StyleSheet.create({ logotype: { height: 28, + top: 20, }, presentation_text: { From 4c43e391f2cd0d921de15cec2e5548dd6f83a14f Mon Sep 17 00:00:00 2001 From: Ewo Date: Mon, 26 Aug 2024 11:55:30 +0200 Subject: [PATCH 2/3] Doing required changes --- src/views/login/ServiceSelector.tsx | 11 ----------- src/views/welcome/FirstInstallation.tsx | 13 ++++++------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/src/views/login/ServiceSelector.tsx b/src/views/login/ServiceSelector.tsx index 856ddd1f8..f37cef982 100644 --- a/src/views/login/ServiceSelector.tsx +++ b/src/views/login/ServiceSelector.tsx @@ -149,9 +149,6 @@ const ServiceSelector: Screen<"ServiceSelector"> = ({ navigation }) => { onPress={() => UnsupportedAlert()} /> - - Et encore plus de services à venir ! - @@ -195,14 +192,6 @@ const styles = StyleSheet.create({ marginBottom: 16, }, - coming_soon_text: { - fontSize: 16, - textAlign: "center", - fontFamily: "medium", - marginHorizontal: 20, - marginTop: 15, - }, - image: { width: 32, height: 32, diff --git a/src/views/welcome/FirstInstallation.tsx b/src/views/welcome/FirstInstallation.tsx index 1ca541372..a998a4455 100644 --- a/src/views/welcome/FirstInstallation.tsx +++ b/src/views/welcome/FirstInstallation.tsx @@ -52,12 +52,6 @@ const FirstInstallation: Screen<"FirstInstallation"> = ({ navigation }) => { return ( - = ({ navigation }) => { style={styles.presentation} > + @@ -119,7 +119,6 @@ const styles = StyleSheet.create({ logotype: { height: 28, - top: 20, }, presentation_text: { From 97a8807523bf5fd219388d914f7b97667373485b Mon Sep 17 00:00:00 2001 From: Ewo Date: Mon, 26 Aug 2024 11:57:34 +0200 Subject: [PATCH 3/3] https://github.com/PapillonApp/Papillon/issues --- src/views/welcome/FirstInstallation.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/welcome/FirstInstallation.tsx b/src/views/welcome/FirstInstallation.tsx index a998a4455..0685db8f7 100644 --- a/src/views/welcome/FirstInstallation.tsx +++ b/src/views/welcome/FirstInstallation.tsx @@ -88,7 +88,7 @@ const FirstInstallation: Screen<"FirstInstallation"> = ({ navigation }) => { openUrl("https://discord.gg/ywkBZx2jFB")} + onPress={() => openUrl("https://github.com/PapillonApp/Papillon/issues")} />