diff --git a/apps/amethyst/app/(tabs)/(stamp)/_layout.tsx b/apps/amethyst/app/(tabs)/(stamp)/_layout.tsx index d57c110..7c4c5bd 100644 --- a/apps/amethyst/app/(tabs)/(stamp)/_layout.tsx +++ b/apps/amethyst/app/(tabs)/(stamp)/_layout.tsx @@ -21,7 +21,18 @@ const Layout = ({ segment }: { segment: string }) => { } }, [segment]); - return {rootScreen}; + return ( + + {rootScreen} + + ); }; export default Layout; diff --git a/apps/amethyst/app/(tabs)/(stamp)/stamp/_layout.tsx b/apps/amethyst/app/(tabs)/(stamp)/stamp/_layout.tsx index ef8dc88..35f650e 100644 --- a/apps/amethyst/app/(tabs)/(stamp)/stamp/_layout.tsx +++ b/apps/amethyst/app/(tabs)/(stamp)/stamp/_layout.tsx @@ -27,7 +27,13 @@ const Layout = ({ segment }: { segment: string }) => { }); return ( - + diff --git a/apps/amethyst/app/(tabs)/(stamp)/stamp/index.tsx b/apps/amethyst/app/(tabs)/(stamp)/stamp/index.tsx index 0ebd5af..688f5af 100644 --- a/apps/amethyst/app/(tabs)/(stamp)/stamp/index.tsx +++ b/apps/amethyst/app/(tabs)/(stamp)/stamp/index.tsx @@ -1,6 +1,6 @@ import { Button } from "@/components/ui/button"; import { Icon } from "@/lib/icons/iconWithClassName"; -import { Stack, useRouter } from "expo-router"; +import { Link, Stack, useRouter } from "expo-router"; import { Check, ChevronDown, ChevronRight } from "lucide-react-native"; import React, { useContext, useEffect, useRef, useState } from "react"; @@ -16,6 +16,7 @@ import { import { Text } from "@/components/ui/text"; import { MusicBrainzRecording, + MusicBrainzRelease, ReleaseSelections, searchMusicbrainz, SearchParams, @@ -24,6 +25,7 @@ import { import { BottomSheetModal, BottomSheetScrollView } from "@gorhom/bottom-sheet"; import SheetBackdrop, { SheetHandle } from "@/components/ui/sheetBackdrop"; import { StampContext, StampContextValue, StampStep } from "./_layout"; +import { ExternalLink } from "@/components/ExternalLink"; export default function StepOne() { const router = useRouter(); @@ -45,6 +47,8 @@ export default function StepOne() { {}, ); + const [hasSearched, setHasSearched] = useState(false); + // reset search state if requested useEffect(() => { if (state.step === StampStep.IDLE && state.resetSearchState) { @@ -65,6 +69,7 @@ export default function StepOne() { const results = await searchMusicbrainz(searchFields); setSearchResults(results); setIsLoading(false); + setHasSearched(true); }; const clearSearch = () => { @@ -74,7 +79,7 @@ export default function StepOne() { }; return ( - + {/* Search Form */} - + Search for a track + + setSearchFields((prev) => ({ ...prev, release: text })) + } + onKeyPress={(e) => { + if (e.nativeEvent.key === "Enter") { + handleSearch(); + } + }} + /> + + + + {profile + ? profile.bsky?.description?.split("\n").map((str, i) => ( + + {str} + + )) || "A very mysterious person" + : "Loading..."} + + + + + Your Stamps + diff --git a/apps/amethyst/app/(tabs)/settings/index.tsx b/apps/amethyst/app/(tabs)/settings/index.tsx new file mode 100644 index 0000000..3da031d --- /dev/null +++ b/apps/amethyst/app/(tabs)/settings/index.tsx @@ -0,0 +1,100 @@ +import React from "react"; +import { Text } from "@/components/ui/text"; +import { ScrollView, Switch, View } from "react-native"; +import { Link, Stack } from "expo-router"; +import { useColorScheme } from "@/lib/useColorScheme"; +import { cn } from "@/lib/utils"; +import { Button } from "@/components/ui/button"; + +export default function Settings() { + const { colorScheme, setColorScheme } = useColorScheme(); + const colorSchemeOptions = [ + { label: "Light", value: "light" }, + { label: "Dark", value: "dark" }, + { label: "System", value: "system" }, + ]; + + return ( + + + + + + + + + + ); +} + +function ToggleSwitch({ + text, + isEnabled, + setIsEnabled, +}: { + text: string; + isEnabled: boolean; + setIsEnabled: React.Dispatch>; +}) { + const toggleSwitch = () => + setIsEnabled((previousState: boolean) => !previousState); + + return ( + + {text} + + + ); +} + +/// A selector component for smaller selections (usu. <3 values) +function ButtonSelector({ + text, + values, + selectedValue, + setSelectedValue, +}: { + text: string; + values: { label: string; value: string }[]; + selectedValue: string; + setSelectedValue: (value: any) => void; +}) { + return ( + + {text} + + {values.map(({ label, value }) => ( + + ))} + + + ); +} diff --git a/apps/amethyst/app/_layout.tsx b/apps/amethyst/app/_layout.tsx index 5edb34a..717b447 100644 --- a/apps/amethyst/app/_layout.tsx +++ b/apps/amethyst/app/_layout.tsx @@ -84,7 +84,7 @@ export default function RootLayout() { return ( - + {} diff --git a/apps/amethyst/app/auth/logoutModal.tsx b/apps/amethyst/app/auth/logoutModal.tsx index b8a01cc..00778d3 100644 --- a/apps/amethyst/app/auth/logoutModal.tsx +++ b/apps/amethyst/app/auth/logoutModal.tsx @@ -18,13 +18,18 @@ export default function ModalScreen() { }; return ( handleGoBack()} > - - + + Surprise! You can sign out here! + but... are you sure? {/* Use a light status bar on iOS to account for the black space above the modal */} diff --git a/apps/amethyst/components/play/actorPlaysView.tsx b/apps/amethyst/components/play/actorPlaysView.tsx index 2de3483..72eae99 100644 --- a/apps/amethyst/components/play/actorPlaysView.tsx +++ b/apps/amethyst/components/play/actorPlaysView.tsx @@ -1,7 +1,8 @@ import { useStore } from "@/stores/mainStore"; import { Record as Play } from "@teal/lexicons/src/types/fm/teal/alpha/feed/play"; import { useEffect, useState } from "react"; -import { Text, ScrollView } from "react-native"; +import { ScrollView } from "react-native"; +import { Text } from "@/components/ui/text"; import PlayView from "./playView"; interface ActorPlaysViewProps { repo: string | undefined; @@ -39,7 +40,13 @@ const ActorPlaysView = ({ repo }: ActorPlaysViewProps) => { return ( {play.map((p) => ( - + ))} ); diff --git a/apps/amethyst/components/play/playView.tsx b/apps/amethyst/components/play/playView.tsx index b5f22ff..2e9bed1 100644 --- a/apps/amethyst/components/play/playView.tsx +++ b/apps/amethyst/components/play/playView.tsx @@ -1,32 +1,42 @@ -import { Record as Play } from "@teal/lexicons/src/types/fm/teal/alpha/feed/play"; -import { View, Image, Text } from "react-native"; +import { View, Image } from "react-native"; +import { Text } from "@/components/ui/text"; -const PlayView = ({ play }: { play: Play }) => { +export default function PlayView({ + releaseMbid, + trackTitle, + artistName, + releaseTitle, +}: { + releaseMbid?: string; + trackTitle: string; + artistName?: string; + releaseTitle?: string; +}) { return ( - - - {play.trackName} + + + {trackTitle} - {play.artistNames && ( - - {play.artistNames.join(", ")} + {artistName && ( + + {artistName} )} - {play.releaseName && ( - - {play.releaseName} + {releaseTitle && ( + + {releaseTitle} )} ); -}; - -export default PlayView; +} diff --git a/apps/amethyst/components/play/verticalPlayView.tsx b/apps/amethyst/components/play/verticalPlayView.tsx index 825f1a6..f63615c 100644 --- a/apps/amethyst/components/play/verticalPlayView.tsx +++ b/apps/amethyst/components/play/verticalPlayView.tsx @@ -1,32 +1,82 @@ import { View, Image } from "react-native"; - import { Text } from "@/components/ui/text"; +import { cn } from "@/lib/utils"; // Assuming you have a utils file with cn function like in shadcn + +type VerticalPlayViewProps = { + releaseMbid: string; + trackTitle: string; + artistName?: string; + releaseTitle?: string; + size?: "default" | "sm" | "md" | "lg"; // Add size variant +}; export default function VerticalPlayView({ releaseMbid, trackTitle, artistName, releaseTitle, -}: { - releaseMbid: string; - trackTitle: string; - artistName?: string; - releaseTitle?: string; -}) { + size = "default", // Default size is 'default' +}: VerticalPlayViewProps) { + // Define sizes for different variants + const imageSizes = { + default: "w-48 h-48", + sm: "w-32 h-32", + md: "w-48 h-48", + lg: "w-64 h-64", + }; + + const textSizes = { + default: "text-xl", + sm: "text-base", + md: "text-xl", + lg: "text-2xl", + }; + + const secondaryTextSizes = { + default: "text-lg", + sm: "text-sm", + md: "text-xl", + lg: "text-xl", + }; + + const marginBottoms = { + default: "mb-2", + sm: "mb-1", + md: "mb-2", + lg: "mb-4", + }; + return ( - {trackTitle} + {trackTitle}{" "} + {/* Apply main text size based on variant */} {artistName && ( - {artistName} + + {artistName} + )} {releaseTitle && ( - + {releaseTitle} )} diff --git a/apps/amethyst/components/ui/sheetBackdrop.tsx b/apps/amethyst/components/ui/sheetBackdrop.tsx index 5a842f4..e884576 100644 --- a/apps/amethyst/components/ui/sheetBackdrop.tsx +++ b/apps/amethyst/components/ui/sheetBackdrop.tsx @@ -50,7 +50,7 @@ export const SheetHandle = ({ style, }: BottomSheetBackdropProps) => { return ( - + ); diff --git a/apps/amethyst/lib/useColorScheme.tsx b/apps/amethyst/lib/useColorScheme.tsx index df75499..b5eb681 100644 --- a/apps/amethyst/lib/useColorScheme.tsx +++ b/apps/amethyst/lib/useColorScheme.tsx @@ -4,7 +4,7 @@ export function useColorScheme() { const { colorScheme, setColorScheme, toggleColorScheme } = useNativewindColorScheme(); return { - colorScheme: colorScheme ?? "dark", + colorScheme: colorScheme || "dark", isDarkColorScheme: colorScheme === "dark", setColorScheme, toggleColorScheme, -- 2.51.2 From dd2e0e94c8da234c0bd84922c3cc2554f417ad15 Mon Sep 17 00:00:00 2001 From: mmattbtw Date: Mon, 31 Mar 2025 16:30:31 -0500 Subject: [PATCH 2/3] add Sponsor button on GitHub --- .github/FUNDING.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..99e8952 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,2 @@ +open_collective: teal +github: [espeon, mmattbtw] -- 2.51.2 From 12b9432e687e6e63d7f577388de6b82cc8509905 Mon Sep 17 00:00:00 2001 From: matt morris Date: Mon, 31 Mar 2025 16:33:46 -0500 Subject: [PATCH 3/3] Update FUNDING.yml --- .github/FUNDING.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 99e8952..7a6bff2 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,2 +1,2 @@ open_collective: teal -github: [espeon, mmattbtw] +github: [espeon, mmattbtw, kjloveless]