Skip to content

Commit

Permalink
feat: Show usage history in dashboard (#1998)
Browse files Browse the repository at this point in the history
Following #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
  • Loading branch information
SuaYoo authored Aug 7, 2024
1 parent ba1e2ab commit 0b14be8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
4 changes: 3 additions & 1 deletion frontend/src/features/org/usage-history-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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>
`;
Expand Down
23 changes: 8 additions & 15 deletions frontend/src/pages/org/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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> `;
}

Expand Down

0 comments on commit 0b14be8

Please sign in to comment.