Create Settings.tsx

This commit is contained in:
OTKUSteyler 2026-09-11 08:00:13 +02:00 • committed by GitHub
parent ad9963ade2
commit 3914eb8e11
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,33 @@
import { storage } from "@vendetta/plugin";
import { useProxy } from "@vendetta/storage";
import { getAssetIDByName } from "@vendetta/ui/assets";
import { Forms, General } from "@vendetta/ui/components";
import { settings, playFromUrl } from ".";
const { FormSection, FormRow, FormIcon, FormInput } = Forms;
export default function Settings() {
useProxy(storage);
return (
<General.ScrollView style={{ flex: 1 }}>
<FormSection title="Background Music">
<FormRow
label="Music URL"
leading={<FormIcon source={getAssetIDByName("ic_link")} />}
/>
<FormInput
title=""
keyboardType="url"
placeholder="https://link.to/music.mp3"
value={settings.url}
onChange={(x: string) => {
settings.url = x;
if (x) playFromUrl(x);
}}
style={{ marginTop: -25, marginHorizontal: 12 }}
/>
</FormSection>
</General.ScrollView>
);
}