1
0
Fork 0

Update wizard composer

Dieser Commit ist enthalten in:
Angus McLeod 2018-04-15 12:49:12 +10:00
Ursprung 9d8424a35f
Commit 11c85270a7
8 geänderte Dateien mit 13 neuen und 15 gelöschten Zeilen

Datei anzeigen

@ -182,12 +182,6 @@ export default Ember.Component.extend({
_mouseTrap: null, _mouseTrap: null,
showPreview: false, showPreview: false,
@computed('placeholder')
placeholderTranslated(placeholder) {
if (placeholder) return I18n.t(placeholder);
return null;
},
_readyNow() { _readyNow() {
this.set('ready', true); this.set('ready', true);

Datei anzeigen

@ -66,7 +66,8 @@ export default {
const src = this.get('step.banner'); const src = this.get('step.banner');
if (!src) return; if (!src) return;
if (src.indexOf('/uploads/') > -1 || src.indexOf('/plugins/') > -1) { const localPaths = ['uploads', 'plugins', 'images'];
if (localPaths.indexOf(src.split('/')[1]) > -1) {
return getUrl(src); return getUrl(src);
} else { } else {
return getUrl(`/images/wizard/${src}`); return getUrl(`/images/wizard/${src}`);

Datei anzeigen

@ -47,7 +47,7 @@
</div> </div>
{{conditional-loading-spinner condition=loading}} {{conditional-loading-spinner condition=loading}}
{{textarea tabindex=tabindex value=value class="d-editor-input" placeholder=placeholderTranslated}} {{textarea tabindex=tabindex value=value class="d-editor-input" placeholder=placeholder}}
</div> </div>
{{/if}} {{/if}}
</div> </div>

Datei anzeigen

@ -1,2 +1,2 @@
{{wizard-editor showPreview=showPreview value=field.value placeholder=field.placeholder}}
{{d-button class='wizard-btn primary' action='togglePreview' label=togglePreviewLabel}} {{d-button class='wizard-btn primary' action='togglePreview' label=togglePreviewLabel}}
{{wizard-editor showPreview=showPreview value=field.value}}

Datei anzeigen

@ -46,15 +46,15 @@
.d-editor-textarea-wrapper, .d-editor-textarea-wrapper,
.d-editor-preview-wrapper { .d-editor-preview-wrapper {
background-color: $secondary;
border: 1px solid #919191;
flex: 1; flex: 1;
} }
.d-editor-textarea-wrapper { .d-editor-textarea-wrapper {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background-color: $secondary;
position: relative; position: relative;
border: 1px solid #919191;
textarea { textarea {
background: transparent; background: transparent;

Datei anzeigen

@ -37,6 +37,10 @@
margin-right: 7px; margin-right: 7px;
} }
ul li {
margin: 10px 0;
}
.image-container { .image-container {
padding: 0 20px; padding: 0 20px;
margin: 50px 0; margin: 50px 0;
@ -167,7 +171,6 @@
&> .field-description { &> .field-description {
margin-top: 0; margin-top: 0;
margin-left: 10px;
order: 2; order: 2;
} }
} }

Datei anzeigen

@ -161,8 +161,8 @@ en:
none: "There is no wizard here." none: "There is no wizard here."
wizard_composer: wizard_composer:
show_preview: "Show Post Preview" show_preview: "Preview Your Post"
hide_preview: "Hide Post Preview" hide_preview: "Hide Preview"
quote_post_title: "Quote whole post" quote_post_title: "Quote whole post"
bold_label: "B" bold_label: "B"
bold_title: "Strong" bold_title: "Strong"

Datei anzeigen

@ -118,7 +118,7 @@ end
def description def description
return object.description if object.description return object.description if object.description
I18n.t("#{object.key || i18n_key}.description", default: '', base_url: Discourse.base_url) PrettyText.cook(I18n.t("#{object.key || i18n_key}.description", default: '', base_url: Discourse.base_url))
end end
end end