2020-03-09 05:07:45 -04:00
|
|
|
<script>
|
|
|
|
import BlobHeaderEdit from '~/blob/components/blob_edit_header.vue';
|
|
|
|
import BlobContentEdit from '~/blob/components/blob_edit_content.vue';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
BlobHeaderEdit,
|
|
|
|
BlobContentEdit,
|
|
|
|
},
|
2020-04-01 05:07:45 -04:00
|
|
|
inheritAttrs: false,
|
2020-03-09 05:07:45 -04:00
|
|
|
props: {
|
|
|
|
fileName: {
|
|
|
|
type: String,
|
2020-04-01 05:07:45 -04:00
|
|
|
required: false,
|
|
|
|
default: '',
|
2020-03-09 05:07:45 -04:00
|
|
|
},
|
|
|
|
},
|
2020-04-01 05:07:45 -04:00
|
|
|
methods: {
|
|
|
|
emitFileNameChange(newFileName) {
|
|
|
|
this.$emit('name-change', newFileName);
|
|
|
|
},
|
2020-03-09 05:07:45 -04:00
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<template>
|
|
|
|
<div class="form-group file-editor">
|
|
|
|
<label>{{ s__('Snippets|File') }}</label>
|
|
|
|
<div class="file-holder snippet">
|
2020-04-01 05:07:45 -04:00
|
|
|
<blob-header-edit :value="fileName" @input="emitFileNameChange" />
|
|
|
|
<blob-content-edit v-bind="$attrs" :file-name="fileName" v-on="$listeners" />
|
2020-03-09 05:07:45 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|