2019-02-20 14:58:31 -05:00
|
|
|
{{#d-modal-body class="upload-selector install-theme" title="admin.customize.theme.install"}}
|
2021-02-18 12:51:44 -05:00
|
|
|
{{#unless directRepoInstall}}
|
|
|
|
<div class="install-theme-items">
|
|
|
|
{{install-theme-item value="popular" selection=selection label="admin.customize.theme.install_popular"}}
|
|
|
|
{{install-theme-item value="local" selection=selection label="admin.customize.theme.install_upload"}}
|
|
|
|
{{install-theme-item value="remote" selection=selection label="admin.customize.theme.install_git_repo"}}
|
|
|
|
{{install-theme-item value="create" selection=selection label="admin.customize.theme.install_create" showIcon=true}}
|
|
|
|
</div>
|
|
|
|
{{/unless}}
|
2019-02-20 14:58:31 -05:00
|
|
|
<div class="install-theme-content">
|
|
|
|
{{#if popular}}
|
|
|
|
<div class="popular-theme-items">
|
|
|
|
{{#each themes as |theme|}}
|
2020-05-08 15:38:41 -04:00
|
|
|
<div class="popular-theme-item" data-name={{theme.name}}>
|
2019-02-20 14:58:31 -05:00
|
|
|
<div class="popular-theme-name">
|
2020-04-16 16:38:10 -04:00
|
|
|
<a href={{theme.meta_url}} rel="noopener noreferrer" target="_blank">
|
2019-02-20 14:58:31 -05:00
|
|
|
{{#if theme.component}}
|
|
|
|
{{d-icon "puzzle-piece" title="admin.customize.theme.component"}}
|
|
|
|
{{/if}}
|
|
|
|
{{theme.name}}
|
|
|
|
</a>
|
|
|
|
<div class="popular-theme-description">
|
|
|
|
{{theme.description}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="popular-theme-buttons">
|
|
|
|
{{#if theme.installed}}
|
2020-03-11 04:23:10 -04:00
|
|
|
<span>{{i18n "admin.customize.theme.installed"}}</span>
|
2019-02-20 14:58:31 -05:00
|
|
|
{{else}}
|
|
|
|
{{d-button class="btn-small"
|
|
|
|
label="admin.customize.theme.install"
|
|
|
|
disabled=installDisabled
|
|
|
|
icon="upload"
|
|
|
|
action=(action "installThemeFromList" theme.value)}}
|
|
|
|
|
|
|
|
{{#if theme.preview}}
|
2020-04-16 16:38:10 -04:00
|
|
|
<a href={{theme.preview}} rel="noopener noreferrer" target="_blank">{{d-icon "desktop"}} {{i18n "admin.customize.theme.preview"}}</a>
|
2019-02-20 14:58:31 -05:00
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/each}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
{{#if local}}
|
|
|
|
<div class="inputs">
|
2019-07-18 08:34:48 -04:00
|
|
|
<input onchange={{action "uploadLocaleFile"}} type="file" id="file-input" accept=".dcstyle.json,application/json,.tar.gz,application/x-gzip,.zip,application/zip"><br>
|
2019-02-20 14:58:31 -05:00
|
|
|
<span class="description">{{i18n "admin.customize.theme.import_file_tip"}}</span>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
{{#if remote}}
|
|
|
|
<div class="inputs">
|
|
|
|
<div class="repo">
|
|
|
|
<div class="label">{{i18n "admin.customize.theme.import_web_tip"}}</div>
|
|
|
|
{{input value=uploadUrl placeholder=urlPlaceholder}}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{d-button
|
|
|
|
class="btn-small advanced-repo"
|
|
|
|
action=(action "toggleAdvanced")
|
|
|
|
label="admin.customize.theme.import_web_advanced"}}
|
|
|
|
|
|
|
|
{{#if advancedVisible}}
|
|
|
|
<div class="branch">
|
|
|
|
<div class="label">{{i18n "admin.customize.theme.remote_branch"}}</div>
|
|
|
|
{{input value=branch placeholder="master"}}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="check-private">
|
|
|
|
<label>
|
|
|
|
{{input type="checkbox" checked=privateChecked}}
|
|
|
|
{{i18n "admin.customize.theme.is_private"}}
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
{{#if showPublicKey}}
|
|
|
|
<div class="public-key">
|
|
|
|
<div class="label">{{i18n "admin.customize.theme.public_key"}}</div>
|
|
|
|
{{textarea readonly=true value=publicKey}}
|
|
|
|
</div>
|
2021-04-16 12:46:34 -04:00
|
|
|
{{else}}
|
|
|
|
{{#if privateChecked}}
|
|
|
|
<div class="public-key-note">{{i18n "admin.customize.theme.public_key_note"}}</div>
|
|
|
|
{{/if}}
|
2019-02-20 14:58:31 -05:00
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
{{#if create}}
|
|
|
|
<div class="inputs">
|
2020-03-11 04:23:10 -04:00
|
|
|
<div class="label">{{i18n "admin.customize.theme.create_name"}}</div>
|
2019-02-20 14:58:31 -05:00
|
|
|
{{input value=name placeholder=placeholder}}
|
|
|
|
|
2020-03-11 04:23:10 -04:00
|
|
|
<div class="label">{{i18n "admin.customize.theme.create_type"}}</div>
|
2020-02-03 08:22:14 -05:00
|
|
|
{{combo-box
|
|
|
|
valueProperty="value"
|
|
|
|
content=createTypes
|
|
|
|
value=selectedType
|
2020-10-06 17:50:05 -04:00
|
|
|
onChange=(action (mut selectedType))
|
2020-02-03 08:22:14 -05:00
|
|
|
}}
|
2019-02-20 14:58:31 -05:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
2021-02-18 12:51:44 -05:00
|
|
|
|
|
|
|
{{#if directRepoInstall}}
|
|
|
|
<div class="repo">
|
|
|
|
<div class="label">{{html-safe (i18n "admin.customize.theme.direct_install_tip" name=uploadName)}}</div>
|
|
|
|
<pre><code>{{uploadUrl}}</code></pre>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2019-02-20 14:58:31 -05:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{{/d-modal-body}}
|
|
|
|
|
|
|
|
{{#unless popular}}
|
|
|
|
<div class="modal-footer">
|
2021-01-07 13:03:35 -05:00
|
|
|
{{#if duplicateRemoteThemeWarning}}
|
|
|
|
<div class="install-theme-warning">
|
|
|
|
⚠️ {{duplicateRemoteThemeWarning}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2019-02-20 14:58:31 -05:00
|
|
|
{{d-button action=(action "installTheme") disabled=installDisabled class="btn btn-primary" label=submitLabel}}
|
|
|
|
{{d-modal-cancel close=(route-action "closeModal")}}
|
|
|
|
</div>
|
|
|
|
{{/unless}}
|