Skip to content

Commit

Permalink
Renaming single-worded components
Browse files Browse the repository at this point in the history
Linting.

Refs #156
  • Loading branch information
The4thLaw committed Mar 26, 2024
1 parent 3beb7ac commit fd4738c
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 43 deletions.
2 changes: 1 addition & 1 deletion source/demyo-vue-frontend/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ declare module 'vue' {
AppSnackbar: typeof import('./src/components/AppSnackbar.vue')['default']
AppTask: typeof import('./src/components/AppTask.vue')['default']
AppTasks: typeof import('./src/components/AppTasks.vue')['default']
Autocomplete: typeof import('./src/components/Autocomplete.vue')['default']
AutoComplete: typeof import('./src/components/AutoComplete.vue')['default']
CardTextIndex: typeof import('./src/components/CardTextIndex.vue')['default']
CurrencyField: typeof import('./src/components/CurrencyField.vue')['default']
DnDImage: typeof import('./src/components/DnDImage.vue')['default']
Expand Down
2 changes: 1 addition & 1 deletion source/demyo-vue-frontend/src/components/Autocomplete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<script>
export default {
name: 'Autocomplete',
name: 'AutoComplete',
props: {
// Using v-bind="$attrs" means we can avoid re-declaring everything we want to pass as-is to v-autocomplete
Expand Down
26 changes: 12 additions & 14 deletions source/demyo-vue-frontend/src/pages/albums/AlbumEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<SectionCard :subtitle="$t('fieldset.Album.identification')">
<v-row>
<v-col cols="12">
<Autocomplete
<AutoComplete
v-model="album.series.id" :items="allSeries" label-key="field.Album.series"
clearable
/>
Expand Down Expand Up @@ -36,7 +36,7 @@
<v-text-field v-model="album.originalTitle" :label="$t('field.Album.originalTitle')" />
</v-col>
<v-col cols="12">
<Autocomplete
<AutoComplete
v-model="album.tags" :items="allTags" :loading="allTagsLoading"
multiple clearable
label-key="field.Album.tags" refreshable @refresh="refreshTags"
Expand All @@ -48,14 +48,14 @@
<SectionCard :subtitle="$t('fieldset.Album.publishing')">
<v-row>
<v-col cols="12" md="6">
<Autocomplete
<AutoComplete
v-model="album.publisher.id" :items="allPublishers"
label-key="field.Album.publisher" required :rules="rules.publisher"
refreshable @refresh="refreshPublishers" @input="loadCollections"
/>
</v-col>
<v-col cols="12" md="6">
<Autocomplete
<AutoComplete
v-model="album.collection.id" :items="relatedCollections"
label-key="field.Album.collection" clearable
refreshable @refresh="loadCollections"
Expand All @@ -67,31 +67,31 @@
<SectionCard :subtitle="$t('fieldset.Album.authoring')">
<v-row>
<v-col cols="12" md="6">
<Autocomplete
<AutoComplete
v-model="album.writers" :items="allAuthors" label-key="field.Album.writers"
multiple refreshable @refresh="refreshAuthors"
/>
</v-col>
<v-col cols="12" md="6">
<Autocomplete
<AutoComplete
v-model="album.artists" :items="allAuthors" label-key="field.Album.artists"
multiple refreshable @refresh="refreshAuthors"
/>
</v-col>
<v-col cols="12" md="6">
<Autocomplete
<AutoComplete
v-model="album.colorists" :items="allAuthors" label-key="field.Album.colorists"
multiple refreshable @refresh="refreshAuthors"
/>
</v-col>
<v-col cols="12" md="6">
<Autocomplete
<AutoComplete
v-model="album.inkers" :items="allAuthors" label-key="field.Album.inkers"
multiple refreshable @refresh="refreshAuthors"
/>
</v-col>
<v-col cols="12" md="6">
<Autocomplete
<AutoComplete
v-model="album.translators" :items="allAuthors" label-key="field.Album.translators"
multiple refreshable @refresh="refreshAuthors"
/>
Expand Down Expand Up @@ -140,7 +140,7 @@
<SectionCard :subtitle="$t('fieldset.Album.format')">
<v-row>
<v-col cols="12" md="6">
<Autocomplete
<AutoComplete
v-model="album.binding.id" :items="allBindings"
label-key="field.Album.binding" clearable
/>
Expand Down Expand Up @@ -221,13 +221,13 @@
<SectionCard :subtitle="$t('fieldset.Album.images')">
<v-row>
<v-col cols="12" md="6">
<Autocomplete
<AutoComplete
v-model="album.cover.id" :items="allImages" :loading="allImagesLoading"
label-key="field.Album.cover" refreshable @refresh="refreshImages"
/>
</v-col>
<v-col cols="12" md="6">
<Autocomplete
<AutoComplete
v-model="album.images" :items="allImages" :loading="allImagesLoading"
:multiple="true"
label-key="field.Album.images" refreshable @refresh="refreshImages"
Expand All @@ -242,7 +242,6 @@
</template>

<script>
import Autocomplete from '@/components/Autocomplete.vue'
import CurrencyField from '@/components/CurrencyField.vue'
import FormActions from '@/components/FormActions.vue'
import PriceManagement from '@/components/PriceManagement.vue'
Expand All @@ -263,7 +262,6 @@ export default {
name: 'AlbumEdit',
components: {
Autocomplete,
CurrencyField,
FormActions,
PriceManagement,
Expand Down
4 changes: 1 addition & 3 deletions source/demyo-vue-frontend/src/pages/authors/AuthorEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<v-text-field v-model="author.deathDate" :label="$t('field.Author.deathDate')" type="date" />
</v-col>
<v-col cols="12" md="6">
<Autocomplete
<AutoComplete
v-model="author.portrait.id" :items="allImages" :loading="allImagesLoading"
label-key="field.Author.portrait" refreshable @refresh="refreshImages"
/>
Expand Down Expand Up @@ -50,7 +50,6 @@
</template>

<script>
import Autocomplete from '@/components/Autocomplete.vue'
import FormActions from '@/components/FormActions.vue'
import SectionCard from '@/components/SectionCard.vue'
import { tipTapExtensions } from '@/helpers/fields'
Expand All @@ -63,7 +62,6 @@ export default {
name: 'AuthorEdit',
components: {
Autocomplete,
FormActions,
SectionCard
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
/>
</v-col>
<v-col cols="12" md="4">
<Autocomplete
<AutoComplete
v-model="collection.publisher.id" :items="allPublishers" :loading="allPublishersLoading"
:rules="rules.publisher" label-key="field.Collection.publisher"
refreshable @refresh="refreshPublishers"
/>
</v-col>
<v-col cols="12" md="4">
<Autocomplete
<AutoComplete
v-model="collection.logo.id" :items="allImages" :loading="allImagesLoading"
label-key="field.Collection.logo" refreshable @refresh="refreshImages"
/>
Expand Down Expand Up @@ -51,7 +51,6 @@
</template>

<script>
import Autocomplete from '@/components/Autocomplete.vue'
import FormActions from '@/components/FormActions.vue'
import SectionCard from '@/components/SectionCard.vue'
import { tipTapExtensions } from '@/helpers/fields'
Expand All @@ -65,7 +64,6 @@ export default {
name: 'CollectionEdit',
components: {
Autocomplete,
FormActions,
SectionCard
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@
<SectionCard :subtitle="$t('fieldset.Derivative.origin')">
<v-row>
<v-col cols="12" md="6">
<Autocomplete
<AutoComplete
v-model="derivative.series.id" :items="allSeries" label-key="field.Derivative.series"
clearable :rules="rules.albumOrSeries" @input="loadAlbums(); $refs.form.validate()"
/>
</v-col>
<v-col cols="12" md="6">
<Autocomplete
<AutoComplete
v-model="derivative.album.id" :items="relatedAlbums" :loading="relatedAlbumsLoading"
label-key="field.Derivative.album" refreshable clearable
:rules="rules.albumOrSeries" @input="$refs.form.validate()" @refresh="loadAlbums"
/>
</v-col>
<v-col cols="12" md="6">
<Autocomplete
<AutoComplete
v-model="derivative.artist.id" :items="allAuthors" :loading="allAuthorsLoading"
label-key="field.Derivative.artist" refreshable @refresh="refreshAuthors"
/>
</v-col>
<v-col cols="12" md="6">
<Autocomplete
<AutoComplete
v-model="derivative.source.id" :items="allSources" label-key="field.Derivative.source"
/>
</v-col>
Expand All @@ -33,7 +33,7 @@
<SectionCard :subtitle="$t('fieldset.Derivative.format')">
<v-row>
<v-col cols="12" md="6">
<Autocomplete
<AutoComplete
v-model="derivative.type.id" :items="allTypes"
label-key="field.Derivative.type" :rules="rules.type"
/>
Expand Down Expand Up @@ -102,7 +102,7 @@
/>
</v-col>
<v-col cols="12" md="6">
<Autocomplete
<AutoComplete
v-model="derivative.images" :items="allImages" :loading="allImagesLoading"
multiple clearable
label-key="field.Derivative.images" refreshable @refresh="refreshImages"
Expand Down Expand Up @@ -130,7 +130,6 @@
</template>

<script>
import Autocomplete from '@/components/Autocomplete.vue'
import CurrencyField from '@/components/CurrencyField.vue'
import FormActions from '@/components/FormActions.vue'
import PriceManagement from '@/components/PriceManagement.vue'
Expand All @@ -149,7 +148,6 @@ export default {
name: 'DerivativeEdit',
components: {
Autocomplete,
CurrencyField,
FormActions,
PriceManagement,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import SectionCard from '@/components/SectionCard.vue'
import { apiRoot } from '@/myenv'
export default {
name: 'ExportPage',
name: 'ManageExport',
components: {
FormActions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import service from '@/services/management-service'
import { useUiStore } from '@/stores/ui'
export default {
name: 'ImportPage',
name: 'ManageImport',
components: {
FormActions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/>
</v-col>
<v-col cols="12" md="6">
<Autocomplete
<AutoComplete
v-model="publisher.logo.id" :items="allImages" :loading="allImagesLoading"
label-key="field.Publisher.logo" refreshable @refresh="refreshImages"
/>
Expand Down Expand Up @@ -44,7 +44,6 @@
</template>

<script>
import Autocomplete from '@/components/Autocomplete.vue'
import FormActions from '@/components/FormActions.vue'
import SectionCard from '@/components/SectionCard.vue'
import { tipTapExtensions } from '@/helpers/fields'
Expand All @@ -57,7 +56,6 @@ export default {
name: 'PublisherEdit',
components: {
Autocomplete,
FormActions,
SectionCard
},
Expand Down
4 changes: 1 addition & 3 deletions source/demyo-vue-frontend/src/pages/series/SeriesEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/>
</v-col>
<v-col cols="12">
<Autocomplete
<AutoComplete
v-model="series.relatedSeries" :items="allSeries" multiple
label-key="field.Series.relatedSeries"
/>
Expand Down Expand Up @@ -62,7 +62,6 @@
</template>

<script>
import Autocomplete from '@/components/Autocomplete.vue'
import FormActions from '@/components/FormActions.vue'
import SectionCard from '@/components/SectionCard.vue'
import { tipTapExtensions } from '@/helpers/fields'
Expand All @@ -74,7 +73,6 @@ export default {
name: 'SeriesEdit',
components: {
Autocomplete,
FormActions,
SectionCard
},
Expand Down
2 changes: 1 addition & 1 deletion source/demyo-vue-frontend/src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const routes = [
{
path: '/about',
name: 'about',
component: () => import('@/pages/About.vue')
component: () => import('@/pages/AboutDemyo.vue')
}
]

Expand Down
4 changes: 2 additions & 2 deletions source/demyo-vue-frontend/src/router/manage.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ export default [
{
path: '/manage/export',
name: 'Export',
component: () => import('@/pages/manage/Export.vue')
component: () => import('@/pages/manage/ManageExport.vue')
},

{
path: '/manage/import',
name: 'Import',
component: () => import('@/pages/manage/Import.vue')
component: () => import('@/pages/manage/ManageImport.vue')
}
]
2 changes: 1 addition & 1 deletion source/demyo-vue-frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default ({ mode }: ConfigEnv): UserConfig => {
}

if (id.includes('Edit.vue') || id.includes('ImageDetect.vue')
|| id.includes('Import.vue') || id.includes('Export.vue')) {
|| id.includes('ManageImport.vue') || id.includes('ManageExport.vue')) {
return '@demyo-manage'
}

Expand Down

0 comments on commit fd4738c

Please sign in to comment.