Ghost/ghost/admin/app/components/dashboard/charts/paid-mix.hbs

58 lines
2.2 KiB
Handlebars
Raw Normal View History

<div class="gh-dashboard-minichart gh-dashboard-mix {{if this.isChartCadence 'is-cadence'}}">
<div class="gh-dashboard-content">
<div class="gh-dashboard-data">
<Dashboard::Parts::Metric
@label="Paid mix" />
2022-05-12 14:20:44 +03:00
{{#if this.isChartCadence}}
<div class="gh-dashboard-legend">
<div class="gh-dashboard-legend-item">Monthly</div>
<div class="gh-dashboard-legend-item">Annual</div>
2022-05-12 14:20:44 +03:00
</div>
{{/if}}
</div>
<div class="gh-dashboard-chart" {{did-insert this.loadCharts}}>
2022-05-12 14:20:44 +03:00
{{#if this.loading}}
<div class="gh-dashboard-chart-loading">
2022-05-12 14:20:44 +03:00
<div class="gh-loading-spinner"></div>
</div>
{{else}}
<div class="gh-dashboard-chart-container">
<div class="gh-dashboard-chart-box">
2022-05-12 14:20:44 +03:00
<EmberChart
@type={{this.chartType}}
@data={{this.chartData}}
@options={{this.chartOptions}}
@height={{110}} />
</div>
<div id="gh-dashboard-mix-tooltip" class="gh-dashboard-tooltip">
<div class="gh-dashboard-tooltip-value">
2022-05-12 14:20:44 +03:00
-
</div>
</div>
2022-05-12 14:20:44 +03:00
</div>
{{/if}}
</div>
</div>
{{#if this.hasMultipleTiers }}
<div class="gh-dashboard-select">
<PowerSelect
@selected={{this.selectedModeOption}}
@options={{this.modeOptions}}
@searchEnabled={{false}}
@onChange={{this.onSwitchMode}}
@triggerComponent={{component "gh-power-select/trigger"}}
@triggerClass="gh-contentfilter-menu-trigger"
@dropdownClass="gh-contentfilter-menu-dropdown is-narrow"
@matchTriggerWidth={{false}}
@horizontalPosition="right"
as |option|
>
{{#if option.name}}{{option.name}}{{else}}<span class="red">Unknown option</span>{{/if}}
</PowerSelect>
</div>
{{/if}}
</div>