Stripe integration flow

This commit is contained in:
metacryst
2026-03-05 00:29:34 -06:00
parent bdd260c2b5
commit 661bf86a1a
17 changed files with 303 additions and 117 deletions

View File

@@ -6,9 +6,29 @@ class AppMenu extends Shadow {
"Settings": {src: "settings-src", size: "1.7em"}
}
unselectedIconStyle(el) {
return el
.paddingBottom(5, px)
.borderBottom("")
}
selectedIconStyle(el) {
return el
.paddingBottom(4, px)
.borderBottom("1px solid var(--accent)")
}
onAppChange() {
let icons = this.$$("img")
icons.forEach((icon) => {
icon.styles(this.unselectedIconStyle)
})
let selected = this.$(`img[app="${global.currentApp}"]`)
selected.styles(this.selectedIconStyle)
}
render() {
VStack(() => {
function cssVariable(value) {
return getComputedStyle(document.documentElement)
.getPropertyValue("--" + value)
@@ -25,8 +45,7 @@ class AppMenu extends Shadow {
img(cssVariable(this.images[app].src), this.images[app].size)
.attr({app: app})
.padding(0.3, em)
.paddingBottom(currentApp === app ? 4 : 5, px)
.borderBottom(currentApp === app ? "1px solid var(--accent)" : "")
.styles(currentApp === app ? this.selectedIconStyle : this.unselectedIconStyle)
.onClick(function (done) {
if(!done) {
this.style.transform = "translateY(10%)"
@@ -54,7 +73,7 @@ class AppMenu extends Shadow {
})
.onEvent("appchange", () => {
// console.log("app hello?") // BUG: Quill is not acknowledging this event unless there is something else in the function body
this.rerender()
this.onAppChange()
})
.onEvent("networkchange", () => {
// console.log(global.currentApp)