|
@@ -84,18 +84,35 @@
|
|
<textarea v-model="editor.module.summary"></textarea>
|
|
<textarea v-model="editor.module.summary"></textarea>
|
|
</label>
|
|
</label>
|
|
|
|
|
|
- <label v-if="editor.module.config != 'b'"
|
|
|
|
- class="label">
|
|
|
|
- <span>Config: {{ editor.module.config }}</span>
|
|
|
|
|
|
+ <label class="label configs">
|
|
<table>
|
|
<table>
|
|
- <tr v-for="(key, value) in editor.module.config">
|
|
|
|
- <td>{{ key }}</td>
|
|
|
|
- <td><input v-model="{{ value }}" /></td>
|
|
|
|
|
|
+ <tr v-for="(value, key) in editor.module.config">
|
|
|
|
+ <td>[[key]]</td>
|
|
|
|
+ <td><input
|
|
|
|
+ v-model="editor.module.config[key]" /></td>
|
|
|
|
+ <td><span class="config-button"
|
|
|
|
+ @click="removeConfig([[key]])">
|
|
|
|
+ <img :src="icons.minus" alt="Remove">
|
|
|
|
+ </span>
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr >
|
|
|
|
+ <td><input id="newConfigKey"
|
|
|
|
+ value="Configuration" /></td>
|
|
|
|
+ <td><input id="newConfigValue"
|
|
|
|
+ value="Value" /></td>
|
|
|
|
+ <td><span class="config-button"
|
|
|
|
+ @click="addConfig">
|
|
|
|
+ <img :src="icons.plus" alt="Add">
|
|
|
|
+ </span>
|
|
|
|
+ </td>
|
|
</tr>
|
|
</tr>
|
|
</table>
|
|
</table>
|
|
</label>
|
|
</label>
|
|
|
|
|
|
- <!-- <div class="label-group">
|
|
|
|
|
|
+ <!-- Working on custom module library
|
|
|
|
+
|
|
|
|
+ <div class="label-group">
|
|
<label class="label">
|
|
<label class="label">
|
|
<span>Module ID:</span>
|
|
<span>Module ID:</span>
|
|
<input type="text" v-model="editor.module.moduleID">
|
|
<input type="text" v-model="editor.module.moduleID">
|
|
@@ -123,8 +140,8 @@
|
|
</div>
|
|
</div>
|
|
<div class="label-group is-mobile">
|
|
<div class="label-group is-mobile">
|
|
<div class="module" @click="newCustomModule">
|
|
<div class="module" @click="newCustomModule">
|
|
- Create Custom Module
|
|
|
|
- <span class="plus"><img :src="icons.plus" alt="Add"></span>
|
|
|
|
|
|
+ <span class="plus"><img :src="icons.plus" alt="Add"></span>
|
|
|
|
+ Create Custom Module
|
|
</div>
|
|
</div>
|
|
<div class="module-editor__empty">
|
|
<div class="module-editor__empty">
|
|
<small>Or click a module to start editing it.</small>
|
|
<small>Or click a module to start editing it.</small>
|
|
@@ -255,6 +272,14 @@
|
|
summary: "{{ module.summary }}",
|
|
summary: "{{ module.summary }}",
|
|
type: "{{ module.type }}",
|
|
type: "{{ module.type }}",
|
|
content: `{{ module.content | markdownify }}`,
|
|
content: `{{ module.content | markdownify }}`,
|
|
|
|
+ {% if module.config %}
|
|
|
|
+ config: {
|
|
|
|
+ {% for config in module.config %}
|
|
|
|
+ "{{ config[0] }}": "{{ config[1] }}"
|
|
|
|
+ {% unless forloop.last %}, {% endunless %}
|
|
|
|
+ {% endfor %}
|
|
|
|
+ },
|
|
|
|
+ {% endif %}
|
|
readonly: true,
|
|
readonly: true,
|
|
modules: []
|
|
modules: []
|
|
} {% unless forloop.last %}, {% endunless %}
|
|
} {% unless forloop.last %}, {% endunless %}
|