-
-
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.
Merge pull request #1474 from frankrousseau/master
[shots] Allow to set frames from previews
- Loading branch information
Showing
6 changed files
with
192 additions
and
1 deletion.
There are no files selected for viewing
119 changes: 119 additions & 0 deletions
119
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,119 @@ | ||
<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: 'set-frames-from-task-type-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([]), | ||
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