Files
frm.so/ui/desktop/apps/Settings/Settings.js
2026-02-27 02:05:39 -06:00

42 lines
1.2 KiB
JavaScript

import env from "/_/code/env.js"
class Settings extends Shadow {
handleConnectStripe = () => {
const params = new URLSearchParams({
response_type: 'code',
client_id: env.client_id,
scope: 'read_write',
redirect_uri: `${env.baseURL}/stripe/onboardingcomplete`,
});
window.location.href = `https://connect.stripe.com/oauth/authorize?${params}`;
};
render() {
ZStack(() => {
h1("Settings")
.fontWeight("bold")
.marginTop(4, pct)
.marginLeft(5, pct)
VStack(() => {
// HStack(() => {
// p("Stripe Integration")
// button("Set up Stripe")
// .maxWidth(10, em)
// .onClick((done) => {
// this.handleConnectStripe()
// })
// })
// .gap(10, pct)
// .verticalAlign("center")
})
.gap(0.5, em)
.paddingLeft(5, pct)
.marginTop(4, em)
})
}
}
register(Settings)