2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.setting.textarea}}
|
2022-07-06 16:37:54 +08:00
|
|
|
<Textarea @value={{this.value}} class="input-setting-textarea" />
|
2022-07-06 01:41:31 +08:00
|
|
|
{{else if this.setting.json_schema}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
2023-07-05 17:27:29 +08:00
|
|
|
@action={{fn (mut this.showJsonEditorModal) true}}
|
2022-06-30 18:30:50 +08:00
|
|
|
@icon="pencil-alt"
|
|
|
|
@label="admin.site_settings.json_schema.edit"
|
|
|
|
/>
|
2022-07-06 01:41:31 +08:00
|
|
|
{{else if this.isSecret}}
|
2022-07-06 16:37:54 +08:00
|
|
|
<Input @type="password" @value={{this.value}} class="input-setting-string" />
|
2017-07-18 04:38:26 +08:00
|
|
|
{{else}}
|
2022-07-06 01:41:31 +08:00
|
|
|
<TextField @value={{this.value}} @classNames="input-setting-string" />
|
2017-07-18 04:38:26 +08:00
|
|
|
{{/if}}
|
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
<SettingValidationMessage @message={{this.validationMessage}} />
|
2023-07-05 17:27:29 +08:00
|
|
|
<div class="desc">{{html-safe this.setting.description}}</div>
|
|
|
|
|
|
|
|
{{#if this.showJsonEditorModal}}
|
|
|
|
<Modal::JsonSchemaEditor
|
|
|
|
@updateValue={{fn (mut this.value)}}
|
|
|
|
@value={{this.value}}
|
|
|
|
@settingName={{this.setting.setting}}
|
|
|
|
@jsonSchema={{this.setting.json_schema}}
|
|
|
|
@closeModal={{fn (mut this.showJsonEditorModal) false}}
|
|
|
|
/>
|
|
|
|
{{/if}}
|