mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-30 06:12:03 +03:00
63b1e4e8ad
no issue - in many places we were passing a string as an argument to a `<PowerSelect>` related component that referred to a component name, that was throwing deprecation warnings because those strings were used dynamically with `{{component}}` later on which isn't statically analyzable - switched to passing a component explicitly with `{{component}}` - https://github.com/embroider-build/embroider/blob/main/REPLACING-COMPONENT-HELPER.md#when-youre-passing-a-component-to-someone-else
58 lines
2.2 KiB
Handlebars
58 lines
2.2 KiB
Handlebars
<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" />
|
|
|
|
{{#if this.isChartCadence}}
|
|
<div class="gh-dashboard-legend">
|
|
<div class="gh-dashboard-legend-item">Monthly</div>
|
|
<div class="gh-dashboard-legend-item">Annual</div>
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
<div class="gh-dashboard-chart" {{did-insert this.loadCharts}}>
|
|
{{#if this.loading}}
|
|
<div class="gh-dashboard-chart-loading">
|
|
<div class="gh-loading-spinner"></div>
|
|
</div>
|
|
{{else}}
|
|
<div class="gh-dashboard-chart-container">
|
|
<div class="gh-dashboard-chart-box">
|
|
<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">
|
|
-
|
|
</div>
|
|
</div>
|
|
</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>
|