mirror of
https://github.com/documize/community.git
synced 2025-07-19 13:19:43 +02:00
parent
51a25adbdb
commit
5aaa9f874d
2 changed files with 29 additions and 25 deletions
|
@ -30,6 +30,9 @@ export default Component.extend({
|
|||
let page = this.get('page');
|
||||
return `plantuml-preview-${page.id}`;
|
||||
}),
|
||||
emptyDiagram: computed('diagramText', function () {
|
||||
return _.isEmpty(this.get('diagramText'));
|
||||
}),
|
||||
|
||||
generatePreview() {
|
||||
this.set('waiting', true);
|
||||
|
|
|
@ -10,7 +10,10 @@
|
|||
<div class="form-group">
|
||||
<label><a href="http://plantuml.com/" target="_blank">PlantUML Diagram</a></label>
|
||||
<Ui::UiSpacer @size="200" />
|
||||
{{focus-textarea value=diagramText rows=30 id=editorId class="diagram-editor form-control mousetrap"}}
|
||||
{{#if emptyDiagram}}
|
||||
<div>
|
||||
<Ui::UiSpacer @size="100" />
|
||||
<p>Insert sample diagrams:</p>
|
||||
<p>
|
||||
{{ui/ui-button color=constants.Color.Gray light=true label="Sequence" onClick=(action "onInsertSequence")}}
|
||||
|
@ -22,12 +25,10 @@
|
|||
{{ui/ui-button color=constants.Color.Gray light=true label="State" onClick=(action "onInsertState")}}
|
||||
</p>
|
||||
</div>
|
||||
{{focus-textarea value=diagramText rows=30 id=editorId class="diagram-editor form-control mousetrap"}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Ui::UiSpacer @size="200" />
|
||||
|
||||
{{ui/ui-button color=constants.Color.Yellow light=true label=previewButtonCaption onClick=(action "onPreview")}}
|
||||
|
||||
<Ui::UiSpacer @size="200" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue