mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
fix(vue): Begin implementing template filler component
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
This commit is contained in:
parent
8ac706a520
commit
a7addcb88f
3 changed files with 65 additions and 11 deletions
|
|
@ -4,33 +4,76 @@
|
|||
-->
|
||||
|
||||
<template>
|
||||
<NcDialog name="Fill Template">
|
||||
{{ fields }}
|
||||
</NcDialog>
|
||||
<NcModal>
|
||||
<div class="template-field-modal__content">
|
||||
<form @submit.prevent.stop="onSubmit">
|
||||
<h3>{{ t('files', 'Fill template fields') }}</h3>
|
||||
|
||||
<!-- break these out into template field components -->
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="template-field-modal__buttons">
|
||||
<NcButton aria-label="Submit button"
|
||||
type="primary">
|
||||
{{ t('files', 'Submit') }}
|
||||
</NcButton>
|
||||
</div>
|
||||
</NcModal>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
import { NcDialog } from '@nextcloud/vue'
|
||||
import { NcModal, NcButton } from '@nextcloud/vue'
|
||||
import { translate as t } from '@nextcloud/l10n'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'TemplateFiller',
|
||||
|
||||
components: {
|
||||
NcDialog,
|
||||
NcModal,
|
||||
NcButton,
|
||||
},
|
||||
|
||||
props: {
|
||||
fields: {
|
||||
type: Array,
|
||||
default: [],
|
||||
default: () => [],
|
||||
},
|
||||
},
|
||||
|
||||
methods: {},
|
||||
data() {
|
||||
return {
|
||||
someText: '',
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
t,
|
||||
onSubmit() {},
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
$modal-margin: calc(var(--default-grid-baseline) * 6);
|
||||
|
||||
.template-field-modal__content {
|
||||
padding: $modal-margin;
|
||||
|
||||
& h3 {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.template-field-modal__field {
|
||||
margin: calc(var(--default-grid-baseline) * 4) 0;
|
||||
}
|
||||
|
||||
.template-field-modal__buttons {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin: $modal-margin;
|
||||
margin-top: 0;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
<template>
|
||||
<div />
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'TemplateTextField',
|
||||
})
|
||||
</script>
|
||||
|
|
@ -214,7 +214,7 @@ export default defineComponent({
|
|||
|
||||
if (this.selectedTemplate?.fields) {
|
||||
spawnDialog(TemplateFiller, {
|
||||
fields: this.selectedTemplate?.fields
|
||||
fields: this.selectedTemplate?.fields,
|
||||
})
|
||||
|
||||
return
|
||||
|
|
|
|||
Loading…
Reference in a new issue