2017-02-17 08:50:07 +03:00
<section class="gh-canvas">
2019-06-18 13:47:21 +03:00
<GhCanvasHeader class="gh-canvas-header">
<h2 class="gh-canvas-title" data-test-screen-title>
Labs
</h2>
</GhCanvasHeader>
2014-12-14 20:56:04 +03:00
2017-02-17 08:50:07 +03:00
<section class="view-container settings-debug">
2019-10-16 11:27:46 +03:00
<p class="gh-box gh-box-info"> {{ 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
2019-12-13 17:20:29 +03:00
{{ # if this .session .user .isOwner }}
2019-10-15 15:43:22 +03:00
<div class="gh-setting-header">Members (BETA) </div>
<div class="flex flex-column br3 shadow-1 bg-grouped-table mt2">
<div class="gh-setting-first gh-setting-last">
<div class="gh-members-setting-content">
<div class="flex">
<div class="flex flex-column flex-grow-1">
2019-10-16 07:25:42 +03:00
<div class="gh-setting-title pl5 pt5">Enable members</div>
<div class="gh-setting-desc pl5 pb5">Create registered members and take subscription payments — <a href="https://ghost.org/docs/members/" target="_blank" rel="noopener">Find out more</a></div>
2019-10-15 15:43:22 +03:00
</div>
<div class="gh-setting-action">
<div class="for-switch pa5"> {{ gh-feature-flag "members" }} </div>
</div>
</div>
2019-12-13 17:20:29 +03:00
{{ # liquid-if this .feature .labs .members }}
2019-10-15 15:43:22 +03:00
{{ gh-members-lab-setting
2019-12-13 17:20:29 +03:00
settings=this.settings
2019-10-16 11:27:46 +03:00
setDefaultContentVisibility=(action "setDefaultContentVisibility")
setMembersSubscriptionSettings=(action "setMembersSubscriptionSettings")
2019-11-13 07:01:31 +03:00
setBulkEmailSettings=(action "setBulkEmailSettings")
2019-10-16 11:27:46 +03:00
}}
2019-10-15 15:43:22 +03:00
<div class="mt5 pl5 pr5 pb5">
{{ gh-task-button "Save members settings"
2019-12-13 17:20:29 +03:00
task=this.saveSettings
2019-10-16 11:27:46 +03:00
successText="Saved"
runningText="Saving"
class="gh-btn gh-btn-blue gh-btn-icon"
}}
2019-10-15 15:43:22 +03:00
</div>
{{ / liquid-if }}
</div>
</div>
</div>
{{ / if }}
2017-02-17 17:10:02 +03:00
<div class="gh-setting-header">Migration options</div>
2019-06-18 13:47:21 +03:00
<div class="flex flex-column br3 shadow-1 bg-grouped-table pa5 mt2">
<div class="gh-setting-first">
<div class="gh-setting-content">
<div class="gh-setting-title">Import content</div>
<div class="gh-setting-desc">Import posts from another Ghost installation</div>
2017-05-24 16:36:59 +03:00
</div>
2019-06-18 13:47:21 +03:00
<div class="gh-setting-action">
<form id="settings-import" enctype="multipart/form-data">
{{ gh-file-upload
id="importfile"
classNames="flex"
2019-12-13 17:20:29 +03:00
uploadButtonText=this.uploadButtonText
2019-06-18 13:47:21 +03:00
onUpload=(action "onUpload")
2019-12-13 17:20:29 +03:00
acceptEncoding=this.importMimeType
2019-06-18 13:47:21 +03:00
data-test-file-input="import"}}
</form>
</div>
</div>
2017-05-24 16:36:59 +03:00
2019-12-13 17:20:29 +03:00
{{ # if this .importErrors }}
<div class="gh-import-errors {{ if this .importSuccessful "gh-import-errors-warning" }} " data-test-import-errors>
2019-06-18 13:47:21 +03:00
<div class="gh-import-errors-title">
2019-12-13 17:20:29 +03:00
{{ # if this .importSuccessful }}
2019-06-18 13:47:21 +03:00
Import successful with warnings
{{ else }}
Import failed
2017-05-24 16:36:59 +03:00
{{ / if }}
</div>
2019-12-13 17:20:29 +03:00
{{ # each this .importErrors as | error | }}
2019-06-18 13:47:21 +03:00
<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>
{{ # if error .context }}
<div class="gh-import-error-entry" data-test-import-error-context>
<pre> {{ error .context }} </pre>
</div>
{{ / if }}
</div>
{{ / each }}
</div>
{{ / if }}
<div class="gh-setting">
<div class="gh-setting-content">
<div class="gh-setting-title">Export your content</div>
<div class="gh-setting-desc">Download all of your posts and settings in a single, glorious JSON file</div>
</div>
<div class="gh-setting-action">
<button type="button" class="gh-btn gh-btn-hover-blue" {{ action "downloadFile" "db" }} ><span>Export</span></button>
</div>
2017-02-17 17:10:02 +03:00
</div>
2019-06-18 13:47:21 +03:00
<div class="gh-setting-last">
<div class="gh-setting-content">
<div class="gh-setting-title">Delete all content</div>
<div class="gh-setting-desc">Permanently delete all posts and tags from the database, a hard reset</div>
</div>
<div class="gh-setting-action">
<button type="button" class="gh-btn gh-btn-hover-red js-delete" {{ action "toggleDeleteAllModal" }} ><span>Delete</span></button>
</div>
2017-02-17 17:10:02 +03:00
</div>
</div>
<div class="gh-setting-header">Beta features</div>
2019-06-18 13:47:21 +03:00
<div class="flex flex-column br3 shadow-1 bg-grouped-table pa5 mt2">
<div class="gh-setting-first">
2019-01-15 13:23:49 +03:00
<div class="gh-setting-content">
2019-06-18 13:47:21 +03:00
<div class="gh-setting-title">Night shift</div>
<div class="gh-setting-desc">Swap Ghost admin's colours to a dark background which is easy on the eyes</div>
2019-01-15 13:23:49 +03:00
</div>
<div class="gh-setting-action">
2019-06-18 13:47:21 +03:00
<div class="for-switch"> {{ gh-feature-flag "nightShift" }} </div>
2019-01-15 13:23:49 +03:00
</div>
2017-02-17 17:10:02 +03:00
</div>
2019-06-18 13:47:21 +03:00
<div class="gh-setting">
{{ # gh-uploader
2019-12-13 17:20:29 +03:00
extensions=this.jsonExtension
2019-06-18 13:47:21 +03:00
uploadUrl="/redirects/json/"
paramName="redirects"
2019-12-13 17:20:29 +03:00
onUploadSuccess=(perform this.redirectUploadResult true)
onUploadFailure=(perform this.redirectUploadResult false)
2019-06-18 13:47:21 +03:00
as |uploader|
}}
<div class="gh-setting-content">
<div class="gh-setting-title">Redirects</div>
2019-07-22 11:53:24 +03:00
<div class="gh-setting-desc">Configure redirects for old or moved content, more info in <a href="https://ghost.org/tutorials/implementing-redirects/">the docs</a></div>
2019-06-18 13:47:21 +03:00
{{ # each uploader .errors as | error | }}
<div class="gh-setting-error" data-test-error="redirects"> {{ or error .context error .message }} </div>
{{ / each }}
2019-02-26 06:29:57 +03:00
</div>
2019-06-18 13:47:21 +03:00
<div class="gh-setting-action" style="display: flex; flex-direction: column">
{{ # if uploader .isUploading }}
{{ uploader .progressBar }}
{{ else }}
<button
type="button"
2019-12-13 17:20:29 +03:00
class="gh-btn gh-btn-icon {{ if this .redirectSuccess "gh-btn-green" }} {{ if this .redirectFailure "gh-btn-red" }} "
2019-06-18 13:47:21 +03:00
onclick= {{ action "triggerFileDialog" }}
data-test-button="upload-redirects"
>
<span>
2019-12-13 17:20:29 +03:00
{{ # if this .redirectSuccess }}
2019-06-18 13:47:21 +03:00
{{ svg-jar "check-circle" }} Uploaded
2019-12-13 17:20:29 +03:00
{{ else if this .redirectFailure }}
2019-06-18 13:47:21 +03:00
{{ svg-jar "retry" }} Upload Failed
{{ else }}
Upload redirects JSON
{{ / if }}
</span>
</button>
<span><a href="#" {{ action "downloadFile" "redirects/json" }} data-test-link="download-redirects">Download current redirects</a></span>
{{ / if }}
2017-09-21 18:01:40 +03:00
2019-06-18 13:47:21 +03:00
<div style="display:none">
2019-12-13 17:20:29 +03:00
{{ gh-file-input multiple = false action = uploader .setFiles accept = this .jsonMimeType data-test-file-input = "redirects" }}
2019-06-18 13:47:21 +03:00
</div>
2017-09-21 18:01:40 +03:00
</div>
2019-06-18 13:47:21 +03:00
{{ / gh-uploader }}
2017-09-21 18:01:40 +03:00
</div>
2019-06-18 13:47:21 +03:00
<div class="gh-setting-last">
{{ # gh-uploader
2019-12-13 17:20:29 +03:00
extensions=this.yamlExtension
2019-06-18 13:47:21 +03:00
uploadUrl="/settings/routes/yaml/"
paramName="routes"
2019-12-13 17:20:29 +03:00
onUploadSuccess=(perform this.routesUploadResult true)
onUploadFailure=(perform this.routesUploadResult false)
2019-06-18 13:47:21 +03:00
as |uploader|
}}
<div class="gh-setting-content">
<div class="gh-setting-title">Routes</div>
<div class="gh-setting-desc">Configure dynamic routing by modifying the routes.yaml file</div>
{{ # each uploader .errors as | error | }}
<div class="gh-setting-error" data-test-error="routes"> {{ or error .context error .message }} </div>
{{ / each }}
</div>
<div class="gh-setting-action" style="display: flex; flex-direction: column">
{{ # if uploader .isUploading }}
{{ uploader .progressBar }}
{{ else }}
<button
type="button"
2019-12-13 17:20:29 +03:00
class="gh-btn gh-btn-icon {{ if this .routesSuccess "gh-btn-green" }} {{ if this .routesFailure "gh-btn-red" }} "
2019-06-18 13:47:21 +03:00
onclick= {{ action "triggerFileDialog" }}
data-test-button="upload-routes"
>
<span>
2019-12-13 17:20:29 +03:00
{{ # if this .routesSuccess }}
2019-06-18 13:47:21 +03:00
{{ svg-jar "check-circle" }} Uploaded
2019-12-13 17:20:29 +03:00
{{ else if this .routesFailure }}
2019-06-18 13:47:21 +03:00
{{ svg-jar "retry" }} Upload Failed
{{ else }}
Upload routes YAML
{{ / if }}
</span>
</button>
<span><a href="#" {{ action "downloadFile" "settings/routes/yaml" }} data-test-link="download-routes">Download current routes.yaml</a></span>
{{ / if }}
2017-02-17 17:10:02 +03:00
2019-06-18 13:47:21 +03:00
<div style="display:none">
2019-12-13 17:20:29 +03:00
{{ gh-file-input multiple = false action = uploader .setFiles accept = this .yamlMimeType data-test-file-input = "routes" }}
2019-06-18 13:47:21 +03:00
</div>
2018-07-24 14:20:53 +03:00
</div>
2019-06-18 13:47:21 +03:00
{{ / gh-uploader }}
2018-07-24 14:20:53 +03:00
</div>
</div>
2019-10-16 11:27:46 +03:00
<div class="gh-setting-header">Testing tools</div>
<div class="flex flex-column br3 shadow-1 bg-grouped-table pa5 mt2">
<div class="gh-setting-first gh-setting-last">
<div class="gh-setting-content">
<div class="gh-setting-title">Test email configuration</div>
<div class="gh-setting-desc">Send yourself a test email to make sure everything is working</div>
</div>
<div class="gh-setting-action">
2019-12-13 17:20:29 +03:00
{{ gh-task-button "Send" successText = "Sent" task = this .sendTestEmail class = "gh-btn gh-btn-hover-blue gh-btn-icon" }}
2019-10-16 11:27:46 +03:00
</div>
</div>
</div>
2015-06-13 17:34:09 +03:00
</section>
2014-12-01 14:39:11 +03:00
</section>
2015-11-18 13:50:48 +03:00
2019-12-13 17:20:29 +03:00
{{ # if this .showDeleteAllModal }}
2015-11-18 13:50:48 +03:00
{{ gh-fullscreen-modal "delete-all"
close=(action "toggleDeleteAllModal")
modifier="action wide"}}
2017-03-02 11:49:10 +03:00
{{ / if }}