Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breakdown improvements #1481

Merged
merged 12 commits into from
Jul 9, 2024
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