From 9a7dc91c3a9cbb25855ff43e07eb5169d1175886 Mon Sep 17 00:00:00 2001 From: aluzianobriceno Date: Mon, 19 Apr 2021 22:36:08 -0300 Subject: [PATCH 1/4] Create sharing system Co-authored-by: Lucas Monteiro --- projeto-kokama/package.json | 1 + .../src/screens/Translation/index.tsx | 22 +++++++++++++++++++ projeto-kokama/yarn.lock | 5 +++++ 3 files changed, 28 insertions(+) diff --git a/projeto-kokama/package.json b/projeto-kokama/package.json index 3df2cf8..2ff00f2 100644 --- a/projeto-kokama/package.json +++ b/projeto-kokama/package.json @@ -43,6 +43,7 @@ "react-native-reanimated": "^2.0.1", "react-native-safe-area-context": "^3.2.0", "react-native-screens": "^2.18.1", + "react-native-share": "^6.0.0", "react-native-vector-icons": "^8.1.0", "react-native-web": "~0.13.12", "react-navigation": "^4.4.4" diff --git a/projeto-kokama/src/screens/Translation/index.tsx b/projeto-kokama/src/screens/Translation/index.tsx index f1e42b8..310d0f5 100644 --- a/projeto-kokama/src/screens/Translation/index.tsx +++ b/projeto-kokama/src/screens/Translation/index.tsx @@ -5,8 +5,10 @@ import { TouchableWithoutFeedback, ScrollView, SafeAreaView, + Share, } from "react-native"; import React, { useState, useEffect } from "react"; +// import Share from "react-native-share"; import AsyncStorage from '@react-native-async-storage/async-storage'; import Icon from "react-native-vector-icons/AntDesign"; import HighlightText from "@sanar/react-native-highlight-text"; @@ -31,6 +33,19 @@ const Translation = () => { const [dictionary, setDictionary] = useState([]); const [history, setHistory] = useState([]); + const MyCustomShare = async () => { + try{ + const ShareResponse = await Share.share({ + title: 'Tadução Kokama', + message: 'teste mensagem', + + }); + + }catch (error) { + console.log('error => ', error); + } + }; + useEffect(() => { const getDictionary = async () => { try { @@ -327,6 +342,13 @@ const Translation = () => { onPressWord={translateHistoryWord} translateFrom={originLanguage} /> + + + + Compartilhar + + + ); diff --git a/projeto-kokama/yarn.lock b/projeto-kokama/yarn.lock index f169b37..44839a7 100644 --- a/projeto-kokama/yarn.lock +++ b/projeto-kokama/yarn.lock @@ -7946,6 +7946,11 @@ react-native-screens@^2.18.1: resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-2.18.1.tgz#47b9991c6f762d00d0ed3233e5283d523e859885" integrity sha512-r5WZLpmx2hHjC1RgMdPq5YpSU9tEhBpUaZ5M1SUtNIONyiLqQVxabhRCINdebIk4depJiIl7yw2Q85zJyeX6fw== +react-native-share@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/react-native-share/-/react-native-share-6.0.0.tgz#00fbd014679f1d6a9d3cfa69fb5f7d3c01d151b4" + integrity sha512-6mNDXKt5/d8pQbl56EmxzXSTsW4g/6zwXt8/YfzJL4WFx/Go5YEaKbb/PYyD2XLv2UU8CPEa2bHpnzwLmUnMDg== + react-native-vector-icons@^7.0.0: version "7.1.0" resolved "https://registry.yarnpkg.com/react-native-vector-icons/-/react-native-vector-icons-7.1.0.tgz#145487d617b2a81d395d2cf64e6e065fcab3a454" From 4e975e4a87af766403906732386b085e6435927e Mon Sep 17 00:00:00 2001 From: aluzianobriceno Date: Tue, 20 Apr 2021 23:22:20 -0300 Subject: [PATCH 2/4] Share function is done, style is missing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Lucas Monteiro nickby2 Co-authored-by: Luís Guilherme --- projeto-kokama/src/assets/img/share.png | Bin 0 -> 10658 bytes .../src/screens/Translation/index.tsx | 25 +++++++++++------- .../src/screens/Translation/styles.ts | 21 +++++++++++++++ 3 files changed, 37 insertions(+), 9 deletions(-) create mode 100644 projeto-kokama/src/assets/img/share.png diff --git a/projeto-kokama/src/assets/img/share.png b/projeto-kokama/src/assets/img/share.png new file mode 100644 index 0000000000000000000000000000000000000000..d68235a89d5aa32b90e9dc04ac046bf831b1118a GIT binary patch literal 10658 zcmeHt_g7O*)b2?_h!6?A2!t90k){-p7NjOprHNRGFH%K_8j93JR6wK!MWslKCgti^&kvuF0+&+M6b_RM5@x;u-BDvCl7Bt|A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t z-$6o?lBY^ZF6)3L)9>AjGM9hW9Wd%eLXC72>Hg)dDf`LHq94cDLCdc~epim!pp8mo z;bpQhI;!BolnZk}hL29llapTwcUD0|<+%$P_eI$+Mfa42gRQL3FHdfHdyWB!ZZ|&< z#JO*!tijA`xkf`Wvvzh9#~yAyG0V!(oG&KlVh-$w?-IzhO-kgTkcKqkmpBp1^+&8` z=oR9QTzepBKtWS=xw|;OHDdiAYSAlVp}USncK%FO^{N9< z8o8Ckl$mkl$Z#l>lzz)x@GfG+2__Z{ZO!S^AbagjsH-^`qpe5e&QgR z`D1z`2M?zR;dl~(knq~6g?7&D-=2$v8uxGce%xZjd#Mt%&RqC1o?M{XmHz9z44FB4 zOR8OHMJilm+-uWego4oplMVNuFv4%`0^9Vn&)}A5n~2RzVo{Sk9r2lTL# { const [destLanguage, setDestLanguage] = useState(KOKAMA); const [dictionary, setDictionary] = useState([]); const [history, setHistory] = useState([]); + let shareTranslation: string = ""; const MyCustomShare = async () => { + try{ const ShareResponse = await Share.share({ title: 'Tadução Kokama', - message: 'teste mensagem', - + message: translation.concat(" - ", shareTranslation), }); }catch (error) { @@ -197,9 +199,15 @@ const Translation = () => { // For a given dictionary element(word), return its kokama and portuguese words for presentation function getWords(language: string, word: Dictionary) { + let stringConcat: string = ''; + // for (let translate in word.translations) { + // stringConcat = stringConcat.concat(translate) + // } if (language == KOKAMA) { + shareTranslation = word.translations[0]; return word.translations; } else { + shareTranslation = word.word_kokama; return [word.word_kokama]; } } @@ -255,6 +263,12 @@ const Translation = () => { {capitalizeFirstLetter(words)} + + + + + + {phrases.map((phrase, index) => ( {/* Phrase kokama */} @@ -342,13 +356,6 @@ const Translation = () => { onPressWord={translateHistoryWord} translateFrom={originLanguage} /> - - - - Compartilhar - - - ); diff --git a/projeto-kokama/src/screens/Translation/styles.ts b/projeto-kokama/src/screens/Translation/styles.ts index dd4c54d..360c759 100644 --- a/projeto-kokama/src/screens/Translation/styles.ts +++ b/projeto-kokama/src/screens/Translation/styles.ts @@ -174,6 +174,27 @@ const styles = StyleSheet.create({ fontSize: 18, color: Colors.HISTORY_WORD_TEXT, }, + ShareTitle: { + flexDirection: "row", + height: 40, + borderBottomWidth: 1.5, + borderTopWidth: 1.5, + marginTop: 5, + borderColor: Colors.DARK_GRAY, + backgroundColor: Colors.WHITE, + alignItems: "center", + justifyContent: "space-between", + display: "flex", + }, + Title: { + textAlign: "left", + fontSize: 20, + paddingLeft: 23, + color: Colors.HISTORY_TEXT, + }, + ShareIcon: { + marginRight: 25, + }, }); export default styles; \ No newline at end of file From 0b6f075e98f9955ae01e0033095318f2430af806 Mon Sep 17 00:00:00 2001 From: aluzianobriceno Date: Sat, 24 Apr 2021 18:17:54 -0300 Subject: [PATCH 3/4] Share button stylized Co-authored-by: Lucas Monteiro --- .../src/screens/Translation/index.tsx | 26 +++++++++---------- .../src/screens/Translation/styles.ts | 9 +++---- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/projeto-kokama/src/screens/Translation/index.tsx b/projeto-kokama/src/screens/Translation/index.tsx index 19c8e05..76d17d9 100644 --- a/projeto-kokama/src/screens/Translation/index.tsx +++ b/projeto-kokama/src/screens/Translation/index.tsx @@ -8,7 +8,6 @@ import { Share, } from "react-native"; import React, { useState, useEffect } from "react"; -// import Share from "react-native-share"; import AsyncStorage from '@react-native-async-storage/async-storage'; import Icon from "react-native-vector-icons/AntDesign"; import Icon5 from "react-native-vector-icons/FontAwesome5"; @@ -40,7 +39,8 @@ const Translation = () => { try{ const ShareResponse = await Share.share({ title: 'Tadução Kokama', - message: translation.concat(" - ", shareTranslation), + message: translation.concat(" - ", shareTranslation, "\nPara saber mais do aplicativo acesse esse link: \nhttps://fga-eps-mds.github.io/2020.2-Projeto-Kokama-Wiki/"), + // url: 'https://fga-eps-mds.github.io/2020.2-Projeto-Kokama-Wiki/', }); }catch (error) { @@ -200,9 +200,6 @@ const Translation = () => { // For a given dictionary element(word), return its kokama and portuguese words for presentation function getWords(language: string, word: Dictionary) { let stringConcat: string = ''; - // for (let translate in word.translations) { - // stringConcat = stringConcat.concat(translate) - // } if (language == KOKAMA) { shareTranslation = word.translations[0]; return word.translations; @@ -260,14 +257,17 @@ const Translation = () => { {words !== "" && ( {/* Presentation of the translations words */} - - {capitalizeFirstLetter(words)} - - - - - - + + + {capitalizeFirstLetter(words)} + + + + + + + + {phrases.map((phrase, index) => ( diff --git a/projeto-kokama/src/screens/Translation/styles.ts b/projeto-kokama/src/screens/Translation/styles.ts index 360c759..d3233ec 100644 --- a/projeto-kokama/src/screens/Translation/styles.ts +++ b/projeto-kokama/src/screens/Translation/styles.ts @@ -107,9 +107,8 @@ const styles = StyleSheet.create({ textAlign: "left", fontSize: 28, color: Colors.TEXT, - paddingLeft: 23, + paddingLeft: 15, marginBottom: 15, - borderBottomWidth: 1.5, borderColor: Colors.DARK_GRAY, }, exampleArea: { @@ -178,8 +177,8 @@ const styles = StyleSheet.create({ flexDirection: "row", height: 40, borderBottomWidth: 1.5, - borderTopWidth: 1.5, - marginTop: 5, + marginTop: 10, + marginLeft: 40, borderColor: Colors.DARK_GRAY, backgroundColor: Colors.WHITE, alignItems: "center", @@ -193,7 +192,7 @@ const styles = StyleSheet.create({ color: Colors.HISTORY_TEXT, }, ShareIcon: { - marginRight: 25, + marginBottom: 10, }, }); From 51d7461dee2704135b733dcf7337d0dcc30aa86c Mon Sep 17 00:00:00 2001 From: aluzianobriceno Date: Sat, 24 Apr 2021 20:49:33 -0300 Subject: [PATCH 4/4] Fix sonarCloud indication --- projeto-kokama/src/screens/Translation/index.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/projeto-kokama/src/screens/Translation/index.tsx b/projeto-kokama/src/screens/Translation/index.tsx index 76d17d9..204c421 100644 --- a/projeto-kokama/src/screens/Translation/index.tsx +++ b/projeto-kokama/src/screens/Translation/index.tsx @@ -37,10 +37,9 @@ const Translation = () => { const MyCustomShare = async () => { try{ - const ShareResponse = await Share.share({ + await Share.share({ title: 'Tadução Kokama', message: translation.concat(" - ", shareTranslation, "\nPara saber mais do aplicativo acesse esse link: \nhttps://fga-eps-mds.github.io/2020.2-Projeto-Kokama-Wiki/"), - // url: 'https://fga-eps-mds.github.io/2020.2-Projeto-Kokama-Wiki/', }); }catch (error) {