Ghost/ghost/admin/app/templates/settings/labs.hbs

292 lines
15 KiB
Handlebars
Raw Normal View History

<section class="gh-canvas">
<GhCanvasHeader class="gh-canvas-header">
<h2 class="gh-canvas-title" data-test-screen-title>
<LinkTo @route="settings">Settings</LinkTo>
<span>{{svg-jar "arrow-right"}}</span>
Labs
</h2>
</GhCanvasHeader>
2014-12-14 20:56:04 +03:00
<section class="view-container settings-debug">
<p class="gh-box gh-box-tip">{{svg-jar "idea"}}This is a testing ground for new or experimental features. They may change, break or inexplicably disappear at any time.</p>
2017-02-17 17:10:02 +03:00
2021-02-10 15:00:07 +03:00
<div class="gh-main-section">
<h4 class="gh-main-section-header small bn">Migration options</h4>
<div class="gh-expandable {{if this.importErrors "overflow-hidden"}}">
2021-02-10 15:00:07 +03:00
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>
<h4 class="gh-expandable-title">Import content</h4>
<p class="gh-expandable-description">Import posts from another Ghost installation</p>
</div>
<form id="settings-import" enctype="multipart/form-data">
<GhFileUpload
@id="importfile"
@classNames="flex"
@uploadButtonText={{this.uploadButtonText}}
@onUpload={{action "onUpload"}}
@acceptEncoding={{this.importMimeType}}
data-test-file-input="import"
/>
</form>
</div>
2021-02-10 15:00:07 +03:00
{{#if this.importErrors}}
<div class="gh-import-errors {{if this.importSuccessful "gh-import-errors-alert"}}" data-test-import-errors>
<div class="gh-import-errors-title">
{{#if this.importSuccessful}}
Import successful with warnings
{{else}}
Import failed
{{/if}}
</div>
2021-02-10 15:00:07 +03:00
{{#each this.importErrors as |error|}}
<div class="gh-import-error" data-test-import-error>
<p class="gh-import-error-message" data-test-import-error-message>
{{#if error.help}}{{error.help}}: {{/if}}{{error.message}}
</p>
2021-02-10 15:00:07 +03:00
{{#if error.context}}
<div class="gh-import-error-entry" data-test-import-error-context>
<pre>{{error.context}}</pre>
</div>
{{/if}}
</div>
2021-02-10 15:00:07 +03:00
{{/each}}
</div>
2021-02-10 15:00:07 +03:00
{{/if}}
</div>
2021-02-10 15:00:07 +03:00
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>
<h4 class="gh-expandable-title">Export your content</h4>
<p class="gh-expandable-description">Download all of your posts and settings in a single, glorious JSON file</p>
</div>
<button type="button" class="gh-btn" {{action "downloadFile" "db"}}><span>Export</span></button>
</div>
</div>
2021-02-10 15:00:07 +03:00
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>
<h4 class="gh-expandable-title">Delete all content</h4>
<p class="gh-expandable-description">Permanently delete all posts and tags from the database, a hard reset</p>
</div>
<button type="button" class="gh-btn gh-btn-red js-delete" {{action "toggleDeleteAllModal"}}><span>Delete</span></button>
</div>
</div>
2017-02-17 17:10:02 +03:00
</div>
</div>
2021-09-07 14:36:17 +03:00
<div class="gh-main-section">
<h4 class="gh-main-section-header small bn">Beta features</h4>
2021-09-07 14:36:17 +03:00
<div class="gh-expandable">
2021-02-10 15:00:07 +03:00
<div class="gh-expandable-block">
<GhUploader
@extensions={{this.redirectsFileExtensions}}
@uploadUrl="/redirects/upload/"
2021-02-10 15:00:07 +03:00
@paramName="redirects"
@onUploadSuccess={{perform this.redirectUploadResult true}}
@onUploadFailure={{perform this.redirectUploadResult false}}
as |uploader|
>
<div class="gh-expandable-header">
<div>
<h4 class="gh-expandable-title">Redirects</h4>
<p class="gh-expandable-description">Configure redirects for old or moved content, more info in <a href="https://ghost.org/tutorials/implementing-redirects/" target="_blank" rel="noopener noreferrer">the docs</a></p>
2021-02-10 15:00:07 +03:00
</div>
<div class="gh-setting-action flex flex-column items-end">
{{#if uploader.isUploading}}
{{uploader.progressBar}}
{{else}}
<button
type="button"
class="gh-btn gh-btn-icon {{if this.redirectSuccess "gh-btn-green"}} {{if this.redirectFailure "gh-btn-red"}}"
onclick={{action "triggerFileDialog"}}
data-test-button="upload-redirects"
>
<span>
{{#if this.redirectSuccess}}
{{svg-jar "check-circle"}} Uploaded
{{else if this.redirectFailure}}
{{svg-jar "retry"}} Upload Failed
{{else}}
Upload redirects YAML/JSON
2021-02-10 15:00:07 +03:00
{{/if}}
</span>
</button>
<div><a href="#" {{action "downloadFile" "redirects/download"}} data-test-link="download-redirects">Download current redirects</a></div>
2021-02-10 15:00:07 +03:00
{{/if}}
{{#each uploader.errors as |error|}}
<div class="gh-setting-error" data-test-error="redirects">{{or error.context error.message}}</div>
{{/each}}
2021-02-10 15:00:07 +03:00
<div style="display:none">
<GhFileInput @multiple={{false}} @action={{uploader.setFiles}} @accept={{this.redirectsFileMimeTypes}} data-test-file-input="redirects" />
2021-02-10 15:00:07 +03:00
</div>
</div>
</div>
2021-02-10 15:00:07 +03:00
</GhUploader>
</div>
2017-02-17 17:10:02 +03:00
2021-02-10 15:00:07 +03:00
<div class="gh-expandable-block">
<GhUploader
@extensions={{this.yamlExtension}}
@uploadUrl="/settings/routes/yaml/"
@paramName="routes"
@onUploadSuccess={{perform this.routesUploadResult true}}
@onUploadFailure={{perform this.routesUploadResult false}}
as |uploader|
>
<div class="gh-expandable-header">
<div>
<h4 class="gh-expandable-title">Routes</h4>
<p class="gh-expandable-description">Configure dynamic routing by modifying the routes.yaml file</p>
</div>
<div class="gh-setting-action flex flex-column items-end">
{{#if uploader.isUploading}}
{{uploader.progressBar}}
{{else}}
<button
type="button"
class="gh-btn gh-btn-icon {{if this.routesSuccess "gh-btn-green"}} {{if this.routesFailure "gh-btn-red"}}"
onclick={{action "triggerFileDialog"}}
data-test-button="upload-routes"
>
<span>
{{#if this.routesSuccess}}
{{svg-jar "check-circle"}} Uploaded
{{else if this.routesFailure}}
{{svg-jar "retry"}} Upload Failed
{{else}}
Upload routes YAML
{{/if}}
</span>
</button>
<div><a href="#" {{action "downloadFile" "settings/routes/yaml"}} data-test-link="download-routes">Download current routes.yaml</a></div>
{{/if}}
{{#each uploader.errors as |error|}}
<div class="gh-setting-error" data-test-error="routes">{{or error.context error.message}}</div>
{{/each}}
<div style="display:none">
<GhFileInput @multiple={{false}} @action={{uploader.setFiles}} @accept={{this.yamlAccept}} data-test-file-input="routes" />
</div>
</div>
</div>
2021-02-10 15:00:07 +03:00
</GhUploader>
</div>
</div>
</div>
{{#if (enable-developer-experiments)}}
<div class="gh-main-section">
<h4 class="gh-main-section-header small bn">Alpha Features</h4>
<div class="gh-expandable">
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>
<h4 class="gh-expandable-title">Audit Log</h4>
<p class="gh-expandable-description">
Allow visibility into Staff actions
</p>
</div>
<div class="for-switch">
<GhFeatureFlag @flag="auditLog" />
</div>
</div>
</div>
2021-09-22 14:20:15 +03:00
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>
<h4 class="gh-expandable-title">URL Cache</h4>
<p class="gh-expandable-description">
Enable URL Caching
</p>
</div>
<div class="for-switch">
<GhFeatureFlag @flag="urlCache" />
</div>
</div>
</div>
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>
<h4 class="gh-expandable-title">Cardmageddon - Before/After</h4>
<p class="gh-expandable-description">
Card for comparing two images
</p>
</div>
<div class="for-switch">
<GhFeatureFlag @flag="beforeAfterCard" />
</div>
</div>
</div>
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>
<h4 class="gh-expandable-title">Free trial</h4>
<p class="gh-expandable-description">
Add support for free trials
</p>
</div>
<div class="for-switch">
<GhFeatureFlag @flag="freeTrial" />
</div>
</div>
</div>
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>
<h4 class="gh-expandable-title">Cardless trials</h4>
<p class="gh-expandable-description">
Add support for expiring complimentary subscriptions
</p>
</div>
<div class="for-switch">
<GhFeatureFlag @flag="compExpiring" />
</div>
</div>
</div>
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>
<h4 class="gh-expandable-title">Member Attribution</h4>
<p class="gh-expandable-description">
Track which posts & pages are driving Member Subscriptions & Paid Conversions
</p>
</div>
<div class="for-switch">
<GhFeatureFlag @flag="memberAttribution" />
</div>
</div>
</div>
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>
<h4 class="gh-expandable-title">Search helper</h4>
<p class="gh-expandable-description">
Enable the <code>&#123;&#123;search&#125;&#125;</code> handlebars helper.
</p>
</div>
<div class="for-switch">
<GhFeatureFlag @flag="searchHelper" />
</div>
</div>
</div>
</div>
</div>
{{/if}}
</section>
</section>
{{#if this.showDeleteAllModal}}
<GhFullscreenModal @modal="delete-all"
@close={{action "toggleDeleteAllModal"}}
@modifier="action wide" />
2017-03-02 11:49:10 +03:00
{{/if}}