|
|
|
@ -57,7 +57,7 @@
|
|
|
|
|
<div |
|
|
|
|
:class="{ |
|
|
|
|
get_b: true, |
|
|
|
|
inactive: !siteChanged, |
|
|
|
|
inactive: inactiveSave, |
|
|
|
|
signing: signingSite, |
|
|
|
|
}" |
|
|
|
|
@click="$emit('save')" |
|
|
|
@ -96,11 +96,22 @@
|
|
|
|
|
</template> |
|
|
|
|
</Switcher> |
|
|
|
|
<TemplatesList |
|
|
|
|
@save-constructor="$emit('save-constructor')" |
|
|
|
|
:site-changed="siteChanged" |
|
|
|
|
:templates="templates" |
|
|
|
|
:active-template-name="activeTemplateName" |
|
|
|
|
:constructor-changed="constructorChanged" |
|
|
|
|
:site_rec_init="site_rec_init" |
|
|
|
|
:signing-site="signingSite" |
|
|
|
|
@change=" |
|
|
|
|
site_rec = $event; |
|
|
|
|
$emit('change', site_rec_patched); |
|
|
|
|
" |
|
|
|
|
@change-constructor=" |
|
|
|
|
constructor_params = $event; |
|
|
|
|
$emit('change-constructor', constructor_params); |
|
|
|
|
" |
|
|
|
|
@save="$emit('save', $event)" |
|
|
|
|
@save-constructor="$emit('save-constructor', $event)" |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
@ -141,7 +152,10 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
let site_rec = this.site_rec_init; |
|
|
|
|
if (!site_rec) site_rec = config.agorata_adnl; |
|
|
|
|
if (!site_rec) { |
|
|
|
|
site_rec = config.agorata_adnl; |
|
|
|
|
this.$emit("change", this.site_rec); |
|
|
|
|
} |
|
|
|
|
let constructor_site = |
|
|
|
|
site_rec.toLowerCase() === config.agorata_adnl.toLowerCase(); |
|
|
|
|
return { |
|
|
|
@ -196,6 +210,9 @@ export default {
|
|
|
|
|
templateId() { |
|
|
|
|
return this.templateId; |
|
|
|
|
}, |
|
|
|
|
inactiveSave() { |
|
|
|
|
return !this.siteChanged && this.site_rec !== null; |
|
|
|
|
}, |
|
|
|
|
link_types() { |
|
|
|
|
// return the types from link_types that are not in the constructor_params.contacts |
|
|
|
|
return link_types.filter( |
|
|
|
@ -233,6 +250,10 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
this.setTemplates(); |
|
|
|
|
if (this.site_rec === null) { |
|
|
|
|
this.site_rec = config.agorata_adnl; |
|
|
|
|
this.$emit("change", this.site_rec); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|