Skip to content

Commit

Permalink
🎨 Sort imports
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidZhang73 committed Jan 18, 2024
1 parent 7f132d4 commit 3df1d97
Show file tree
Hide file tree
Showing 33 changed files with 49 additions and 13 deletions.
2 changes: 2 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ import { useFavicon, usePreferredDark } from '@vueuse/core'
import { storeToRefs } from 'pinia'
import { useQuasar } from 'quasar'
import { computed } from 'vue'
import Layout from '~/components/Layout.vue'
import { useAnnotation } from '~/hooks/annotation.js'
import utils from '~/libs/utils.js'
import { useAnnotationStore } from '~/store/annotation.js'
import { useConfigurationStore } from '~/store/configuration.js'
import { usePreferenceStore } from '~/store/preference.js'
import { useMainStore } from './store/index.js'
const mainStore = useMainStore()
Expand Down
1 change: 1 addition & 0 deletions src/components/ActionLabelThumbnailPreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@

<script setup>
import { computed, ref } from 'vue'
import { useAnnotationStore } from '~/store/annotation.js'
import { useConfigurationStore } from '~/store/configuration.js'
import { useMainStore } from '~/store/index.js'
Expand Down
1 change: 1 addition & 0 deletions src/components/ActionThumbnailPreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@

<script setup>
import { computed, ref } from 'vue'
import utils from '~/libs/utils.js'
import { useAnnotationStore } from '~/store/annotation.js'
import { useConfigurationStore } from '~/store/configuration.js'
Expand Down
2 changes: 2 additions & 0 deletions src/components/Drawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@

<script setup>
import { storeToRefs } from 'pinia'
import VersionBadge from '~/components/VersionBadge.vue'
import { useAnnotationStore } from '~/store/annotation.js'
import { useMainStore } from '~/store/index.js'
import DrawerAnnotationControl from './DrawerAnnotationControl.vue'
import DrawerVideoControl from './DrawerVideoControl.vue'
Expand Down
1 change: 1 addition & 0 deletions src/components/DrawerAnnotationControl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

<script setup>
import { storeToRefs } from 'pinia'
import { useAnnotation } from '~/hooks/annotation.js'
import { useAnnotationStore } from '~/store/annotation.js'
import { useMainStore } from '~/store/index.js'
Expand Down
1 change: 1 addition & 0 deletions src/components/DrawerVideoControl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@

<script setup>
import { storeToRefs } from 'pinia'
import { useVideo } from '~/hooks/video.js'
import utils from '~/libs/utils.js'
import { useAnnotationStore } from '~/store/annotation.js'
Expand Down
2 changes: 2 additions & 0 deletions src/components/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,14 @@
<script setup>
import { storeToRefs } from 'pinia'
import { computed } from 'vue'
import VideoLoaderV1 from '~/components/VideoLoaderV1.vue'
import VideoLoaderV2 from '~/components/VideoLoaderV2.vue'
import { useAnnotationStore } from '~/store/annotation.js'
import { useConfigurationStore } from '~/store/configuration.js'
import { useMainStore } from '~/store/index.js'
import { usePreferenceStore } from '~/store/preference.js'
import Drawer from './Drawer.vue'
const mainStore = useMainStore()
Expand Down
3 changes: 1 addition & 2 deletions src/components/MonacoCodeEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
<script setup>
import 'monaco-editor/esm/vs/editor/editor.all.js'
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api'
import 'monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.js'
import 'monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js'
import 'monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.js'
import 'monaco-editor/esm/vs/language/json/monaco.contribution'
import { useQuasar } from 'quasar'
import { onMounted, onUnmounted, ref, watch } from 'vue'
Expand Down
1 change: 1 addition & 0 deletions src/components/VideoLoaderV1.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

<script setup>
import { nextTick } from 'vue'
import utils from '~/libs/utils.js'
import { useAnnotationStore } from '~/store/annotation.js'
import { usePreferenceStore } from '~/store/preference.js'
Expand Down
1 change: 1 addition & 0 deletions src/components/VideoLoaderV2.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<script setup>
import { onMounted, watch } from 'vue'
import utils from '~/libs/utils.js'
import { useAnnotationStore } from '~/store/annotation.js'
import { usePreferenceStore } from '~/store/preference.js'
Expand Down
1 change: 1 addition & 0 deletions src/hooks/annotation.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { copyToClipboard, exportFile } from 'quasar'
import { ref } from 'vue'

import utils from '~/libs/utils.js'
import { useAnnotationStore } from '~/store/annotation.js'
import { useConfigurationStore } from '~/store/configuration.js'
Expand Down
3 changes: 2 additions & 1 deletion src/hooks/frameIndicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export const frameIndicator = () => {
const markerWidth = width * markerWidthUnit
bgImageList.push(colorList[i])
bgPositionList.push(
`${(10000 * frame) / (annotationStore.video.frames - 1) / (100 - markerWidth) - 0.5 * markerWidthUnit}% ${12 + positionHeightOffset
`${(10000 * frame) / (annotationStore.video.frames - 1) / (100 - markerWidth) - 0.5 * markerWidthUnit}% ${
12 + positionHeightOffset
}px`
)
bgSizeList.push(`${markerWidth}% ${HEIGHT_MARKER}px`)
Expand Down
2 changes: 1 addition & 1 deletion src/libs/annotationlib.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* Library for annotations
*/

import deepClone from 'lodash.clonedeep'

import { useAnnotationStore } from '~/store/annotation.js'
import { useConfigurationStore } from '~/store/configuration.js'
import { usePreferenceStore } from '~/store/preference.js'
Expand Down
1 change: 1 addition & 0 deletions src/libs/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Utils
*/
import { Dialog, Notify } from 'quasar'

import { useAnnotationStore } from '~/store/annotation.js'

export default {
Expand Down
3 changes: 2 additions & 1 deletion src/pages/annotation/Annotation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@
import ActionTable from '~/pages/annotation/ActionTable.vue'
import CanvasPanel from '~/pages/annotation/CanvasPanel.vue'
import ControlPanel from '~/pages/annotation/ControlPanel.vue'
import AnnotationSkeleton from './components/AnnotationSkeleton.vue'
import { useAnnotationStore } from '~/store/annotation.js'
import { useConfigurationStore } from '~/store/configuration.js'
import { useMainStore } from '~/store/index.js'
import { usePreferenceStore } from '~/store/preference.js'
import KeyframePanel from './KeyframePanel.vue'
import AnnotationSkeleton from './components/AnnotationSkeleton.vue'
const annotationStore = useAnnotationStore()
const configurationStore = useConfigurationStore()
Expand Down
5 changes: 3 additions & 2 deletions src/pages/annotation/CanvasPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,14 @@

<script setup>
import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'
import { ObjectAnnotation, RegionAnnotation, SkeletonAnnotation } from '~/libs/annotationlib.js'
import utils from '~/libs/utils.js'
import FilmStrip from '~/pages/annotation/components/FilmStrip.vue'
import VideoPlayer from '~/pages/annotation/components/VideoPlayer.vue'
import ObjectTable from '~/pages/annotation/ObjectTable.vue'
import RegionTable from '~/pages/annotation/RegionTable.vue'
import SkeletonTable from '~/pages/annotation/SkeletonTable.vue'
import FilmStrip from '~/pages/annotation/components/FilmStrip.vue'
import VideoPlayer from '~/pages/annotation/components/VideoPlayer.vue'
import { useAnnotationStore } from '~/store/annotation.js'
import { useConfigurationStore } from '~/store/configuration.js'
import { useMainStore } from '~/store/index.js'
Expand Down
1 change: 1 addition & 0 deletions src/pages/annotation/ControlPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@

<script setup>
import { computed, watch } from 'vue'
import { ObjectAnnotation, RegionAnnotation, SkeletonAnnotation } from '~/libs/annotationlib.js'
import utils from '~/libs/utils.js'
import { useAnnotationStore } from '~/store/annotation.js'
Expand Down
1 change: 1 addition & 0 deletions src/pages/annotation/ObjectTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

<script setup>
import { ref } from 'vue'
import TableBase from '~/pages/annotation/components/TableBase.vue'
const props = defineProps({
Expand Down
1 change: 1 addition & 0 deletions src/pages/annotation/RegionTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@

<script setup>
import { ref } from 'vue'
import TableBase from '~/pages/annotation/components/TableBase.vue'
const props = defineProps({
Expand Down
1 change: 1 addition & 0 deletions src/pages/annotation/SkeletonTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@

<script setup>
import { ref } from 'vue'
import TableBase from '~/pages/annotation/components/TableBase.vue'
const props = defineProps({
Expand Down
1 change: 1 addition & 0 deletions src/pages/annotation/components/KeyframeTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
<script setup>
import JSZip from 'jszip'
import { exportFile } from 'quasar'
import utils from '~/libs/utils.js'
import { useAnnotationStore } from '~/store/annotation.js'
import { usePreferenceStore } from '~/store/preference.js'
Expand Down
1 change: 1 addition & 0 deletions src/pages/annotation/components/TableBase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@

<script setup>
import { computed, ref } from 'vue'
import utils from '~/libs/utils.js'
import { useAnnotationStore } from '~/store/annotation.js'
import { useConfigurationStore } from '~/store/configuration.js'
Expand Down
3 changes: 2 additions & 1 deletion src/pages/configuration/ActionLabelTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@
<script setup>
import { storeToRefs } from 'pinia'
import { computed } from 'vue'
import ActionLabelThumbnailPreview from '~/components/ActionLabelThumbnailPreview.vue'
import utils from '~/libs/utils.js'
import TableBase from '~/pages/configuration/components/TableBase.vue'
import { useConfigurationStore } from '~/store/configuration.js'
import ActionLabelThumbnailPreview from '~/components/ActionLabelThumbnailPreview.vue'
// Action
const columnList = [
Expand Down
4 changes: 3 additions & 1 deletion src/pages/configuration/Configuration.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@

<script setup>
import { exportFile } from 'quasar'
import { useConfigurationStore } from '~/store/configuration.js'
import utils from '~/libs/utils.js'
import { useConfigurationStore } from '~/store/configuration.js'
import ActionLabelTable from './ActionLabelTable.vue'
import ObjectLabelTable from './ObjectLabelTable.vue'
import SkeletonTypeTable from './SkeletonTypeTable.vue'
Expand Down
1 change: 1 addition & 0 deletions src/pages/configuration/ObjectLabelTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

<script setup>
import { storeToRefs } from 'pinia'
import utils from '~/libs/utils.js'
import TableBase from '~/pages/configuration/components/TableBase.vue'
import { useConfigurationStore } from '~/store/configuration.js'
Expand Down
2 changes: 2 additions & 0 deletions src/pages/configuration/SkeletonTypeTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,11 @@
<script setup>
import { storeToRefs } from 'pinia'
import { computed, nextTick } from 'vue'
import utils from '~/libs/utils.js'
import TableBase from '~/pages/configuration/components/TableBase.vue'
import { useConfigurationStore } from '~/store/configuration.js'
import SkeletonPreview from './components/SkeletonPreview.vue'
// Skeleton
Expand Down
1 change: 1 addition & 0 deletions src/pages/configuration/components/SkeletonPreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

<script setup>
import { onMounted, ref, watch } from 'vue'
import { SkeletonAnnotation } from '~/libs/annotationlib.js'
import { useConfigurationStore } from '~/store/configuration.js'
Expand Down
3 changes: 2 additions & 1 deletion src/pages/configuration/components/TableBase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,10 @@
<script setup>
import { storeToRefs } from 'pinia'
import { computed, ref } from 'vue'
import TableEditor from '~/pages/configuration/components/TableEditor.vue'
import { useConfigurationStore } from '~/store/configuration.js'
import { useMainStore } from '~/store/index.js'
import TableEditor from '~/pages/configuration/components/TableEditor.vue'
const props = defineProps({
title: {
Expand Down
4 changes: 3 additions & 1 deletion src/pages/configuration/components/TableEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@
</template>

<script setup>
import { ref, defineAsyncComponent } from 'vue'
import { defineAsyncComponent, ref } from 'vue'
import utils from '~/libs/utils.js'
const MonacoCodeEditor = defineAsyncComponent(() => import('~/components/MonacoCodeEditor.vue'))
const props = defineProps({
Expand Down
1 change: 1 addition & 0 deletions src/pages/preference/Preference.vue
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@

<script setup>
import { storeToRefs } from 'pinia'
import { usePreferenceStore } from '~/store/preference.js'
const preferenceStore = usePreferenceStore()
Expand Down
3 changes: 2 additions & 1 deletion src/router/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { createRouter, createWebHashHistory } from 'vue-router'

import Annotation from '~/pages/annotation/Annotation.vue'
import { useAnnotationStore } from '~/store/annotation.js'
import { useConfigurationStore } from '~/store/configuration.js'
import Annotation from '~/pages/annotation/Annotation.vue'

const router = createRouter({
history: createWebHashHistory(),
Expand Down
3 changes: 2 additions & 1 deletion src/store/annotation.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import deepClone from 'lodash.clonedeep'
import { defineStore } from 'pinia'
import { computed, reactive, toRefs, watch } from 'vue'

import { ActionAnnotation, ObjectAnnotation, RegionAnnotation, SkeletonAnnotation } from '~/libs/annotationlib.js'
import utils from '~/libs/utils.js'
import { useMainStore } from '~/store/index.js'
import { usePreferenceStore } from '~/store/preference.js'
import { ActionAnnotation, ObjectAnnotation, RegionAnnotation, SkeletonAnnotation } from '~/libs/annotationlib.js'

const DEFAULT_ANNOTATION = {
video: {
Expand Down
1 change: 1 addition & 0 deletions src/store/configuration.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import deepClone from 'lodash.clonedeep'
import { defineStore } from 'pinia'
import { reactive, toRefs, watch } from 'vue'

import { validateActionLabelData, validateObjectLabelData, validateSkeletonTypeData } from './validation.js'

const OBJECT_LABEL_LS_KEY = 'objectLabelData'
Expand Down

0 comments on commit 3df1d97

Please sign in to comment.