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) {
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.")}
</p>
`;

View File

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