2015-03-03 01:12:19 +08:00
|
|
|
<div class="setting-label">
|
2020-11-12 20:07:36 +08:00
|
|
|
<h3>
|
2023-03-01 17:12:39 +08:00
|
|
|
{{this.settingName}}
|
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.staffLogFilter}}
|
2022-07-06 16:37:54 +08:00
|
|
|
<LinkTo
|
|
|
|
@route="adminLogs.staffActionLogs"
|
|
|
|
@query={{hash filters=this.staffLogFilter force_refresh=true}}
|
|
|
|
title={{i18n "admin.settings.history"}}
|
|
|
|
>
|
2020-11-12 20:07:36 +08:00
|
|
|
<span class="history-icon">
|
|
|
|
{{d-icon "history"}}
|
|
|
|
</span>
|
2022-06-30 18:30:50 +08:00
|
|
|
</LinkTo>
|
2020-11-12 20:07:36 +08:00
|
|
|
{{/if}}
|
|
|
|
</h3>
|
2023-03-01 17:12:39 +08:00
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.defaultIsAvailable}}
|
2023-03-01 17:12:39 +08:00
|
|
|
<DButton
|
|
|
|
class="btn-link"
|
|
|
|
@action={{this.setDefaultValues}}
|
|
|
|
@translatedLabel={{this.setting.setDefaultValuesLabel}}
|
|
|
|
/>
|
2019-11-28 13:19:01 +08:00
|
|
|
{{/if}}
|
2015-03-03 01:12:19 +08:00
|
|
|
</div>
|
2023-03-01 17:12:39 +08:00
|
|
|
|
2015-03-03 01:12:19 +08:00
|
|
|
<div class="setting-value">
|
2024-03-06 08:24:29 +08:00
|
|
|
{{#if this.settingEditButton}}
|
|
|
|
<DButton
|
|
|
|
@action={{this.settingEditButton.action}}
|
|
|
|
@icon={{this.settingEditButton.icon}}
|
|
|
|
@label={{this.settingEditButton.label}}
|
|
|
|
class="setting-value-edit-button"
|
|
|
|
/>
|
2024-03-13 12:38:21 +08:00
|
|
|
|
|
|
|
<SiteSettings::Description @description={{this.setting.description}} />
|
2024-03-06 08:24:29 +08:00
|
|
|
{{else}}
|
|
|
|
{{component
|
|
|
|
this.componentName
|
|
|
|
setting=this.setting
|
|
|
|
value=this.buffered.value
|
|
|
|
validationMessage=this.validationMessage
|
|
|
|
preview=this.preview
|
|
|
|
isSecret=this.isSecret
|
|
|
|
allowAny=this.allowAny
|
|
|
|
changeValueCallback=this.changeValueCallback
|
|
|
|
}}
|
|
|
|
{{/if}}
|
2015-03-03 01:12:19 +08:00
|
|
|
</div>
|
2023-03-01 17:12:39 +08:00
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.dirty}}
|
2015-03-03 01:12:19 +08:00
|
|
|
<div class="setting-controls">
|
2023-03-01 17:12:39 +08:00
|
|
|
<DButton class="ok" @action={{this.update}} @icon="check" />
|
|
|
|
<DButton class="cancel" @action={{this.cancel}} @icon="times" />
|
2015-03-03 01:12:19 +08:00
|
|
|
</div>
|
2024-03-13 06:52:46 +08:00
|
|
|
{{else if this.overridden}}
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.setting.secret}}
|
2023-03-01 17:12:39 +08:00
|
|
|
<DButton @action={{this.toggleSecret}} @icon="far-eye-slash" />
|
2018-06-02 21:57:52 +08:00
|
|
|
{{/if}}
|
2023-03-01 17:12:39 +08:00
|
|
|
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
2023-03-01 17:12:39 +08:00
|
|
|
class="btn-default undo"
|
|
|
|
@action={{this.resetDefault}}
|
2022-06-30 18:30:50 +08:00
|
|
|
@icon="undo"
|
|
|
|
@label="admin.settings.reset"
|
|
|
|
/>
|
2015-03-03 01:12:19 +08:00
|
|
|
{{/if}}
|