Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.1.0 #815

Open
wants to merge 18 commits into
base: release/v.1.1.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
[
"expo-font",
{
"fonts": ["./public/Rubik-Regular.ttf", "./public/Rubik-Medium.ttf"]
"fonts": ["node_modules/@expo-google-fonts/rubik/Rubik_400Regular.ttf", "node_modules/@expo-google-fonts/rubik/Rubik_500Medium.ttf"]
}
],
[
Expand Down
6 changes: 6 additions & 0 deletions messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,9 @@
"description": "Button to share an observation",
"message": "Share"
},
"screens.Observation.TrackList.track": {
"message": "Track"
},
"screens.Observation.cancel": {
"description": "Button to cancel delete of observation",
"message": "Cancel"
Expand Down Expand Up @@ -1451,6 +1454,9 @@
"screens.Sync.ProjectSyncDisplay.waitingForDevices": {
"message": "Waiting for devices"
},
"screens.Track.ObservationList.observation": {
"message": "Observation"
},
"screens.Track.ObservationList.observations": {
"message": "Observations"
},
Expand Down
74 changes: 34 additions & 40 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "comapeo-mobile",
"version": "1.1.0-pre",
"version": "1.1.0",
"private": true,
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -30,11 +30,12 @@
"@bam.tech/react-native-image-resizer": "^3.0.7",
"@comapeo/ipc": "2.0.2",
"@dev-plugins/react-navigation": "^0.0.6",
"@expo-google-fonts/rubik": "^0.2.3",
"@formatjs/intl-getcanonicallocales": "^2.3.0",
"@formatjs/intl-locale": "^3.3.2",
"@formatjs/intl-pluralrules": "^5.2.4",
"@formatjs/intl-relativetimeformat": "^11.2.4",
"@gorhom/bottom-sheet": "^4.5.1",
"@gorhom/bottom-sheet": "^5.0.5",
"@osm_borders/maritime_10000m": "^1.1.0",
"@react-native-community/hooks": "^2.8.0",
"@react-native-community/netinfo": "11.1.0",
Expand Down Expand Up @@ -87,12 +88,12 @@
"react-native-android-open-settings": "^1.3.0",
"react-native-confirmation-code-field": "^7.3.1",
"react-native-device-info": "^10.14.0",
"react-native-gesture-handler": "~2.14.0",
"react-native-gesture-handler": "^2.20.2",
"react-native-indicators": "^0.17.0",
"react-native-linear-gradient": "^2.8.3",
"react-native-mmkv": "^2.12.1",
"react-native-progress": "^5.0.1",
"react-native-reanimated": "~3.6.2",
"react-native-reanimated": "^3.16.1",
"react-native-restart": "^0.0.27",
"react-native-safe-area-context": "4.8.2",
"react-native-scale-bar": "^1.0.6",
Expand Down
5 changes: 3 additions & 2 deletions src/frontend/Navigation/Drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import {defineMessages, useIntl} from 'react-intl';
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
import EntypoIcon from 'react-native-vector-icons/Entypo';
import {NavigatorScreenParams} from '@react-navigation/native';
import {View} from 'react-native';
import {Text} from '../sharedComponents/Text';
import {View, Text} from 'react-native';
import {VERY_LIGHT_GREY, WHITE} from '../lib/styles';
import {useProjectSettings} from '../hooks/server/projects';
import {AppStackParamsList} from '../sharedTypes/navigation';
Expand Down Expand Up @@ -121,13 +120,15 @@ const DrawerContent = ({navigation}: DrawerContentComponentProps) => {
style={{alignSelf: 'flex-end', marginRight: 20}}
onPress={navigation.closeDrawer}
/>
{/* This text component is one of the exceptions that does not use the shared text components as requested by Sabella */}
<Text
testID="MAIN.drawer-create-join-txt"
style={{
alignSelf: 'center',
textAlign: 'center',
paddingHorizontal: 40,
fontSize: 18,
fontFamily: 'Rubik_400Regular',
}}>
{data?.name
? formatMessage(m.projName, {projectName: data.name})
Expand Down
1 change: 1 addition & 0 deletions src/frontend/Navigation/Stack/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export const NavigatorScreenOptions: NativeStackNavigationOptions = {
presentation: 'card',
contentStyle: {backgroundColor: WHITE},
headerStyle: {backgroundColor: WHITE},
headerTitleStyle: {fontFamily: 'Rubik_500Medium'},
headerLeft: props => <CustomHeaderLeft headerBackButtonProps={props} />,
// This only hides the DEFAULT back button. We render a custom one in headerLeft, so the default one should always be hidden.
// This **might** cause a problem for IOS
Expand Down
18 changes: 0 additions & 18 deletions src/frontend/hooks/server/invites.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,24 +58,6 @@ export function useRejectInvite() {
});
}

export function useClearAllPendingInvites() {
const queryClient = useQueryClient();
const mapeoApi = useApi();

return useMutation({
mutationFn: ({inviteIds}: {inviteIds: Array<string>}) => {
return Promise.all(
inviteIds.map(id => mapeoApi.invite.reject({inviteId: id})),
);
},
onSuccess: () => {
queryClient.invalidateQueries({
queryKey: [INVITE_KEY],
});
},
});
}

export function useSendInvite() {
const queryClient = useQueryClient();
const {projectApi} = useActiveProject();
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/hooks/server/maps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function useImportCustomMapFile() {

return useMutation({
mutationFn: async (opts: {uri: string}) => {
await FileSystem.moveAsync({
await FileSystem.copyAsync({
from: opts.uri,
to: DEFAULT_CUSTOM_MAP_FILE_PATH,
});
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/hooks/useFormattedTimeSince.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {Duration} from 'luxon';

export const useFormattedTimeSince = (start: Date | null, interval: number) => {
const [currentTime, setCurrentTime] = useState(new Date());
let startDate = start ? start : new Date();
let startDate = start ? new Date(start) : new Date();

useEffect(() => {
setCurrentTime(new Date());
Expand Down
3 changes: 3 additions & 0 deletions src/frontend/images/checkbox/CheckboxError.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/frontend/images/checkbox/CheckboxSelected.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/frontend/images/checkbox/CheckboxUnselected.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 14 additions & 15 deletions src/frontend/lib/file-system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ export function convertFileUriToPosixPath(fileUri: string) {
}

// TODO: Some overlap with selectFile() from lib/utils but fixes some usage limitations. Ideally use this for everything
export async function selectFile(opts: {
copyToCache?: boolean;
export async function selectFile({
mimeFilters,
extensionFilters,
}: {
mimeFilters?: Array<string>;
extensionFilters?: Array<string>;
}) {
} = {}) {
const documentResult = await DocumentPicker.getDocumentAsync({
type: opts.mimeFilters,
copyToCacheDirectory: opts.copyToCache,
type: mimeFilters,
copyToCacheDirectory: false,
multiple: false,
});

Expand All @@ -28,17 +30,14 @@ export async function selectFile(opts: {
throw new Error();
}

const hasValidExtension = opts.extensionFilters
? opts.extensionFilters.some(extension =>
asset.uri.endsWith(`.${extension}`),
)
: true;

if (!hasValidExtension) {
FileSystem.deleteAsync(asset.uri).catch(err => {
console.log(err);
if (extensionFilters) {
const hasValidExtension = extensionFilters.some(extension => {
return asset.name.endsWith(`.${extension}`);
});
throw new Error('Invalid extension');

if (!hasValidExtension) {
throw new Error('Invalid extension');
}
}

return asset;
Expand Down
1 change: 1 addition & 0 deletions src/frontend/lib/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ export const DARK_ORANGE = '#E86826';
export const SYNC_BACKGROUND = '#2348B2';
export const GPS_MODAL_TEXT = 'rgb(40,40,40)';
export const DARK_GREEN = '#59A553';
export const WARNING_RED = '#D92222';
Loading
Loading