mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 00:24:21 +08:00
50 lines
1.9 KiB
Handlebars
50 lines
1.9 KiB
Handlebars
{{#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">
|
|
<input onchange={{action "uploadLocaleFile"}} type="file" id="file-input" accept='.dcstyle.json,application/json,.tar.gz,application/x-gzip'><br>
|
|
<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">
|
|
<div class='repo'>
|
|
{{input value=uploadUrl placeholder=urlPlaceholder}}
|
|
<span class="description">{{i18n 'admin.customize.theme.import_web_tip'}}</span>
|
|
</div>
|
|
<div class='branch'>
|
|
{{input value=branch placeholder="master"}}
|
|
<span class="description">{{i18n 'admin.customize.theme.remote_branch'}}</span>
|
|
</div>
|
|
<div class='check-private'>
|
|
<label>
|
|
{{input type="checkbox" checked=privateChecked}}
|
|
{{i18n 'admin.customize.theme.is_private'}}
|
|
</label>
|
|
</div>
|
|
{{#if checkPrivate}}
|
|
{{#if privateChecked}}
|
|
{{#if publicKey}}
|
|
<div class='public-key'>
|
|
{{i18n 'admin.customize.theme.public_key'}}
|
|
{{textarea readonly=true value=publicKey}}
|
|
</div>
|
|
{{/if}}
|
|
{{/if}}
|
|
{{/if}}
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
{{/d-modal-body}}
|
|
|
|
<div class="modal-footer">
|
|
{{d-button action=(action "importTheme") disabled=importDisabled class='btn btn-primary' icon='upload' label='admin.customize.import'}}
|
|
{{d-modal-cancel close=(route-action "closeModal")}}
|
|
</div>
|