clean up raw svg. give up on dark theme switcher. ready for another release.
@ -1,12 +1,19 @@
|
|||||||
import 'react-native-reanimated';
|
import "react-native-reanimated";
|
||||||
import 'react-native-gesture-handler';
|
import "react-native-gesture-handler";
|
||||||
import { DarkTheme, DefaultTheme, ThemeProvider } from '@react-navigation/native';
|
import {
|
||||||
import { useFonts } from 'expo-font';
|
DarkTheme,
|
||||||
import { Stack } from 'expo-router';
|
DefaultTheme,
|
||||||
import * as SplashScreen from 'expo-splash-screen';
|
ThemeProvider,
|
||||||
import { useEffect } from 'react';
|
} from "@react-navigation/native";
|
||||||
|
import { useFonts } from "expo-font";
|
||||||
|
import { Stack } from "expo-router";
|
||||||
|
import * as SplashScreen from "expo-splash-screen";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
import { useColorScheme } from '@/hooks/useColorScheme';
|
import { useColorScheme } from "@/hooks/useColorScheme";
|
||||||
|
import { Appearance, StyleSheet, Text, Pressable } from "react-native";
|
||||||
|
|
||||||
|
const isBrowser = typeof window !== "undefined";
|
||||||
|
|
||||||
// Prevent the splash screen from auto-hiding before asset loading is complete.
|
// Prevent the splash screen from auto-hiding before asset loading is complete.
|
||||||
SplashScreen.preventAutoHideAsync();
|
SplashScreen.preventAutoHideAsync();
|
||||||
@ -14,9 +21,18 @@ SplashScreen.preventAutoHideAsync();
|
|||||||
export default function RootLayout() {
|
export default function RootLayout() {
|
||||||
const colorScheme = useColorScheme();
|
const colorScheme = useColorScheme();
|
||||||
const [loaded] = useFonts({
|
const [loaded] = useFonts({
|
||||||
SpaceMono: require('../assets/fonts/SpaceMono-Regular.ttf'),
|
SpaceMono: require("../assets/fonts/SpaceMono-Regular.ttf"),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function changeTheme() {
|
||||||
|
console.debug("Changing color scheme");
|
||||||
|
if (Appearance.getColorScheme() === "dark") {
|
||||||
|
Appearance.setColorScheme("light");
|
||||||
|
} else {
|
||||||
|
Appearance.setColorScheme("dark");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (loaded) {
|
if (loaded) {
|
||||||
SplashScreen.hideAsync();
|
SplashScreen.hideAsync();
|
||||||
@ -27,18 +43,12 @@ export default function RootLayout() {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// return (
|
|
||||||
// <View>
|
|
||||||
// <Text>Hello World!</Text>
|
|
||||||
// </View>
|
|
||||||
// )
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ThemeProvider value={colorScheme === 'dark' ? DarkTheme : DefaultTheme}>
|
<ThemeProvider value={colorScheme === "dark" ? DarkTheme : DefaultTheme}>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
|
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
|
||||||
<Stack.Screen name="+not-found" />
|
<Stack.Screen name="+not-found" />
|
||||||
</Stack>
|
</Stack>
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
@ -6,9 +6,7 @@
|
|||||||
height="200mm"
|
height="200mm"
|
||||||
viewBox="0 0 200 200"
|
viewBox="0 0 200 200"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="svg5"
|
id="svg5">
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg">
|
|
||||||
<defs
|
<defs
|
||||||
id="defs2" />
|
id="defs2" />
|
||||||
<g
|
<g
|
||||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.5 KiB |
@ -6,9 +6,7 @@
|
|||||||
height="200mm"
|
height="200mm"
|
||||||
viewBox="0 0 200 200"
|
viewBox="0 0 200 200"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="svg5"
|
id="svg5">
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg">
|
|
||||||
<defs
|
<defs
|
||||||
id="defs2" />
|
id="defs2" />
|
||||||
<g
|
<g
|
||||||
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.0 KiB |
@ -6,9 +6,7 @@
|
|||||||
height="200mm"
|
height="200mm"
|
||||||
viewBox="0 0 200 200"
|
viewBox="0 0 200 200"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="svg5"
|
id="svg5">
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg">
|
|
||||||
<defs
|
<defs
|
||||||
id="defs2" />
|
id="defs2" />
|
||||||
<g
|
<g
|
||||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
@ -6,36 +6,7 @@
|
|||||||
height="200mm"
|
height="200mm"
|
||||||
viewBox="0 0 200 200"
|
viewBox="0 0 200 200"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="svg5"
|
id="svg5">
|
||||||
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
|
|
||||||
sodipodi:docname="carpet-roll-length-raw.svg"
|
|
||||||
inkscape:export-filename="../assets/images/icons/carpet-roll-64.png"
|
|
||||||
inkscape:export-xdpi="11.417511"
|
|
||||||
inkscape:export-ydpi="11.417511"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg">
|
|
||||||
<sodipodi:namedview
|
|
||||||
id="namedview7"
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
bordercolor="#eeeeee"
|
|
||||||
borderopacity="1"
|
|
||||||
inkscape:showpageshadow="0"
|
|
||||||
inkscape:pageopacity="0"
|
|
||||||
inkscape:pagecheckerboard="0"
|
|
||||||
inkscape:deskcolor="#505050"
|
|
||||||
inkscape:document-units="mm"
|
|
||||||
showgrid="false"
|
|
||||||
inkscape:zoom="0.56504558"
|
|
||||||
inkscape:cx="16.812803"
|
|
||||||
inkscape:cy="315.90372"
|
|
||||||
inkscape:window-width="1920"
|
|
||||||
inkscape:window-height="1008"
|
|
||||||
inkscape:window-x="0"
|
|
||||||
inkscape:window-y="681"
|
|
||||||
inkscape:window-maximized="1"
|
|
||||||
inkscape:current-layer="layer1" />
|
|
||||||
<defs
|
<defs
|
||||||
id="defs2" />
|
id="defs2" />
|
||||||
<g
|
<g
|
||||||
@ -50,13 +21,11 @@
|
|||||||
<path
|
<path
|
||||||
id="path2242"
|
id="path2242"
|
||||||
style="fill:none;fill-opacity:1;stroke:#4d4d4d;stroke-width:10.5833;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
style="fill:none;fill-opacity:1;stroke:#4d4d4d;stroke-width:10.5833;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
||||||
d="m 61.405087,24.188362 95.383293,-52.476396 c 24.96471,-6.689275 40.50388,-5.439089 53.53212,6.973747 13.06695,12.4497209 16.56131,25.0292929 9.58226,53.29021 l -79.61121,74.744307"
|
d="m 61.405087,24.188362 95.383293,-52.476396 c 24.96471,-6.689275 40.50388,-5.439089 53.53212,6.973747 13.06695,12.4497209 16.56131,25.0292929 9.58226,53.29021 l -79.61121,74.744307">
|
||||||
sodipodi:nodetypes="ccscc" />
|
|
||||||
<path
|
<path
|
||||||
style="fill:none;fill-opacity:1;stroke:#4d4d4d;stroke-width:10.58333333;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
style="fill:none;fill-opacity:1;stroke:#4d4d4d;stroke-width:10.58333333;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
||||||
d="m 61.405087,24.188362 c 33.653,-20.0428233 86.037773,3.774406 93.118353,36.785838 7.08285,33.022041 -22.22503,60.93414 -48.54578,62.44 C 78.791137,124.96959 39.251217,95.823248 53.111058,61.74891 66.84398,27.986602 114.30936,21.282096 133.47145,61.067637 141.69618,78.144337 124.82498,115.7347 93.694884,101.95457 67.187624,90.220797 80.85949,55.619126 103.5068,72.272096"
|
d="m 61.405087,24.188362 c 33.653,-20.0428233 86.037773,3.774406 93.118353,36.785838 7.08285,33.022041 -22.22503,60.93414 -48.54578,62.44 C 78.791137,124.96959 39.251217,95.823248 53.111058,61.74891 66.84398,27.986602 114.30936,21.282096 133.47145,61.067637 141.69618,78.144337 124.82498,115.7347 93.694884,101.95457 67.187624,90.220797 80.85949,55.619126 103.5068,72.272096"
|
||||||
id="path2296"
|
id="path2296" />
|
||||||
sodipodi:nodetypes="csssssc" />
|
|
||||||
</g>
|
</g>
|
||||||
<path
|
<path
|
||||||
style="fill:none;fill-opacity:1;stroke:#ff0000;stroke-width:10.5833;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
style="fill:none;fill-opacity:1;stroke:#ff0000;stroke-width:10.5833;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
||||||
@ -69,12 +38,10 @@
|
|||||||
<path
|
<path
|
||||||
style="fill:none;fill-opacity:1;stroke:#ff0000;stroke-width:10.5833;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
style="fill:none;fill-opacity:1;stroke:#ff0000;stroke-width:10.5833;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
||||||
d="M 54.956029,38.806777 165.74785,-17.977504"
|
d="M 54.956029,38.806777 165.74785,-17.977504"
|
||||||
id="path2365"
|
id="path2365" />
|
||||||
sodipodi:nodetypes="cc" />
|
|
||||||
<path
|
<path
|
||||||
style="fill:none;fill-opacity:1;stroke:#ff0000;stroke-width:10.5833;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
style="fill:none;fill-opacity:1;stroke:#ff0000;stroke-width:10.5833;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
||||||
d="M 66.655684,60.631804 166.72149,5.3459019"
|
d="M 66.655684,60.631804 166.72149,5.3459019"
|
||||||
id="path2419"
|
id="path2419" />
|
||||||
sodipodi:nodetypes="cc" />
|
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 2.4 KiB |
@ -6,9 +6,7 @@
|
|||||||
height="154.33244mm"
|
height="154.33244mm"
|
||||||
viewBox="0 0 138.30681 154.33244"
|
viewBox="0 0 138.30681 154.33244"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="svg5"
|
id="svg5">
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg">
|
|
||||||
<defs
|
<defs
|
||||||
id="defs2" />
|
id="defs2" />
|
||||||
<g
|
<g
|
||||||
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.5 KiB |
@ -9,7 +9,7 @@ import ProductList from "./ProductList";
|
|||||||
import convert, { Length } from "convert";
|
import convert, { Length } from "convert";
|
||||||
import PercentDamage from "./PercentDamange";
|
import PercentDamage from "./PercentDamange";
|
||||||
import MeasurementUnitInput from "./MeasurementUnitInput";
|
import MeasurementUnitInput from "./MeasurementUnitInput";
|
||||||
|
import UnitChooser from "./UnitChooser";
|
||||||
|
|
||||||
export default function ProductCalculatorSelector() {
|
export default function ProductCalculatorSelector() {
|
||||||
const [activeProduct, setActiveProduct] = useState(null as Product | null);
|
const [activeProduct, setActiveProduct] = useState(null as Product | null);
|
||||||
@ -79,19 +79,27 @@ export default function ProductCalculatorSelector() {
|
|||||||
<View style={styles.inputWrapper}>
|
<View style={styles.inputWrapper}>
|
||||||
{activeProduct ? (
|
{activeProduct ? (
|
||||||
"w" in activeProduct.dimensions ? (
|
"w" in activeProduct.dimensions ? (
|
||||||
<AreaInput
|
<View style={{flex: 1, flexDirection: "row"}}>
|
||||||
defaultValue={activeProduct.dimensions}
|
<AreaInput
|
||||||
onMeasurementSet={onMeasurementSet}
|
defaultValue={activeProduct.dimensions}
|
||||||
widthLabel="enter width"
|
onMeasurementSet={onMeasurementSet}
|
||||||
lengthLabel="enter length"
|
widthLabel="enter width"
|
||||||
units={measurement.u}
|
lengthLabel="enter length"
|
||||||
/>
|
units={measurement.u}
|
||||||
|
/>
|
||||||
|
<UnitChooser
|
||||||
|
choices={["in", "ft"]}
|
||||||
|
onUnitSet={onUnitChosen}
|
||||||
|
defaultUnit={activeProduct.dimensions.u}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
) : (
|
) : (
|
||||||
<MeasurementUnitInput
|
<MeasurementUnitInput
|
||||||
defaultValue={activeProduct.dimensions.l}
|
defaultValue={activeProduct.dimensions.l}
|
||||||
onValueSet={onLengthSet}
|
onValueSet={onLengthSet}
|
||||||
onUnitSet={onUnitChosen}
|
onUnitSet={onUnitChosen}
|
||||||
defaultUnit={activeProduct.dimensions.u}
|
defaultUnit={activeProduct.dimensions.u}
|
||||||
|
unitChoices={["ft", "in"]}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
) : (
|
) : (
|
||||||
|