pre merge
This commit is contained in:
commit
1b10d22c47
|
@ -16,6 +16,7 @@
|
|||
2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
|
||||
2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
|
||||
2DCD954D1E0B4F2C00145EB5 /* ankilanTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ankilanTests.m */; };
|
||||
<<<<<<< HEAD
|
||||
77265BEFC4404E238D395E2C /* AntDesign.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 0E5D5065D768435EA998104A /* AntDesign.ttf */; };
|
||||
B68FA0D61C384C9AB44BD3BE /* Entypo.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 40287932B0184615A4E3081F /* Entypo.ttf */; };
|
||||
B9388BD77CA54A9298B4A98F /* EvilIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 5D95DE62BE4C4C0BAACB9571 /* EvilIcons.ttf */; };
|
||||
|
@ -51,6 +52,24 @@
|
|||
ADAC158BE8B441D685F551CC /* rubicon-icon-font.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2762280877E6481791F752C8 /* rubicon-icon-font.ttf */; };
|
||||
4DB67A84E7FF44FF8100CE68 /* SimpleLineIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = F15E1AD962AC475ABEBE9A1F /* SimpleLineIcons.ttf */; };
|
||||
B71508403B384BFEB49A7215 /* Zocial.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 091E38CCBA674D09BC6AD2DE /* Zocial.ttf */; };
|
||||
=======
|
||||
4D52FDE523E84B2791C3D67D /* AntDesign.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 3000D2B3834E4C66A28382F8 /* AntDesign.ttf */; };
|
||||
B90493FFE9264DF5B6CC7C44 /* Entypo.ttf in Resources */ = {isa = PBXBuildFile; fileRef = ADE75B0AF3E84621B5059B43 /* Entypo.ttf */; };
|
||||
31DBC812F4DE446B9D3DC7B1 /* EvilIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7AD629F9A4B44BFE9AFEA2E9 /* EvilIcons.ttf */; };
|
||||
52508E432BC44BF7A5E64891 /* Feather.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 4712AA6A09254CA2B29AF3F5 /* Feather.ttf */; };
|
||||
BA64553EADB24FB9AB6E0F82 /* FontAwesome.ttf in Resources */ = {isa = PBXBuildFile; fileRef = DE8FAE89F42A46C381F68DAF /* FontAwesome.ttf */; };
|
||||
42092AB24C2F4A0987A993FA /* FontAwesome5_Brands.ttf in Resources */ = {isa = PBXBuildFile; fileRef = F6F0D28CAB1A451DAA9BA6AE /* FontAwesome5_Brands.ttf */; };
|
||||
A2E24CE7C18C4CFF97F78377 /* FontAwesome5_Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = BCC0EEAD424E456DA490EE4F /* FontAwesome5_Regular.ttf */; };
|
||||
631DA64D244F4F8F915F2121 /* FontAwesome5_Solid.ttf in Resources */ = {isa = PBXBuildFile; fileRef = BDB3D4C6185B4CB69E360505 /* FontAwesome5_Solid.ttf */; };
|
||||
369E14D730C449659A20A504 /* Fontisto.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 256E5C94D0AC40E381A107A5 /* Fontisto.ttf */; };
|
||||
0F7CA4B8C6454C77B1E45705 /* Foundation.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D3378FED83674C7297D95B3C /* Foundation.ttf */; };
|
||||
D2D1008687164C9CB74A95D7 /* Ionicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = CCF85275316C4FA29EBEBEF3 /* Ionicons.ttf */; };
|
||||
659D1586ED4C433BA9DD67DB /* MaterialCommunityIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 37CF45EBB8E541AFB0AEEED1 /* MaterialCommunityIcons.ttf */; };
|
||||
97EA10A37A0942C0B0FD6C44 /* MaterialIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 99E0F4267E0B4BB69A5994F3 /* MaterialIcons.ttf */; };
|
||||
60D08C8669D9491891F0EAE0 /* Octicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 006C0665080F4DB581A45597 /* Octicons.ttf */; };
|
||||
157D60FEAF7C49948291342D /* SimpleLineIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 00E332BD0E6B4F69AD2BFB66 /* SimpleLineIcons.ttf */; };
|
||||
31C2D4A00BF24B9989303435 /* Zocial.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 16C65B2FFA244990A98EED99 /* Zocial.ttf */; };
|
||||
>>>>>>> fixed
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
|
@ -86,6 +105,7 @@
|
|||
2D02E4901E0B4A5D006451C7 /* ankilan-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ankilan-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
|
||||
ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
|
||||
<<<<<<< HEAD
|
||||
0E5D5065D768435EA998104A /* AntDesign.ttf */ = {isa = PBXFileReference; name = "AntDesign.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
40287932B0184615A4E3081F /* Entypo.ttf */ = {isa = PBXFileReference; name = "Entypo.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Entypo.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
5D95DE62BE4C4C0BAACB9571 /* EvilIcons.ttf */ = {isa = PBXFileReference; name = "EvilIcons.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
|
@ -121,6 +141,24 @@
|
|||
2762280877E6481791F752C8 /* rubicon-icon-font.ttf */ = {isa = PBXFileReference; name = "rubicon-icon-font.ttf"; path = "../node_modules/native-base/Fonts/rubicon-icon-font.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
F15E1AD962AC475ABEBE9A1F /* SimpleLineIcons.ttf */ = {isa = PBXFileReference; name = "SimpleLineIcons.ttf"; path = "../node_modules/native-base/Fonts/SimpleLineIcons.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
091E38CCBA674D09BC6AD2DE /* Zocial.ttf */ = {isa = PBXFileReference; name = "Zocial.ttf"; path = "../node_modules/native-base/Fonts/Zocial.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
=======
|
||||
3000D2B3834E4C66A28382F8 /* AntDesign.ttf */ = {isa = PBXFileReference; name = "AntDesign.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
ADE75B0AF3E84621B5059B43 /* Entypo.ttf */ = {isa = PBXFileReference; name = "Entypo.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Entypo.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
7AD629F9A4B44BFE9AFEA2E9 /* EvilIcons.ttf */ = {isa = PBXFileReference; name = "EvilIcons.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
4712AA6A09254CA2B29AF3F5 /* Feather.ttf */ = {isa = PBXFileReference; name = "Feather.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Feather.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
DE8FAE89F42A46C381F68DAF /* FontAwesome.ttf */ = {isa = PBXFileReference; name = "FontAwesome.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
F6F0D28CAB1A451DAA9BA6AE /* FontAwesome5_Brands.ttf */ = {isa = PBXFileReference; name = "FontAwesome5_Brands.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
BCC0EEAD424E456DA490EE4F /* FontAwesome5_Regular.ttf */ = {isa = PBXFileReference; name = "FontAwesome5_Regular.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
BDB3D4C6185B4CB69E360505 /* FontAwesome5_Solid.ttf */ = {isa = PBXFileReference; name = "FontAwesome5_Solid.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
256E5C94D0AC40E381A107A5 /* Fontisto.ttf */ = {isa = PBXFileReference; name = "Fontisto.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Fontisto.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
D3378FED83674C7297D95B3C /* Foundation.ttf */ = {isa = PBXFileReference; name = "Foundation.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Foundation.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
CCF85275316C4FA29EBEBEF3 /* Ionicons.ttf */ = {isa = PBXFileReference; name = "Ionicons.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
37CF45EBB8E541AFB0AEEED1 /* MaterialCommunityIcons.ttf */ = {isa = PBXFileReference; name = "MaterialCommunityIcons.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
99E0F4267E0B4BB69A5994F3 /* MaterialIcons.ttf */ = {isa = PBXFileReference; name = "MaterialIcons.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
006C0665080F4DB581A45597 /* Octicons.ttf */ = {isa = PBXFileReference; name = "Octicons.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Octicons.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
00E332BD0E6B4F69AD2BFB66 /* SimpleLineIcons.ttf */ = {isa = PBXFileReference; name = "SimpleLineIcons.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
16C65B2FFA244990A98EED99 /* Zocial.ttf */ = {isa = PBXFileReference; name = "Zocial.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Zocial.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
>>>>>>> fixed
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
|
@ -210,7 +248,11 @@
|
|||
00E356EF1AD99517003FC87E /* ankilanTests */,
|
||||
83CBBA001A601CBA00E9B192 /* Products */,
|
||||
2D16E6871FA4F8E400B85C8A /* Frameworks */,
|
||||
<<<<<<< HEAD
|
||||
F885F34D61544A6D98238D81 /* Resources */,
|
||||
=======
|
||||
F26EA599C9CA4864823C1698 /* Resources */,
|
||||
>>>>>>> fixed
|
||||
);
|
||||
indentWidth = 2;
|
||||
sourceTree = "<group>";
|
||||
|
@ -228,6 +270,7 @@
|
|||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
<<<<<<< HEAD
|
||||
F885F34D61544A6D98238D81 /* Resources */ = {
|
||||
isa = "PBXGroup";
|
||||
children = (
|
||||
|
@ -266,6 +309,27 @@
|
|||
2762280877E6481791F752C8 /* rubicon-icon-font.ttf */,
|
||||
F15E1AD962AC475ABEBE9A1F /* SimpleLineIcons.ttf */,
|
||||
091E38CCBA674D09BC6AD2DE /* Zocial.ttf */,
|
||||
=======
|
||||
F26EA599C9CA4864823C1698 /* Resources */ = {
|
||||
isa = "PBXGroup";
|
||||
children = (
|
||||
3000D2B3834E4C66A28382F8 /* AntDesign.ttf */,
|
||||
ADE75B0AF3E84621B5059B43 /* Entypo.ttf */,
|
||||
7AD629F9A4B44BFE9AFEA2E9 /* EvilIcons.ttf */,
|
||||
4712AA6A09254CA2B29AF3F5 /* Feather.ttf */,
|
||||
DE8FAE89F42A46C381F68DAF /* FontAwesome.ttf */,
|
||||
F6F0D28CAB1A451DAA9BA6AE /* FontAwesome5_Brands.ttf */,
|
||||
BCC0EEAD424E456DA490EE4F /* FontAwesome5_Regular.ttf */,
|
||||
BDB3D4C6185B4CB69E360505 /* FontAwesome5_Solid.ttf */,
|
||||
256E5C94D0AC40E381A107A5 /* Fontisto.ttf */,
|
||||
D3378FED83674C7297D95B3C /* Foundation.ttf */,
|
||||
CCF85275316C4FA29EBEBEF3 /* Ionicons.ttf */,
|
||||
37CF45EBB8E541AFB0AEEED1 /* MaterialCommunityIcons.ttf */,
|
||||
99E0F4267E0B4BB69A5994F3 /* MaterialIcons.ttf */,
|
||||
006C0665080F4DB581A45597 /* Octicons.ttf */,
|
||||
00E332BD0E6B4F69AD2BFB66 /* SimpleLineIcons.ttf */,
|
||||
16C65B2FFA244990A98EED99 /* Zocial.ttf */,
|
||||
>>>>>>> fixed
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
|
@ -407,6 +471,7 @@
|
|||
files = (
|
||||
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
|
||||
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
|
||||
<<<<<<< HEAD
|
||||
77265BEFC4404E238D395E2C /* AntDesign.ttf in Resources */,
|
||||
B68FA0D61C384C9AB44BD3BE /* Entypo.ttf in Resources */,
|
||||
B9388BD77CA54A9298B4A98F /* EvilIcons.ttf in Resources */,
|
||||
|
@ -442,6 +507,24 @@
|
|||
ADAC158BE8B441D685F551CC /* rubicon-icon-font.ttf in Resources */,
|
||||
4DB67A84E7FF44FF8100CE68 /* SimpleLineIcons.ttf in Resources */,
|
||||
B71508403B384BFEB49A7215 /* Zocial.ttf in Resources */,
|
||||
=======
|
||||
4D52FDE523E84B2791C3D67D /* AntDesign.ttf in Resources */,
|
||||
B90493FFE9264DF5B6CC7C44 /* Entypo.ttf in Resources */,
|
||||
31DBC812F4DE446B9D3DC7B1 /* EvilIcons.ttf in Resources */,
|
||||
52508E432BC44BF7A5E64891 /* Feather.ttf in Resources */,
|
||||
BA64553EADB24FB9AB6E0F82 /* FontAwesome.ttf in Resources */,
|
||||
42092AB24C2F4A0987A993FA /* FontAwesome5_Brands.ttf in Resources */,
|
||||
A2E24CE7C18C4CFF97F78377 /* FontAwesome5_Regular.ttf in Resources */,
|
||||
631DA64D244F4F8F915F2121 /* FontAwesome5_Solid.ttf in Resources */,
|
||||
369E14D730C449659A20A504 /* Fontisto.ttf in Resources */,
|
||||
0F7CA4B8C6454C77B1E45705 /* Foundation.ttf in Resources */,
|
||||
D2D1008687164C9CB74A95D7 /* Ionicons.ttf in Resources */,
|
||||
659D1586ED4C433BA9DD67DB /* MaterialCommunityIcons.ttf in Resources */,
|
||||
97EA10A37A0942C0B0FD6C44 /* MaterialIcons.ttf in Resources */,
|
||||
60D08C8669D9491891F0EAE0 /* Octicons.ttf in Resources */,
|
||||
157D60FEAF7C49948291342D /* SimpleLineIcons.ttf in Resources */,
|
||||
31C2D4A00BF24B9989303435 /* Zocial.ttf in Resources */,
|
||||
>>>>>>> fixed
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
|
@ -71,9 +71,12 @@
|
|||
<string>Octicons.ttf</string>
|
||||
<string>SimpleLineIcons.ttf</string>
|
||||
<string>Zocial.ttf</string>
|
||||
<<<<<<< HEAD
|
||||
<string>Roboto_medium.ttf</string>
|
||||
<string>Roboto.ttf</string>
|
||||
<string>rubicon-icon-font.ttf</string>
|
||||
=======
|
||||
>>>>>>> fixed
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -23,7 +23,10 @@
|
|||
"react-native": "^0.62.0",
|
||||
"react-native-ankidroid": "^0.4.0",
|
||||
"react-native-material-textfield": "^0.16.1",
|
||||
<<<<<<< HEAD
|
||||
"react-native-svg": "^12.0.3",
|
||||
=======
|
||||
>>>>>>> fixed
|
||||
"react-native-vector-icons": "^6.6.0",
|
||||
"react-redux": "^7.2.0",
|
||||
"redux": "^4.0.5",
|
||||
|
|
|
@ -7,9 +7,14 @@ import DeckPicker from './view/deck-picker';
|
|||
import AddWordForm from './anki-form';
|
||||
import AnkiTemplate from './view/add-main-template';
|
||||
import {Grid, Row} from 'native-base';
|
||||
import {checkAnkiLanModelForExisting, getDeckList, getModelList} from '../actions/anki-get-actions';
|
||||
import {
|
||||
checkAnkiLanModelForExisting,
|
||||
getDeckList,
|
||||
getModelList,
|
||||
} from '../actions/anki-get-actions';
|
||||
|
||||
const StartScreen = props => {
|
||||
<<<<<<< HEAD
|
||||
useEffect(() => {
|
||||
props.getDeckList();
|
||||
props.getModelList();
|
||||
|
@ -33,18 +38,44 @@ const StartScreen = props => {
|
|||
)}
|
||||
</ScrollView>
|
||||
);
|
||||
=======
|
||||
useEffect(() => {
|
||||
props.getDeckList();
|
||||
props.getModelList();
|
||||
}, []);
|
||||
useEffect(() => {
|
||||
props.checkAnkiLanModelForExisting(
|
||||
props.modelName,
|
||||
props.modelList,
|
||||
);
|
||||
});
|
||||
return (
|
||||
<ScrollView keyboardShouldPersistTaps="handled">
|
||||
{props.ankiAvailable ? (
|
||||
props.ankiLanModelExists ? (
|
||||
<AddWordForm />
|
||||
) : (
|
||||
<AnkiTemplate />
|
||||
)
|
||||
) : (
|
||||
<Permissions />
|
||||
)}
|
||||
</ScrollView>
|
||||
);
|
||||
>>>>>>> fixed
|
||||
};
|
||||
|
||||
export default connect(
|
||||
state => ({
|
||||
ankiAvailable: state.anki.appHasAccess,
|
||||
ankiLanModelExists: state.anki.ankiLanModelIsAlreadyExists,
|
||||
modelName: state.anki.ankiLanModelName,
|
||||
modelList: state.anki.modelList,
|
||||
creator: state.anki.noteCreator,
|
||||
}),
|
||||
{
|
||||
checkAnkiLanModelForExisting,
|
||||
getDeckList,
|
||||
getModelList
|
||||
})(StartScreen);
|
||||
state => ({
|
||||
ankiAvailable: state.anki.appHasAccess,
|
||||
ankiLanModelExists: state.anki.ankiLanModelIsAlreadyExists,
|
||||
modelName: state.anki.ankiLanModelName,
|
||||
modelList: state.anki.modelList,
|
||||
creator: state.anki.noteCreator,
|
||||
}),
|
||||
{
|
||||
checkAnkiLanModelForExisting,
|
||||
getDeckList,
|
||||
getModelList,
|
||||
},
|
||||
)(StartScreen);
|
||||
|
|
|
@ -5,6 +5,7 @@ import {Form, Container, Item} from 'native-base';
|
|||
import {checkAnkiLanModelForExisting} from '../actions/anki-get-actions';
|
||||
import InputWord from './view/translatable-word';
|
||||
import SubmitButton from './view/submit-button';
|
||||
<<<<<<< HEAD
|
||||
import {wordInfo} from "../actions/api/dictionary";
|
||||
import FieldEditor from './view/field-editor';
|
||||
|
||||
|
@ -42,18 +43,63 @@ const AnkiForm = props => {
|
|||
</Form>
|
||||
</Container>
|
||||
);
|
||||
=======
|
||||
import {wordInfo} from '../actions/api/dictionary';
|
||||
import FieldEditor from './view/field-editor';
|
||||
|
||||
const AnkiForm = props => {
|
||||
const [target, setTarget] = useState('');
|
||||
const [fields, setFields] = useState({});
|
||||
const [submitted, setSubmitted] = useState(true);
|
||||
useEffect(() => {
|
||||
// props.wordInfo('Urge');
|
||||
// props.wordInfo('Maze');
|
||||
// props.wordInfo('Ramification');
|
||||
// props.wordInfo('Dare');
|
||||
// props.wordInfo('Entrepreneurship');
|
||||
// props.wordInfo('meagre');
|
||||
// props.wordInfo('meager');
|
||||
}, []);
|
||||
const getWord = word => {
|
||||
setTarget(word);
|
||||
};
|
||||
const submit = () => {
|
||||
props.wordInfo(target);
|
||||
setSubmitted(true);
|
||||
console.log(props.data)
|
||||
};
|
||||
|
||||
return (
|
||||
<Container style={{padding: 20}}>
|
||||
<Form>
|
||||
<DeckPicker />
|
||||
<InputWord word={getWord} onSubmit={submit} />
|
||||
{submitted ? (
|
||||
<FieldEditor
|
||||
data={{
|
||||
type: 'part of speech',
|
||||
values: ['1', '2', '3','5',],
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
<SubmitButton onSubmit={submit} />
|
||||
)}
|
||||
</Form>
|
||||
</Container>
|
||||
);
|
||||
>>>>>>> fixed
|
||||
};
|
||||
|
||||
export default connect(
|
||||
state => ({
|
||||
ankiLanModelExists: state.anki.ankiLanModelIsAlreadyExists,
|
||||
modelName: state.anki.ankiLanModelName,
|
||||
modelList: state.anki.modelList,
|
||||
creator: state.anki.noteCreator,
|
||||
}),
|
||||
{
|
||||
checkAnkiLanModelForExisting,
|
||||
wordInfo
|
||||
|
||||
},
|
||||
state => ({
|
||||
ankiLanModelExists: state.anki.ankiLanModelIsAlreadyExists,
|
||||
modelName: state.anki.ankiLanModelName,
|
||||
modelList: state.anki.modelList,
|
||||
creator: state.anki.noteCreator,
|
||||
data: state
|
||||
}),
|
||||
{
|
||||
checkAnkiLanModelForExisting,
|
||||
wordInfo,
|
||||
},
|
||||
)(AnkiForm);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import React, {useState, useEffect, useRef} from 'react';
|
||||
import {connect} from 'react-redux';
|
||||
<<<<<<< HEAD
|
||||
import {Text, Button, Picker} from 'native-base';
|
||||
import TextField from 'react-native-material-textfield/src/components/field';
|
||||
import {View} from 'native-base';
|
||||
|
@ -115,3 +116,135 @@ const styles = StyleSheet.create({
|
|||
});
|
||||
|
||||
export default connect(state => ({}), null)(FieldEditor);
|
||||
=======
|
||||
|
||||
import TextField from 'react-native-material-textfield/src/components/field';
|
||||
import {StyleSheet} from 'react-native';
|
||||
import {View, Text, Button, Picker} from 'native-base';
|
||||
import Icon from 'react-native-vector-icons/FontAwesome5';
|
||||
import IconedButton from './iconed-button.jsx';
|
||||
const FieldEditor = props => {
|
||||
const [data, setData] = useState({});
|
||||
const [editing, setEditing] = useState(true);
|
||||
const label = props.data.label;
|
||||
const [selectedValue, setSelectedValue] = useState(
|
||||
props.data.values[0],
|
||||
);
|
||||
const [userTyped, setUserTyped] = useState('');
|
||||
const input = useRef();
|
||||
useEffect(() => {
|
||||
setData(props.data);
|
||||
}, []);
|
||||
|
||||
const selectValue = value => {
|
||||
setSelectedValue(value);
|
||||
};
|
||||
const typing = text => {
|
||||
setUserTyped(text)
|
||||
};
|
||||
const confirmTyped = () => {
|
||||
const values = data.values
|
||||
setData({...data, values: [...values, userTyped]})
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
wrapper: {},
|
||||
inner: {
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
alignContent: 'center',
|
||||
},
|
||||
row: {
|
||||
display: 'flex',
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'space-between',
|
||||
width: 90,
|
||||
},
|
||||
button: {
|
||||
width: 40,
|
||||
height: 40,
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
},
|
||||
tfWrapper: {
|
||||
width: editing ? '75%' : '84%',
|
||||
},
|
||||
});
|
||||
|
||||
return (
|
||||
<View style={styles.wrapper}>
|
||||
<Text>{label}</Text>
|
||||
<View style={styles.inner}>
|
||||
<View style={styles.tfWrapper}>
|
||||
{editing ? (
|
||||
<TextField
|
||||
multiline={true}
|
||||
label={data.type}
|
||||
value={selectedValue}
|
||||
ref={input}
|
||||
onChangeText={text =>
|
||||
typing(text)
|
||||
}
|
||||
/>
|
||||
) : (
|
||||
<Picker
|
||||
selectedValue={
|
||||
selectedValue
|
||||
}
|
||||
onValueChange={value =>
|
||||
selectValue(
|
||||
value,
|
||||
)
|
||||
}>
|
||||
{data.values.map(
|
||||
(value, id) => {
|
||||
return (
|
||||
<Picker.Item
|
||||
value={
|
||||
value
|
||||
}
|
||||
label={
|
||||
value
|
||||
}
|
||||
key={
|
||||
id
|
||||
}
|
||||
/>
|
||||
);
|
||||
},
|
||||
)}
|
||||
</Picker>
|
||||
)}
|
||||
</View>
|
||||
{editing ? (
|
||||
<View style={styles.row}>
|
||||
<IconedButton
|
||||
icon="caret-down"
|
||||
onPress={() => {
|
||||
setEditing(
|
||||
!editing,
|
||||
);
|
||||
}}
|
||||
/>
|
||||
<IconedButton
|
||||
icon="check"
|
||||
onPress={confirmTyped}
|
||||
/>
|
||||
</View>
|
||||
) : (
|
||||
<IconedButton
|
||||
icon="pen"
|
||||
onPress={() => {
|
||||
setEditing(!editing);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
export default connect()(FieldEditor);
|
||||
>>>>>>> fixed
|
||||
|
|
26
src/components/view/iconed-button.jsx
Normal file
26
src/components/view/iconed-button.jsx
Normal file
|
@ -0,0 +1,26 @@
|
|||
import React, {useState} from 'react';
|
||||
|
||||
import TextField from 'react-native-material-textfield/src/components/field';
|
||||
import {StyleSheet} from 'react-native';
|
||||
import {View, Text, Button, Picker} from 'native-base';
|
||||
import Icon from 'react-native-vector-icons/FontAwesome5';
|
||||
|
||||
const IconedButton = props => {
|
||||
return (
|
||||
<Button bordered style={styles.button} onPress={props.onPress}>
|
||||
<Icon name={props.icon} size={20} color={'blue'} />
|
||||
</Button>
|
||||
);
|
||||
};
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
button: {
|
||||
width: 40,
|
||||
height: 40,
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
},
|
||||
});
|
||||
|
||||
export default IconedButton;
|
Loading…
Reference in a new issue