Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Rocky43007 committed Feb 6, 2024
2 parents 201913a + 2899aa3 commit a7bc3b9
Show file tree
Hide file tree
Showing 36 changed files with 2,322 additions and 1,713 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions apps/mobile/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- Make sure to run `pnpm i` if you make any change to the `package` mobile uses like `assets`.
- If iOS build fails with `node not found` error, run `echo "export NODE_BINARY=$(command -v node)" >> .xcode.env.local` on `mobile/ios/` directory.
- If XCode can't find node, run `ln -s "$(which node)" /usr/local/bin/node`
- To view the logs from the Spacedrive Core API, run `xcrun simctl launch --console booted com.spacedrive.app` with the app built in debug mode.
- If Rive Assets have been updated, run `pnpm mobile prebuild` to import the latest version of the `.riv` files into the project.
3 changes: 2 additions & 1 deletion apps/mobile/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
"deploymentTarget": "14.0"
}
}
]
],
["./withRiveAssets.js"]
]
}
}
Binary file modified apps/mobile/assets/rive/tabs.riv
Binary file not shown.
10 changes: 5 additions & 5 deletions apps/mobile/modules/sd-core/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,21 @@ afterEvaluate {
}

android {
compileSdkVersion safeExtGet("compileSdkVersion", 33)
compileSdkVersion safeExtGet("compileSdkVersion", 34)

compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.majorVersion
jvmTarget = JavaVersion.VERSION_17.majorVersion
}

namespace "com.spacedrive.core"
defaultConfig {
minSdkVersion safeExtGet("minSdkVersion", 28)
targetSdkVersion safeExtGet("targetSdkVersion", 33)
targetSdkVersion safeExtGet("targetSdkVersion", 34)
versionCode 1
versionName "0.2.0"
}
Expand Down
39 changes: 20 additions & 19 deletions apps/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,44 +21,45 @@
"@hookform/resolvers": "^3.1.0",
"@oscartbeaumont-sd/rspc-client": "=0.0.0-main-dc31e5b2",
"@oscartbeaumont-sd/rspc-react": "=0.0.0-main-dc31e5b2",
"@react-native-async-storage/async-storage": "~1.18.2",
"@react-native-masked-view/masked-view": "^0.2.9",
"@react-native-async-storage/async-storage": "~1.21.0",
"@react-native-masked-view/masked-view": "^0.3.0",
"@react-navigation/bottom-tabs": "^6.5.8",
"@react-navigation/drawer": "^6.6.3",
"@react-navigation/native": "^6.1.7",
"@react-navigation/stack": "^6.3.17",
"@sd/assets": "workspace:*",
"@sd/client": "workspace:*",
"@shopify/flash-list": "1.4.3",
"@shopify/flash-list": "1.6.3",
"@tanstack/react-query": "^4.36.1",
"babel-preset-solid": "^1.8.9",
"class-variance-authority": "^0.7.0",
"dayjs": "^1.11.10",
"event-target-polyfill": "^0.0.3",
"expo": "~49.0.8",
"expo-blur": "^12.4.1",
"expo-build-properties": "~0.8.3",
"expo-linking": "~5.0.2",
"expo-media-library": "~15.4.1",
"expo-splash-screen": "~0.20.5",
"expo-status-bar": "~1.6.0",
"expo": "~50.0.5",
"expo-blur": "^12.9.1",
"expo-build-properties": "~0.11.1",
"expo-linking": "~6.2.2",
"expo-media-library": "~15.9.1",
"expo-splash-screen": "~0.26.4",
"expo-status-bar": "~1.11.1",
"intl": "^1.2.5",
"lottie-react-native": "5.1.6",
"lottie-react-native": "6.5.1",
"metro-react-native-babel-transformer": "^0.77.0",
"moti": "^0.26.0",
"phosphor-react-native": "^2.0.0",
"react": "^18.2.0",
"react-hook-form": "^7.47.0",
"react-native": "0.72.6",
"react-native": "0.73.2",
"react-native-circular-progress": "^1.3.9",
"react-native-document-picker": "^9.0.1",
"react-native-fs": "^2.20.0",
"react-native-gesture-handler": "~2.12.1",
"react-native-gesture-handler": "~2.14.1",
"react-native-linear-gradient": "^2.8.3",
"react-native-popup-menu": "^0.16.1",
"react-native-reanimated": "~3.3.0",
"react-native-safe-area-context": "4.6.3",
"react-native-screens": "~3.22.1",
"react-native-svg": "13.9.0",
"react-native-reanimated": "~3.6.2",
"react-native-safe-area-context": "4.8.2",
"react-native-screens": "~3.29.0",
"react-native-svg": "14.1.0",
"react-native-wheel-color-picker": "^1.2.0",
"rive-react-native": "^6.2.3",
"solid-js": "^1.8.8",
Expand All @@ -72,10 +73,10 @@
"@babel/core": "^7.23.2",
"@rnx-kit/metro-config": "^1.3.12",
"@sd/config": "workspace:*",
"@types/react": "^18.2.34",
"@types/react": "^18.2.52",
"babel-plugin-module-resolver": "^5.0.0",
"eslint-plugin-react-native": "^4.1.0",
"react-native-svg-transformer": "^1.1.0",
"typescript": "^5.2.2"
"typescript": "^5.3.3"
}
}
24 changes: 20 additions & 4 deletions apps/mobile/src/components/browse/BrowseLocations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { BrowseStackScreenProps } from '~/navigation/tabs/BrowseStack';
import { SettingsStackScreenProps } from '~/navigation/tabs/SettingsStack';

import FolderIcon from '../icons/FolderIcon';
import { Icon } from '../icons/Icon';
import Fade from '../layout/Fade';
import ImportModal from '../modal/ImportModal';
import { LocationModal } from '../modal/location/LocationModal';
Expand All @@ -39,7 +40,7 @@ const BrowseLocationItem: React.FC<BrowseLocationItemProps> = ({
return (
<Pressable onPress={onPress}>
<View
style={tw`h-auto w-[100px] flex-col justify-center gap-3 rounded-md border border-sidebar-line/50 bg-sidebar-box p-2`}
style={tw`h-auto w-[110px] flex-col justify-center gap-3 rounded-md border border-sidebar-line/50 bg-sidebar-box p-2`}
>
<View style={tw`w-full flex-col justify-between gap-1`}>
<View style={tw`flex-row items-center justify-between`}>
Expand All @@ -61,7 +62,7 @@ const BrowseLocationItem: React.FC<BrowseLocationItemProps> = ({
</Pressable>
</View>
<Text
style={tw`w-full max-w-[75px] text-xs font-bold text-white`}
style={tw`w-full max-w-[100px] text-xs font-bold text-white`}
numberOfLines={1}
>
{location.name}
Expand Down Expand Up @@ -98,14 +99,19 @@ const BrowseLocations = () => {
return (
<View style={tw`gap-5`}>
<View style={tw`w-full flex-row items-center justify-between px-7`}>
<Text style={tw`text-xl font-bold text-white`}>Locations</Text>
<Text style={tw`text-lg font-bold text-white`}>Locations</Text>
<View style={tw`flex-row gap-3`}>
<Pressable
disabled={result.data?.nodes.length === 0}
onPress={() => {
navigation.navigate('Locations');
}}
>
<View style={tw`h-8 w-8 items-center justify-center rounded-md bg-accent`}>
<View
style={tw`h-8 w-8 items-center justify-center rounded-md bg-accent ${
result.data?.nodes.length === 0 ? 'opacity-40' : 'opacity-100'
}`}
>
<Eye weight="bold" size={18} style={tw`text-white`} />
</View>
</Pressable>
Expand All @@ -121,6 +127,16 @@ const BrowseLocations = () => {
<Fade color="mobile-screen" width={30} height="100%">
<FlatList
data={locations}
ListEmptyComponent={() => (
<View
style={tw`relative h-auto w-[85.5vw] flex-col items-center justify-center overflow-hidden rounded-md border border-dashed border-sidebar-line p-4`}
>
<Icon name="Folder" size={38} />
<Text style={tw`mt-2 text-center font-medium text-ink-dull`}>
You have no locations
</Text>
</View>
)}
contentContainerStyle={tw`px-7`}
showsHorizontalScrollIndicator={false}
ItemSeparatorComponent={() => <View style={tw`w-2`} />}
Expand Down
23 changes: 20 additions & 3 deletions apps/mobile/src/components/browse/BrowseTags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { ModalRef } from '~/components/layout/Modal';
import { tw, twStyle } from '~/lib/tailwind';
import { BrowseStackScreenProps } from '~/navigation/tabs/BrowseStack';

import { Icon } from '../icons/Icon';
import Fade from '../layout/Fade';
import CreateTagModal from '../modal/tag/CreateTagModal';
import { TagModal } from '../modal/tag/TagModal';
Expand Down Expand Up @@ -63,10 +64,14 @@ const BrowseTags = () => {
return (
<View style={tw`gap-5`}>
<View style={tw`w-full flex-row items-center justify-between px-7`}>
<Text style={tw`text-xl font-bold text-white`}>Tags</Text>
<Text style={tw`text-lg font-bold text-white`}>Tags</Text>
<View style={tw`flex-row gap-3`}>
<Pressable>
<View style={tw`h-8 w-8 items-center justify-center rounded-md bg-accent`}>
<View
style={tw`h-8 w-8 items-center justify-center rounded-md bg-accent ${
tags.data?.nodes.length === 0 ? 'opacity-40' : 'opacity-100'
}`}
>
<Eye weight="bold" size={18} style={tw`text-white`} />
</View>
</Pressable>
Expand All @@ -82,10 +87,22 @@ const BrowseTags = () => {
<Fade color="mobile-screen" width={30} height="100%">
<FlatList
data={tagData}
ListEmptyComponent={() => (
<View
style={tw`relative h-auto w-[85.5vw] flex-col items-center justify-center overflow-hidden rounded-md border border-dashed border-sidebar-line p-4`}
>
<Icon name="Tags" size={38} />
<Text style={tw`mt-2 text-center font-medium text-ink-dull`}>
You have no tags
</Text>
</View>
)}
renderItem={({ item }) => (
<BrowseTagItem
tag={item}
onPress={() => navigation.navigate('Tag', { id: item.id })}
onPress={() =>
navigation.navigate('Tag', { id: item.id, color: item.color! })
}
/>
)}
keyExtractor={(item) => item.id.toString()}
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/src/components/browse/Categories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const CATEGORIES_LIST = [
const Categories = () => {
return (
<View style={tw`relative gap-5`}>
<Text style={tw`px-7 text-xl font-bold text-white`}>Library</Text>
<Text style={tw`text-lg font-bold text-white px-7`}>Library</Text>
<Fade width={30} height="100%" color="mobile-screen">
<ScrollView showsHorizontalScrollIndicator={false} horizontal>
<View style={tw`flex-row gap-2 px-7`}>
Expand Down
6 changes: 3 additions & 3 deletions apps/mobile/src/components/browse/Jobs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Jobs = () => {
return (
<View style={tw`gap-5`}>
<View style={tw`w-full flex-row items-center justify-between px-7`}>
<Text style={tw`text-xl font-bold text-white`}>Jobs</Text>
<Text style={tw`text-lg font-bold text-white`}>Jobs</Text>
</View>
<Fade color="mobile-screen" height="100%" width={30}>
<ScrollView horizontal showsHorizontalScrollIndicator={false}>
Expand Down Expand Up @@ -45,7 +45,7 @@ const Job = ({ progress, message, error }: JobProps) => {
: tw.color('accent');
return (
<View
style={tw`h-auto w-[310px] flex-col rounded-md border border-sidebar-line/50 bg-sidebar-box`}
style={tw`h-[170px] w-[310px] flex-col rounded-md border border-sidebar-line/50 bg-sidebar-box`}
>
<View
style={tw`w-full flex-row items-center justify-between rounded-t-md border-b border-sidebar-line/80 bg-mobile-header/50 px-5 py-2`}
Expand All @@ -56,7 +56,7 @@ const Job = ({ progress, message, error }: JobProps) => {
</View>
<DotsThreeOutlineVertical weight="fill" size={20} color={tw.color('ink-faint')} />
</View>
<View style={tw`mx-auto flex-1 flex-row items-center justify-between gap-5 px-5 py-2`}>
<View style={tw`mx-auto flex-1 flex-row items-center justify-between gap-5 px-5 py-3`}>
<AnimatedCircularProgress
size={80}
width={7}
Expand Down
Loading

0 comments on commit a7bc3b9

Please sign in to comment.