Skip to content

Commit

Permalink
Merge pull request #1481 from frankrousseau/master
Browse files Browse the repository at this point in the history
Breakdown improvements
  • Loading branch information
NicoPennec authored Jul 9, 2024
2 parents c7c2740 + aad11a6 commit ed3f1b7
Show file tree
Hide file tree
Showing 17 changed files with 659 additions and 207 deletions.
4 changes: 4 additions & 0 deletions src/components/mixins/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ export const searchMixin = {
if (this.applySearch) this.applySearch(searchQuery.search_query)
},

removeSearchQuery(searchQuery) {
this.removeShotSearch(searchQuery).catch(console.error)
},

focusSearchField(options) {
if (this.searchField) {
this.searchField.focus(options)
Expand Down
2 changes: 1 addition & 1 deletion src/components/modals/EditAssetModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<text-field
ref="nameField"
:label="$t('assets.fields.name')"
v-model="form.name"
v-model.trim="form.name"
@enter="runConfirmation"
v-focus
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/modals/EditEditModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<text-field
ref="nameField"
:label="$t('edits.fields.name')"
v-model="form.name"
v-model.trim="form.name"
@enter="runConfirmation"
v-focus
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/modals/EditEpisodeModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<text-field
ref="nameField"
:label="$t('episodes.fields.name')"
v-model="form.name"
v-model.trim="form.name"
@enter="runConfirmation"
v-focus
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/modals/EditSequenceModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<text-field
ref="nameField"
:label="$t('sequences.fields.name')"
v-model="form.name"
v-model.trim="form.name"
@enter="runConfirmation"
v-focus
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/modals/EditShotModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<text-field
ref="nameField"
:label="$t('shots.fields.name')"
v-model="form.name"
v-model.trim="form.name"
@enter="runConfirmation"
v-focus
/>
Expand Down
11 changes: 10 additions & 1 deletion src/components/modals/PreviewModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
>
<div class="modal-background" @click="$emit('cancel')"></div>
<div class="new-window">
<a class="mr1" :href="previewDlPath" v-if="previewFileId">
<arrow-down-icon />
</a>
<a target="_blank" :href="previewPath">
<arrow-up-right-icon />
</a>
Expand All @@ -24,13 +27,14 @@ import { modalMixin } from '@/components/modals/base_modal'
import { getDownloadAttachmentPath } from '@/lib/path'
import { ArrowUpRightIcon } from 'vue-feather-icons'
import { ArrowDownIcon, ArrowUpRightIcon } from 'vue-feather-icons'
export default {
name: 'preview-modal',
mixins: [modalMixin],
components: {
ArrowDownIcon,
ArrowUpRightIcon
},
Expand Down Expand Up @@ -68,6 +72,11 @@ export default {
return getDownloadAttachmentPath(this.attachment)
}
return ''
},
previewDlPath() {
const previewId = this.previewFileId
return `/api/pictures/originals/preview-files/${previewId}/download`
}
},
Expand Down
Loading

0 comments on commit ed3f1b7

Please sign in to comment.