-
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[shots] Allow to set frames from previews
- Loading branch information
1 parent
59c4e00
commit aadc798
Showing
6 changed files
with
191 additions
and
1 deletion.
There are no files selected for viewing
121 changes: 121 additions & 0 deletions
121
src/components/modals/SetFramesFromTaskTypePreviewsModal.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
<template> | ||
<div | ||
:class="{ | ||
modal: true, | ||
'is-active': active | ||
}" | ||
> | ||
<div class="modal-background" @click="$emit('cancel')"></div> | ||
|
||
<div class="modal-content"> | ||
<div class="box content"> | ||
<h1 class="title"> | ||
{{ $t('shots.get_frames_from_previews') }} | ||
</h1> | ||
|
||
<p class="description"> | ||
{{ $t('shots.get_frames_from_previews_description') }} | ||
</p> | ||
|
||
<combobox-task-type | ||
:task-type-list="productionShotTaskTypes" | ||
:placeholder="$t('task_types.select_task_type')" | ||
add-placeholder | ||
v-model="taskTypeId" | ||
/> | ||
|
||
<modal-footer | ||
:error-text="$t('shots.get_frames_from_previews_error')" | ||
:is-error="isError" | ||
:is-loading="isLoading" | ||
:is-disabled="!isFormFilled" | ||
@confirm="confirm" | ||
@cancel="$emit('cancel')" | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { mapGetters, mapActions } from 'vuex' | ||
import { modalMixin } from '@/components/modals/base_modal' | ||
import ComboboxTaskType from '@/components/widgets/ComboboxTaskType' | ||
import ModalFooter from '@/components/modals/ModalFooter' | ||
export default { | ||
name: 'get-frames-from-previews-modal', | ||
mixins: [modalMixin], | ||
components: { | ||
ComboboxTaskType, | ||
ModalFooter | ||
}, | ||
props: { | ||
active: { | ||
type: Boolean, | ||
default: false | ||
}, | ||
isLoading: { | ||
type: Boolean, | ||
default: false | ||
}, | ||
isError: { | ||
type: Boolean, | ||
default: false | ||
}, | ||
errorText: { | ||
type: String, | ||
default: '' | ||
} | ||
}, | ||
data() { | ||
return { | ||
taskTypeId: null | ||
} | ||
}, | ||
mounted() { | ||
this.reset() | ||
}, | ||
computed: { | ||
...mapGetters(['productionShotTaskTypes']), | ||
isFormFilled() { | ||
return this.taskTypeId !== null && this.taskTypeId !== '' | ||
} | ||
}, | ||
methods: { | ||
...mapActions([]), | ||
addValue() {}, | ||
confirm() { | ||
return this.$emit('confirm', this.taskTypeId) | ||
}, | ||
reset() { | ||
this.taskType = null | ||
} | ||
}, | ||
watch: { | ||
active() { | ||
if (this.active) { | ||
this.reset() | ||
} | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
p.description { | ||
font-size: 1.2rem; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters