diff --git a/src/components/pages/OpenProductions.vue b/src/components/pages/OpenProductions.vue index 5c58da952..50d6cb27b 100644 --- a/src/components/pages/OpenProductions.vue +++ b/src/components/pages/OpenProductions.vue @@ -1,6 +1,6 @@ @@ -166,7 +157,6 @@ import { buildNameIndex } from '@/lib/indexing' import colors from '@/lib/colors' import preferences from '@/lib/preferences' -import EditProductionModal from '@/components/modals/EditProductionModal.vue' import SearchField from '@/components/widgets/SearchField.vue' import Spinner from '@/components/widgets/Spinner.vue' @@ -174,7 +164,6 @@ export default { name: 'open-productions', components: { - EditProductionModal, SearchField, Spinner, XIcon @@ -184,21 +173,11 @@ export default { return { isContributions: true, filteredProductions: [], - search: '', - errors: { - edit: false - }, - loading: { - edit: false - }, - modals: { - isNewDisplayed: false - } + search: '' } }, mounted() { - this.$refs['search-field']?.focus() this.filteredProductions = this.openProductions this.productionIndex = buildNameIndex(this.openProductions) this.isContributions = @@ -222,7 +201,7 @@ export default { ...mapActions(['newProduction']), generateAvatar(production) { - const firstLetter = production.name.length > 0 ? production.name[0] : 'P' + const firstLetter = production.name?.[0] || 'P' return firstLetter.toUpperCase() }, @@ -285,31 +264,12 @@ export default { return `/api/pictures/thumbnails/projects/${production.id}.png` }, - confirmEditProduction(form) { - this.errors.edit = false - this.loading.edit = true - this.newProduction(form) - .then(() => { - this.modals.isNewDisplayed = false - this.loading.edit = false - }) - .catch(err => { - console.error(err) - this.loading.edit = false - this.errors.edit = true - }) - }, - newProductionPage() { this.$router.push({ name: 'new-production' }) }, - hideNewModal() { - this.modals.isNewDisplayed = false - }, - onSearchChange(search) { if (search === '') { this.filteredProductions = this.openProductions @@ -324,8 +284,6 @@ export default { } }, - watch: {}, - metaInfo() { return { title: `${this.$t('productions.home.title')} - Kitsu` @@ -475,14 +433,15 @@ a.secondary:hover { } .open-productions-header { + gap: 0 1em; margin-top: 4em; margin-bottom: 1em; max-width: 800px; margin-left: auto; margin-right: auto; - img { - margin-left: 3px; + .logo { + margin: 0 3px; } } @@ -583,10 +542,11 @@ a.secondary:hover { } .open-productions-box { - padding: 0; + padding: 1em 0; } - .flexrow { + .open-productions-header, + .social-contributions .flexrow { flex-direction: column; } } diff --git a/src/components/pages/ProductionSchedule.vue b/src/components/pages/ProductionSchedule.vue index 73035b23f..685212106 100644 --- a/src/components/pages/ProductionSchedule.vue +++ b/src/components/pages/ProductionSchedule.vue @@ -10,7 +10,9 @@ wrapper-class="datepicker" input-class="date-input input short" :language="locale" - :disabled-dates="{ days: [6, 0] }" + :disabled-dates="{ + from: selectedEndDate + }" :monday-first="true" format="yyyy-MM-dd" v-model="selectedStartDate" @@ -24,7 +26,9 @@ wrapper-class="datepicker" input-class="date-input input short" :language="locale" - :disabled-dates="{ days: [6, 0] }" + :disabled-dates="{ + to: selectedStartDate + }" :monday-first="true" format="yyyy-MM-dd" v-model="selectedEndDate" diff --git a/src/components/pages/production/NewProduction.vue b/src/components/pages/production/NewProduction.vue index 59652dab4..a541e8234 100644 --- a/src/components/pages/production/NewProduction.vue +++ b/src/components/pages/production/NewProduction.vue @@ -127,7 +127,6 @@ :placeholder="startDatePlaceholder" :language="locale" :disabled-dates="{ - days: [6, 0], from: productionToCreate.settings.dateEnd }" :monday-first="true" @@ -140,7 +139,6 @@ input-class="is-small date-input input" :language="locale" :disabled-dates="{ - days: [6, 0], to: productionToCreate.settings.dateStart }" :placeholder="endDatePlaceholder" diff --git a/src/components/pages/production/ProductionParameters.vue b/src/components/pages/production/ProductionParameters.vue index 77e4f8d4e..e727ff089 100644 --- a/src/components/pages/production/ProductionParameters.vue +++ b/src/components/pages/production/ProductionParameters.vue @@ -20,6 +20,9 @@