mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-04-22 08:44:41 +01:00
refactor: Feature/offline mode rework (#859)
Co-authored-by: lostb1t <coding-mosses0z@icloud.com> Co-authored-by: Fredrik Burmester <fredrik.burmester@gmail.com> Co-authored-by: Gauvain <68083474+Gauvino@users.noreply.github.com> Co-authored-by: Gauvino <uruknarb20@gmail.com> Co-authored-by: storm1er <le.storm1er@gmail.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Chris <182387676+whoopsi-daisy@users.noreply.github.com> Co-authored-by: arch-fan <55891793+arch-fan@users.noreply.github.com> Co-authored-by: Alex Kim <alexkim@Alexs-MacBook-Pro.local>
This commit is contained in:
@@ -17,9 +17,9 @@ export const StorageSettings = () => {
|
||||
const errorHapticFeedback = useHaptic("error");
|
||||
|
||||
const { data: size } = useQuery({
|
||||
queryKey: ["appSize", appSizeUsage],
|
||||
queryKey: ["appSize"],
|
||||
queryFn: async () => {
|
||||
const app = await appSizeUsage;
|
||||
const app = await appSizeUsage();
|
||||
|
||||
const remaining = await FileSystem.getFreeDiskStorageAsync();
|
||||
const total = await FileSystem.getTotalDiskCapacityAsync();
|
||||
@@ -58,7 +58,7 @@ export const StorageSettings = () => {
|
||||
</View>
|
||||
<View className='h-3 w-full bg-gray-100/10 rounded-md overflow-hidden flex flex-row'>
|
||||
{size && (
|
||||
<>
|
||||
<View className='flex flex-row'>
|
||||
<View
|
||||
style={{
|
||||
width: `${(size.app / size.total) * 100}%`,
|
||||
@@ -67,19 +67,16 @@ export const StorageSettings = () => {
|
||||
/>
|
||||
<View
|
||||
style={{
|
||||
width: `${
|
||||
((size.total - size.remaining - size.app) / size.total) *
|
||||
100
|
||||
}%`,
|
||||
width: `${((size.total - size.remaining - size.app) / size.total) * 100}%`,
|
||||
backgroundColor: Colors.primaryLightRGB,
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
</View>
|
||||
)}
|
||||
</View>
|
||||
<View className='flex flex-row gap-x-2'>
|
||||
{size && (
|
||||
<>
|
||||
<View className='flex flex-row gap-x-2'>
|
||||
<View className='flex flex-row items-center'>
|
||||
<View className='w-3 h-3 rounded-full bg-purple-600 mr-1' />
|
||||
<Text className='text-white text-xs'>
|
||||
@@ -99,7 +96,7 @@ export const StorageSettings = () => {
|
||||
})}
|
||||
</Text>
|
||||
</View>
|
||||
</>
|
||||
</View>
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user