feat: Show usage history in dashboard (#1998)

Following https://github.com/webrecorder/browsertrix/pull/1995, we want
to keep the usage history table on the dashboard for now for video
demos.

### Changes

- Adds usage history table back to org dashboard
- Makes "No usage history" message more apparent
This commit is contained in:
sua yoo 2024-08-06 19:09:34 -07:00 committed by GitHub
parent ba1e2ab602
commit 0b14be896b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 16 deletions

View File

@ -29,7 +29,9 @@ export class UsageHistoryTable extends TailwindElement {
if (this.org.usage && !Object.keys(this.org.usage).length) { if (this.org.usage && !Object.keys(this.org.usage).length) {
return html` return html`
<p class="text-center text-neutral-500"> <p
class="rounded border bg-neutral-50 p-3 text-center text-neutral-500"
>
${msg("No usage history to show.")} ${msg("No usage history to show.")}
</p> </p>
`; `;

View File

@ -251,21 +251,14 @@ export class Dashboard extends LiteElement {
`, `,
)} )}
</div> </div>
${when( <section class="mb-10">
this.appState.settings && <btrix-details>
!this.appState.settings.billingEnabled && <span slot="title">${msg("Usage History")}</span>
this.org, <btrix-usage-history-table
(org) => html` .org=${this.org}
<section class="mb-10"> ></btrix-usage-history-table>
<btrix-details open> </btrix-details>
<span slot="title">${msg("Usage History")}</span> </section>
<btrix-usage-history-table
.org=${org}
></btrix-usage-history-table>
</btrix-details>
</section>
`,
)}
</main> `; </main> `;
} }