Minor app improvements.

This commit is contained in:
Patrick Fic
2025-03-06 15:00:44 -08:00
parent 981012f20e
commit 45ed6f7804
10 changed files with 138 additions and 94 deletions

View File

@@ -20,7 +20,7 @@ export function JobSpaceAvailable({ bodyshop, style, jobid }) {
const { t } = useTranslation();
const { data } = useQuery(GET_DOC_SIZE_TOTALS, {
variables: { jobId: jobid },
skip: !jobid,
skip: !jobid || jobid === "temp",
});
if (!jobid || !data) return <></>;

View File

@@ -1,7 +1,7 @@
import React from "react";
import { useTranslation } from "react-i18next";
import { StyleSheet, Text, View } from "react-native";
import { Checkbox } from "react-native-paper";
import { Checkbox, Switch } from "react-native-paper";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { toggleDeleteAfterUpload } from "../../redux/app/app.actions";
@@ -19,20 +19,21 @@ export function UploadDeleteSwitch({
deleteAfterUpload,
toggleDeleteAfterUpload,
}) {
console.log("*** ~ deleteAfterUpload:", deleteAfterUpload);
const { t } = useTranslation();
return (
<View style={styles.container}>
<Text style={styles.text}>
{t("mediabrowser.labels.deleteafterupload")}
</Text>
<Checkbox
<Switch
// trackColor={{ false: '#767577', true: '#81b0ff' }}
// thumbColor={deleteAfterUpload ? 'tomato' : '#f4f3f4'}
// ios_backgroundColor='#3e3e3e'
onPress={() => {
//ios_backgroundColor="#3e3e3e"
onValueChange={() => {
toggleDeleteAfterUpload();
}}
status={deleteAfterUpload ? "checked" : "unchecked"}
value={deleteAfterUpload}
/>
</View>
);