mirror of
https://github.com/discourse/discourse.git
synced 2025-01-29 05:42:18 +08:00
DEV: Add element wrapper to the body and screenshot (#30497)
This commit is contained in:
parent
86637403c7
commit
d1b3b85584
|
@ -92,65 +92,69 @@ export default class DiscourseNewFeatureItem extends Component {
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{#if @item.screenshot_url}}
|
<div class="admin-new-feature-item__body-wrapper">
|
||||||
<img
|
{{#if @item.screenshot_url}}
|
||||||
src={{@item.screenshot_url}}
|
<div class="admin-new-feature-item__img-container">
|
||||||
class="admin-new-feature-item__screenshot"
|
<img
|
||||||
alt={{@item.title}}
|
src={{@item.screenshot_url}}
|
||||||
/>
|
class="admin-new-feature-item__screenshot"
|
||||||
{{/if}}
|
alt={{@item.title}}
|
||||||
|
/>
|
||||||
<div class="admin-new-feature-item__body">
|
|
||||||
<div class="admin-new-feature-item__feature-description">
|
|
||||||
<CookText @rawText={{@item.description}} />
|
|
||||||
|
|
||||||
{{#if @item.link}}
|
|
||||||
<a
|
|
||||||
href={{@item.link}}
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
class="admin-new-feature-item__learn-more"
|
|
||||||
>
|
|
||||||
{{i18n "admin.dashboard.new_features.learn_more"}}
|
|
||||||
</a>
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
{{#if @item.experiment_setting}}
|
|
||||||
<div class="admin-new-feature-item__feature-toggle">
|
|
||||||
<DTooltip>
|
|
||||||
<:trigger>
|
|
||||||
<DToggleSwitch
|
|
||||||
@state={{this.experimentEnabled}}
|
|
||||||
{{on "click" this.toggleExperiment}}
|
|
||||||
/>
|
|
||||||
</:trigger>
|
|
||||||
<:content>
|
|
||||||
<div class="admin-new-feature-item__tooltip">
|
|
||||||
<div class="admin-new-feature-item__tooltip-header">
|
|
||||||
{{i18n
|
|
||||||
(if
|
|
||||||
this.experimentEnabled
|
|
||||||
"admin.dashboard.new_features.experiment_tooltip.title_enabled"
|
|
||||||
"admin.dashboard.new_features.experiment_tooltip.title_disabled"
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
<div class="admin-new-feature-item__tooltip-content">
|
|
||||||
{{htmlSafe
|
|
||||||
(i18n
|
|
||||||
(if
|
|
||||||
this.experimentEnabled
|
|
||||||
"admin.dashboard.new_features.experiment_tooltip.content_enabled"
|
|
||||||
"admin.dashboard.new_features.experiment_tooltip.content_disabled"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</:content>
|
|
||||||
</DTooltip>
|
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
<div class="admin-new-feature-item__body">
|
||||||
|
<div class="admin-new-feature-item__feature-description">
|
||||||
|
<CookText @rawText={{@item.description}} />
|
||||||
|
|
||||||
|
{{#if @item.link}}
|
||||||
|
<a
|
||||||
|
href={{@item.link}}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
class="admin-new-feature-item__learn-more"
|
||||||
|
>
|
||||||
|
{{i18n "admin.dashboard.new_features.learn_more"}}
|
||||||
|
</a>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
{{#if @item.experiment_setting}}
|
||||||
|
<div class="admin-new-feature-item__feature-toggle">
|
||||||
|
<DTooltip>
|
||||||
|
<:trigger>
|
||||||
|
<DToggleSwitch
|
||||||
|
@state={{this.experimentEnabled}}
|
||||||
|
{{on "click" this.toggleExperiment}}
|
||||||
|
/>
|
||||||
|
</:trigger>
|
||||||
|
<:content>
|
||||||
|
<div class="admin-new-feature-item__tooltip">
|
||||||
|
<div class="admin-new-feature-item__tooltip-header">
|
||||||
|
{{i18n
|
||||||
|
(if
|
||||||
|
this.experimentEnabled
|
||||||
|
"admin.dashboard.new_features.experiment_tooltip.title_enabled"
|
||||||
|
"admin.dashboard.new_features.experiment_tooltip.title_disabled"
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
<div class="admin-new-feature-item__tooltip-content">
|
||||||
|
{{htmlSafe
|
||||||
|
(i18n
|
||||||
|
(if
|
||||||
|
this.experimentEnabled
|
||||||
|
"admin.dashboard.new_features.experiment_tooltip.content_enabled"
|
||||||
|
"admin.dashboard.new_features.experiment_tooltip.content_disabled"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</:content>
|
||||||
|
</DTooltip>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user