rebranding to forum, adding settings and stripe page
This commit is contained in:
42
ui/desktop/apps/Settings/Settings.js
Normal file
42
ui/desktop/apps/Settings/Settings.js
Normal file
@@ -0,0 +1,42 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user