Skip to content

Commit

Permalink
Change global component names
Browse files Browse the repository at this point in the history
  • Loading branch information
José Luis Pereira committed Jul 19, 2022
1 parent 5e3282e commit 9cc1ee0
Show file tree
Hide file tree
Showing 26 changed files with 23 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<script setup>
import { useRouter } from 'vue-router'
import Autocomplete from '@/components/Autocomplete/Autocomplete.vue'
import Autocomplete from '@/components/Autocomplete/Autocomplete.global.vue'
const router = useRouter()
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/components/Gallery/GalleryThumbnail.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<template>
<div
class="bg-white dark:bg-gray-800 flex flex-col justify-center cursor-pointer w-24 h-20 dark:border-gray-600 rounded border box-border"
class="bg-white dark:bg-gray-800 flex flex-col justify-center cursor-pointer w-24 max-h-20 h-20 dark:border-gray-600 rounded border-2"
:title="title"
>
<img
class="max-h-24 max-w-24 h-24 w-24 object-cover rounded"
class="max-h-20 max-w-24 h-20 w-24 object-cover rounded"
:src="image.thumb"
>
</div>
Expand Down
2 changes: 2 additions & 0 deletions src/components/Gallery/GalleryThumbnailList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
</template>

<script setup>
import GalleryThumbnail from './GalleryThumbnail.vue'
defineProps({
images: {
type: Array,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
</svg>
</button>
</template>

<script setup>
</script>
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</div>
<button
type="button"
class="p-2 cursor-pointer text-white opacity-50 "
class="p-2 cursor-pointer text-white opacity-50 "
>
<IconClose />
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ import ImageDepictions from './ImageDepictions.vue'
import ImageViewerCounter from './ImageViewerCounter.vue'
import ControlNextImage from './ControlImageNext.vue'
import ControlPreviousImage from './ControlImagePrevious.vue'
import GalleryThumbnailList from '@/components/Gallery/GalleryThumbnailList.vue'
import ImageToolbar from './ImageToolbar.vue'
const props = defineProps({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<span>{{ currentImage + 1 }}/{{ totalImages }}</span>
<span class="p-2 text-white opacity-50">{{ currentImage + 1 }}/{{ totalImages }}</span>
</template>

<script setup>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion src/components/TreeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
<script setup>
import TreeView from '@/components/TreeView.vue'
import SynonymList from './SynonymList.vue'
import ButtonExpand from '@/components/Button/ButtonExpand.vue'
import OtuService from '@/modules/otus/services/OtuService';
import { ref, watch } from 'vue'
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/components/globalComponents.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const components = import.meta.globEager('@/components/**/*.vue')
const components = import.meta.globEager('@/components/**/*.global.vue')

const register = app => {
Object.entries(components).forEach(([path, definition]) => {
const componentName = path.split('/').pop().replace(/\.\w+$/, '')
const componentName = path.split('/').pop().replace(/\.global.\w+$/, '')

app.component(componentName, definition.default)
})
Expand Down
23 changes: 10 additions & 13 deletions src/modules/otus/components/Map.vue
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
<template>
<VCard>

<VSpinner v-if="isLoading" />
<VMap
ref="map"
class="h-96 max-h-96"
:zoom="zoom"
:geojson="geojson"
@geojson:ready="isLoading = false"
/>

<VSpinner v-if="isLoading" />
<VMap
ref="map"
class="h-96 max-h-96"
:zoom="zoom"
:geojson="geojson"
@geojson:ready="isLoading = false"
/>
</VCard>
</template>

<script setup>
import { ref, watch } from "vue";
import VMap from '@/components/Map/VMap.vue'
import OtuService from "../services/OtuService";
import { ref, watch } from "vue"
import OtuService from "../services/OtuService"
const props = defineProps({
otuId: {
Expand Down
6 changes: 2 additions & 4 deletions src/modules/otus/views/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@

<TabMenu
v-if="tabs.length"
class="m-[-1px] print:hidden">
class="m-[-1px] print:hidden"
>
<TabItem
v-for="({ name, label }) in tabs"
:key="name"
Expand Down Expand Up @@ -82,10 +83,7 @@
import { ref, watch } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import TabMenu from '@/components/Tab/TabMenu.vue'
import TabItem from '@/components/Tab/TabItem.vue'
import Breadcrumb from '@/components/Breadcrumb.vue'
import Autocomplete from '@/components/Autocomplete/Autocomplete.vue'
import TaxaInfo from '@/modules/otus/components/TaxaInfo.vue'
import useChildrenRoutes from '../composables/useChildrenRoutes'
import OtuService from '../services/OtuService'
Expand Down

0 comments on commit 9cc1ee0

Please sign in to comment.