mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 02:11:44 +03:00
a41785ae95
refs https://github.com/TryGhost/Team/issues/1443 - Also moved loading of charts outside of constructors to avoid infinite update loops in Ember - Random loading delay when using fake states
28 lines
955 B
Handlebars
28 lines
955 B
Handlebars
|
|
<div class="prototype-paid-mix-dropdown">
|
|
<PowerSelect
|
|
@selected={{this.selectedModeOption}}
|
|
@options={{this.modeOptions}}
|
|
@searchEnabled={{false}}
|
|
@onChange={{this.onSwitchMode}}
|
|
@triggerComponent="gh-power-select/trigger"
|
|
@triggerClass="gh-contentfilter-menu-trigger"
|
|
@dropdownClass="gh-contentfilter-menu-dropdown"
|
|
@matchTriggerWidth={{false}}
|
|
as |option|
|
|
>
|
|
{{#if option.name}}{{option.name}}{{else}}<span class="red">Unknown option</span>{{/if}}
|
|
</PowerSelect>
|
|
</div>
|
|
|
|
<h4 class="gh-dashboard5-metric is-main" {{did-insert this.loadCharts}}>Paid mix</h4>
|
|
|
|
{{#if this.loading}}
|
|
<div class="gh-dashboard5-loading" style={{html-safe (concat "height: " this.chartHeight "px;")}}/>
|
|
{{else}}
|
|
<EmberChart
|
|
@type={{this.chartType}}
|
|
@data={{this.chartData}}
|
|
@options={{this.chartOptions}}
|
|
@height={{this.chartHeight}} />
|
|
{{/if}} |