Skip to content

Commit 0b14be8

Browse files
authored
feat: Show usage history in dashboard (#1998)
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
1 parent ba1e2ab commit 0b14be8

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

frontend/src/features/org/usage-history-table.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ export class UsageHistoryTable extends TailwindElement {
2929

3030
if (this.org.usage && !Object.keys(this.org.usage).length) {
3131
return html`
32-
<p class="text-center text-neutral-500">
32+
<p
33+
class="rounded border bg-neutral-50 p-3 text-center text-neutral-500"
34+
>
3335
${msg("No usage history to show.")}
3436
</p>
3537
`;

frontend/src/pages/org/dashboard.ts

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -251,21 +251,14 @@ export class Dashboard extends LiteElement {
251251
`,
252252
)}
253253
</div>
254-
${when(
255-
this.appState.settings &&
256-
!this.appState.settings.billingEnabled &&
257-
this.org,
258-
(org) => html`
259-
<section class="mb-10">
260-
<btrix-details open>
261-
<span slot="title">${msg("Usage History")}</span>
262-
<btrix-usage-history-table
263-
.org=${org}
264-
></btrix-usage-history-table>
265-
</btrix-details>
266-
</section>
267-
`,
268-
)}
254+
<section class="mb-10">
255+
<btrix-details>
256+
<span slot="title">${msg("Usage History")}</span>
257+
<btrix-usage-history-table
258+
.org=${this.org}
259+
></btrix-usage-history-table>
260+
</btrix-details>
261+
</section>
269262
</main> `;
270263
}
271264

0 commit comments

Comments
 (0)