wip: black

This commit is contained in:
Frank
2026-01-06 23:34:10 -05:00
parent 22b058a33d
commit 23fc675ad5
25 changed files with 2705 additions and 50 deletions

View File

@@ -0,0 +1,2 @@
.root {
}

View File

@@ -0,0 +1,12 @@
import styles from "./black-section.module.css"
export function BlackSection() {
return (
<section class={styles.root}>
<div data-slot="section-title">
<h2>Black</h2>
<p>You are subscribed to Black.</p>
</div>
</section>
)
}

View File

@@ -2,19 +2,23 @@ import { MonthlyLimitSection } from "./monthly-limit-section"
import { BillingSection } from "./billing-section"
import { ReloadSection } from "./reload-section"
import { PaymentSection } from "./payment-section"
import { BlackSection } from "./black-section"
import { Show } from "solid-js"
import { createAsync, useParams } from "@solidjs/router"
import { queryBillingInfo, querySessionInfo } from "../../common"
export default function () {
const params = useParams()
const userInfo = createAsync(() => querySessionInfo(params.id!))
const sessionInfo = createAsync(() => querySessionInfo(params.id!))
const billingInfo = createAsync(() => queryBillingInfo(params.id!))
return (
<div data-page="workspace-[id]">
<div data-slot="sections">
<Show when={userInfo()?.isAdmin}>
<Show when={sessionInfo()?.isAdmin}>
<Show when={sessionInfo()?.isBeta && billingInfo()?.subscriptionID}>
<BlackSection />
</Show>
<BillingSection />
<Show when={billingInfo()?.customerID}>
<ReloadSection />

View File

@@ -169,7 +169,9 @@ export function UsageSection() {
</Show>
</div>
</td>
<td data-slot="usage-cost">${((usage.cost ?? 0) / 100000000).toFixed(4)}</td>
<td data-slot="usage-cost">
${usage.enrichment?.plan === "sub" ? "0.0000" : ((usage.cost ?? 0) / 100000000).toFixed(4)}
</td>
</tr>
)
}}