2017-04-12 22:52:52 +08:00
|
|
|
{{#d-modal-body class='upload-selector' title="admin.customize.theme.import_theme"}}
|
|
|
|
<div class="radios">
|
|
|
|
{{radio-button name="upload" id="local" value="local" selection=selection}}
|
|
|
|
<label class="radio" for="local">{{i18n 'upload_selector.from_my_computer'}}</label>
|
|
|
|
{{#if local}}
|
|
|
|
<div class="inputs">
|
2018-04-26 12:06:05 +08:00
|
|
|
<input type="file" id="file-input" accept='.dcstyle.json,application/json'><br>
|
2017-04-12 22:52:52 +08:00
|
|
|
<span class="description">{{i18n 'admin.customize.theme.import_file_tip'}}</span>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
<div class="radios">
|
|
|
|
{{radio-button name="upload" id="remote" value="remote" selection=selection}}
|
|
|
|
<label class="radio" for="remote">{{i18n 'upload_selector.from_the_web'}}</label>
|
|
|
|
{{#if remote}}
|
|
|
|
<div class="inputs">
|
|
|
|
{{input value=uploadUrl placeholder="https://github.com/discourse/discourse/sample_theme"}}
|
|
|
|
<span class="description">{{i18n 'admin.customize.theme.import_web_tip'}}</span>
|
2018-03-09 13:14:21 +08:00
|
|
|
{{#if checkPrivate}}
|
|
|
|
<div class='check-private'>
|
|
|
|
<label>
|
|
|
|
{{input type="checkbox" checked=privateChecked}}
|
|
|
|
{{i18n 'admin.customize.theme.is_private'}}
|
|
|
|
</label>
|
|
|
|
{{#if privateChecked}}
|
|
|
|
{{#if publicKey}}
|
|
|
|
<div class='public-key'>
|
|
|
|
{{i18n 'admin.customize.theme.public_key'}}
|
|
|
|
{{textarea disabled=true value=publicKey}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2017-04-12 22:52:52 +08:00
|
|
|
</div>
|
2018-03-09 13:14:21 +08:00
|
|
|
|
2017-04-12 22:52:52 +08:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
{{/d-modal-body}}
|
|
|
|
|
|
|
|
<div class="modal-footer">
|
|
|
|
{{d-button action="importTheme" disabled=loading class='btn btn-primary' icon='upload' label='admin.customize.import'}}
|
2017-09-14 01:23:19 +08:00
|
|
|
{{d-modal-cancel close=(action "closeModal")}}
|
2017-04-12 22:52:52 +08:00
|
|
|
</div>
|