IO-748 Remove swipe on notes.

This commit is contained in:
Patrick Fic
2021-03-09 13:41:41 -08:00
parent 8d34db4bbe
commit 2759c3322b
3 changed files with 18648 additions and 1720 deletions

View File

@@ -1,66 +1,45 @@
import { AntDesign, Ionicons } from "@expo/vector-icons";
import { useNavigation } from "@react-navigation/native";
import { AntDesign } from "@expo/vector-icons";
import { DateTime } from "luxon";
import { Card, CardItem, Text, View } from "native-base";
import React from "react";
import { useTranslation } from "react-i18next";
import { TouchableOpacity } from "react-native-gesture-handler";
import Swipeable from "react-native-gesture-handler/Swipeable";
import styles from "../styles";
export default function NoteListItem({ item }) {
return (
<Swipeable renderRightActions={() => <RenderRightAction />}>
<Card>
<CardItem bordered>
<View style={{ display: "flex", flex: 1 }}>
<Text>{item.text}</Text>
<View
style={{
flexDirection: "row",
alignSelf: "flex-end",
alignItems: "center",
}}
>
{item.private && (
<AntDesign
name="eyeo"
style={{ margin: 4 }}
size={24}
color="black"
/>
<Card>
<CardItem bordered>
<View style={{ display: "flex", flex: 1 }}>
<Text>{item.text}</Text>
<View
style={{
flexDirection: "row",
alignSelf: "flex-end",
alignItems: "center",
}}
>
{item.private && (
<AntDesign
name="eyeo"
style={{ margin: 4 }}
size={24}
color="black"
/>
)}
{item.critical && (
<AntDesign
name="warning"
style={{ margin: 4 }}
size={24}
color="tomato"
/>
)}
<Text style={{ fontSize: 12 }}>
{DateTime.fromISO(item.created_at).toLocaleString(
DateTime.DATETIME_SHORT
)}
{item.critical && (
<AntDesign
name="warning"
style={{ margin: 4 }}
size={24}
color="tomato"
/>
)}
<Text style={{ fontSize: 12 }}>
{DateTime.fromISO(item.created_at).toLocaleString(
DateTime.DATETIME_SHORT
)}
</Text>
</View>
</Text>
</View>
</CardItem>
</Card>
</Swipeable>
</View>
</CardItem>
</Card>
);
}
const RenderRightAction = (props) => {
const navigation = useNavigation();
const { t } = useTranslation();
return (
<TouchableOpacity
style={[styles.swipe_view, styles.swipe_view_blue]}
onPress={() => navigation.push("JobCamera")}
>
<Ionicons name="ios-camera" size={24} color="white" />
<Text style={styles.swipe_text}>{t("joblist.actions.swipecamera")}</Text>
</TouchableOpacity>
);
};

20264
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -9,7 +9,7 @@
},
"dependencies": {
"@apollo/client": "^3.3.4",
"@expo/vector-icons": "^10.2.0",
"@expo/vector-icons": "^12.0.0",
"@react-native-community/async-storage": "~1.12.0",
"@react-native-community/masked-view": "0.1.10",
"@react-navigation/bottom-tabs": "^5.11.2",
@@ -25,6 +25,7 @@
"expo-file-system": "~9.3.0",
"expo-font": "~8.4.0",
"expo-image-picker": "~9.2.0",
"expo-images-picker": "https://github.com/snaptsoft/expo-images-picker/",
"expo-localization": "~9.1.0",
"expo-media-library": "~10.0.0",
"expo-permissions": "~10.0.0",
@@ -41,14 +42,15 @@
"react": "16.13.1",
"react-dom": "16.13.1",
"react-i18next": "^11.8.2",
"react-native": "https://github.com/expo/react-native/archive/sdk-40.0.0.tar.gz",
"react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz",
"react-native-easy-grid": "^0.2.2",
"react-native-gesture-handler": "~1.8.0",
"react-native-image-zoom-viewer": "^3.0.1",
"react-native-indicators": "^0.17.0",
"react-native-progress": "^4.1.2",
"react-native-reanimated": "~1.13.0",
"react-native-screens": "~2.15.0",
"react-native-safe-area-context": "3.1.9",
"react-native-screens": "~2.15.2",
"react-native-web": "~0.13.12",
"react-redux": "^7.2.2",
"redux": "^4.0.5",
@@ -57,11 +59,10 @@
"redux-saga": "^1.1.3",
"reselect": "^4.0.0",
"sentry-expo": "^3.0.4",
"subscriptions-transport-ws": "^0.9.18",
"expo-images-picker": "https://github.com/snaptsoft/expo-images-picker/"
"subscriptions-transport-ws": "^0.9.18"
},
"devDependencies": {
"@babel/core": "^7.12.13",
"@babel/core": "~7.9.0",
"babel-preset-expo": "8.3.0",
"eslint": "^7.19.0",
"eslint-plugin-react": "^7.22.0",