chore: improve type imports

This commit is contained in:
Dominik Pschenitschni 2022-06-23 03:08:35 +02:00
parent 797de0c543
commit af630d3b8c
No known key found for this signature in database
GPG key ID: B257AC0149F43A77
38 changed files with 92 additions and 94 deletions

View file

@ -15,7 +15,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {computed, watch, Ref} from 'vue' import {computed, watch, type Ref} from 'vue'
import {useRouter} from 'vue-router' import {useRouter} from 'vue-router'
import {useRouteQuery} from '@vueuse/router' import {useRouteQuery} from '@vueuse/router'
import {useStore} from 'vuex' import {useStore} from 'vuex'

View file

@ -60,7 +60,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {watch, computed, shallowRef, watchEffect, VNode, h} from 'vue' import {watch, computed, shallowRef, watchEffect, type VNode, h} from 'vue'
import {useStore} from 'vuex' import {useStore} from 'vuex'
import {useRoute, useRouter} from 'vue-router' import {useRoute, useRouter} from 'vue-router'
import {useEventListener} from '@vueuse/core' import {useEventListener} from '@vueuse/core'

View file

@ -143,7 +143,7 @@
import {ref, computed, onMounted, onBeforeMount} from 'vue' import {ref, computed, onMounted, onBeforeMount} from 'vue'
import {useStore} from 'vuex' import {useStore} from 'vuex'
import draggable from 'zhyswan-vuedraggable' import draggable from 'zhyswan-vuedraggable'
import {SortableEvent} from 'sortablejs' import type {SortableEvent} from 'sortablejs'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
import ListSettingsDropdown from '@/components/list/list-settings-dropdown.vue' import ListSettingsDropdown from '@/components/list/list-settings-dropdown.vue'
@ -154,9 +154,10 @@ import Logo from '@/components/home/Logo.vue'
import {MENU_ACTIVE} from '@/store/mutation-types' import {MENU_ACTIVE} from '@/store/mutation-types'
import {calculateItemPosition} from '@/helpers/calculateItemPosition' import {calculateItemPosition} from '@/helpers/calculateItemPosition'
import {getNamespaceTitle} from '@/helpers/getNamespaceTitle' import {getNamespaceTitle} from '@/helpers/getNamespaceTitle'
import {getListTitle} from '@/helpers/getListTitle'
import {useEventListener} from '@vueuse/core' import {useEventListener} from '@vueuse/core'
import NamespaceModel from '@/models/namespace' import type NamespaceModel from '@/models/namespace'
import ListModel from '@/models/list' import type ListModel from '@/models/list'
const drag = ref(false) const drag = ref(false)
const dragOptions = { const dragOptions = {

View file

@ -26,7 +26,7 @@ export default defineComponent({
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import {computed, useSlots, PropType} from 'vue' import {computed, useSlots, type PropType} from 'vue'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
const BUTTON_TYPES_MAP = Object.freeze({ const BUTTON_TYPES_MAP = Object.freeze({

View file

@ -84,7 +84,7 @@ import Dropdown from '@/components/misc/dropdown.vue'
import DropdownItem from '@/components/misc/dropdown-item.vue' import DropdownItem from '@/components/misc/dropdown-item.vue'
import TaskSubscription from '@/components/misc/subscription.vue' import TaskSubscription from '@/components/misc/subscription.vue'
import ListModel from '@/models/list' import ListModel from '@/models/list'
import SubscriptionModel from '@/models/subscription' import type SubscriptionModel from '@/models/subscription'
const props = defineProps({ const props = defineProps({
list: { list: {

View file

@ -186,8 +186,8 @@
<script lang="ts"> <script lang="ts">
import {defineComponent} from 'vue' import {defineComponent} from 'vue'
import DatepickerWithRange from '@/components/date/datepickerWithRange' import DatepickerWithRange from '@/components/date/datepickerWithRange.vue'
import Fancycheckbox from '../../input/fancycheckbox' import Fancycheckbox from '@/components/input/fancycheckbox.vue'
import {includesById} from '@/helpers/utils' import {includesById} from '@/helpers/utils'
import PrioritySelect from '@/components/tasks/partials/prioritySelect.vue' import PrioritySelect from '@/components/tasks/partials/prioritySelect.vue'

View file

@ -36,14 +36,14 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {PropType, ref, watch} from 'vue' import {type PropType, ref, watch} from 'vue'
import {useStore} from 'vuex' import {useStore} from 'vuex'
import ListService from '@/services/list' import ListService from '@/services/list'
import {getBlobFromBlurHash} from '@/helpers/getBlobFromBlurHash' import {getBlobFromBlurHash} from '@/helpers/getBlobFromBlurHash'
import {colorIsDark} from '@/helpers/color/colorIsDark' import {colorIsDark} from '@/helpers/color/colorIsDark'
import ListModel from '@/models/list' import type ListModel from '@/models/list'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'

View file

@ -9,7 +9,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {PropType} from 'vue' import type {PropType} from 'vue'
type Variants = 'default' | 'small' type Variants = 'default' | 'small'
defineProps({ defineProps({

View file

@ -7,7 +7,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {computed, PropType} from 'vue' import {computed, type PropType} from 'vue'
const TEXT_ALIGN_MAP = Object.freeze({ const TEXT_ALIGN_MAP = Object.freeze({
left: '', left: '',

View file

@ -32,7 +32,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {computed, shallowRef} from 'vue' import {computed, shallowRef, type PropType} from 'vue'
import {useI18n} from 'vue-i18n' import {useI18n} from 'vue-i18n'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
@ -43,16 +43,21 @@ import SubscriptionModel from '@/models/subscription'
import {success} from '@/message' import {success} from '@/message'
interface Props { const props = defineProps({
entity: string entity: String,
entityId: number entityId: Number,
subscription: SubscriptionModel | null isButton: {
type?: 'button' | 'dropdown' | null type: Boolean,
} default: true,
},
const props = withDefaults(defineProps<Props>(), { subscription: {
subscription: null, type: Object as PropType<SubscriptionModel>,
type: 'button', default: null,
},
type: {
type: String as PropType<'button' | 'dropdown' | 'null'>,
default: 'button',
},
}) })
const subscriptionEntity = computed<string | null>(() => props.subscription?.entity ?? null) const subscriptionEntity = computed<string | null>(() => props.subscription?.entity ?? null)

View file

@ -139,7 +139,7 @@ export default defineComponent({name: 'userTeamShare'})
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import {ref, reactive, computed, shallowReactive, ShallowReactive, Ref} from 'vue' import {ref, reactive, computed, shallowReactive, type ShallowReactive, type Ref} from 'vue'
import type {PropType} from 'vue' import type {PropType} from 'vue'
import {useStore} from 'vuex' import {useStore} from 'vuex'
import {useI18n} from 'vue-i18n' import {useI18n} from 'vue-i18n'

View file

@ -44,7 +44,7 @@
import {ref, watch, unref, shallowReactive} from 'vue' import {ref, watch, unref, shallowReactive} from 'vue'
import {useI18n} from 'vue-i18n' import {useI18n} from 'vue-i18n'
import {useStore} from 'vuex' import {useStore} from 'vuex'
import {tryOnMounted, debouncedWatch, useWindowSize, MaybeRef} from '@vueuse/core' import {tryOnMounted, debouncedWatch, useWindowSize, type MaybeRef} from '@vueuse/core'
import TaskService from '@/services/task' import TaskService from '@/services/task'
import QuickAddMagic from '@/components/tasks/partials/quick-add-magic.vue' import QuickAddMagic from '@/components/tasks/partials/quick-add-magic.vue'

View file

@ -175,12 +175,12 @@
import {defineComponent} from 'vue' import {defineComponent} from 'vue'
import VueDragResize from 'vue-drag-resize' import VueDragResize from 'vue-drag-resize'
import EditTask from './edit-task' import EditTask from './edit-task.vue'
import TaskService from '../../services/task' import TaskService from '../../services/task'
import TaskModel from '../../models/task' import TaskModel from '../../models/task'
import priorities from '../../models/constants/priorities' import priorities from '../../models/constants/priorities'
import PriorityLabel from './partials/priorityLabel' import PriorityLabel from './partials/priorityLabel.vue'
import TaskCollectionService from '../../services/taskCollection' import TaskCollectionService from '../../services/taskCollection'
import {mapState} from 'vuex' import {mapState} from 'vuex'
import Rights from '../../models/constants/rights.json' import Rights from '../../models/constants/rights.json'

View file

@ -148,7 +148,7 @@ import {defineComponent} from 'vue'
import AttachmentService from '../../../services/attachment' import AttachmentService from '../../../services/attachment'
import AttachmentModel from '../../../models/attachment' import AttachmentModel from '../../../models/attachment'
import User from '../../misc/user' import User from '@/components/misc/user.vue'
import {mapState} from 'vuex' import {mapState} from 'vuex'
import { useCopyToClipboard } from '@/composables/useCopyToClipboard' import { useCopyToClipboard } from '@/composables/useCopyToClipboard'

View file

@ -28,7 +28,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref, shallowReactive, watch, PropType} from 'vue' import {ref, shallowReactive, watch, type PropType} from 'vue'
import {useStore} from 'vuex' import {useStore} from 'vuex'
import {useI18n} from 'vue-i18n' import {useI18n} from 'vue-i18n'
@ -37,7 +37,7 @@ import Multiselect from '@/components/input/multiselect.vue'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
import {includesById} from '@/helpers/utils' import {includesById} from '@/helpers/utils'
import UserModel from '@/models/user' import type UserModel from '@/models/user'
import ListUserService from '@/services/listUsers' import ListUserService from '@/services/listUsers'
import {success} from '@/message' import {success} from '@/message'

View file

@ -39,7 +39,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {PropType, ref, computed, shallowReactive, watch} from 'vue' import {type PropType, ref, computed, shallowReactive, watch} from 'vue'
import {useStore} from 'vuex' import {useStore} from 'vuex'
import {useI18n} from 'vue-i18n' import {useI18n} from 'vue-i18n'

View file

@ -66,15 +66,15 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import {defineComponent} from 'vue' import {defineComponent, type PropType} from 'vue'
import {playPop} from '../../../helpers/playPop' import {playPop} from '../../../helpers/playPop'
import PriorityLabel from '../../../components/tasks/partials/priorityLabel' import PriorityLabel from '../../../components/tasks/partials/priorityLabel.vue'
import User from '../../../components/misc/user' import User from '../../../components/misc/user.vue'
import Done from '@/components/misc/Done.vue' import Done from '@/components/misc/Done.vue'
import Labels from '../../../components/tasks/partials/labels' import Labels from '../../../components/tasks/partials/labels.vue'
import ChecklistSummary from './checklist-summary' import ChecklistSummary from './checklist-summary.vue'
import {TASK_DEFAULT_COLOR} from '@/models/task' import TaskModel, {TASK_DEFAULT_COLOR} from '@/models/task'
import {colorIsDark} from '@/helpers/color/colorIsDark' import {colorIsDark} from '@/helpers/color/colorIsDark'
@ -95,6 +95,7 @@ export default defineComponent({
}, },
props: { props: {
task: { task: {
type: Object as PropType<TaskModel>,
required: true, required: true,
}, },
loading: { loading: {
@ -112,7 +113,7 @@ export default defineComponent({
}, },
methods: { methods: {
colorIsDark, colorIsDark,
async toggleTaskDone(task) { async toggleTaskDone(task: TaskModel) {
this.loadingInternal = true this.loadingInternal = true
try { try {
const done = !task.done const done = !task.done

View file

@ -11,8 +11,12 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import type LabelModel from '@/models/label'
import type { PropType } from 'vue'
defineProps({ defineProps({
labels: { labels: {
type: Array as PropType<LabelModel[]>,
required: true, required: true,
}, },
}) })

View file

@ -26,7 +26,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {PropType, ref, onMounted, watch} from 'vue' import {type PropType, ref, onMounted, watch} from 'vue'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
import Datepicker from '@/components/input/datepicker.vue' import Datepicker from '@/components/input/datepicker.vue'

View file

@ -99,16 +99,14 @@
import {defineComponent} from 'vue' import {defineComponent} from 'vue'
import TaskModel from '../../../models/task' import TaskModel from '../../../models/task'
import PriorityLabel from './priorityLabel' import PriorityLabel from './priorityLabel.vue'
import TaskService from '../../../services/task' import TaskService from '../../../services/task'
import Labels from './labels'
import User from '../../misc/user'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
import Fancycheckbox from '../../input/fancycheckbox' import Fancycheckbox from '../../input/fancycheckbox.vue'
import DeferTask from './defer-task' import DeferTask from './defer-task.vue'
import {closeWhenClickedOutside} from '@/helpers/closeWhenClickedOutside' import {closeWhenClickedOutside} from '@/helpers/closeWhenClickedOutside'
import {playPop} from '@/helpers/playPop' import {playPop} from '@/helpers/playPop'
import ChecklistSummary from './checklist-summary' import ChecklistSummary from './checklist-summary.vue'
export default defineComponent({ export default defineComponent({
name: 'singleTaskInList', name: 'singleTaskInList',

View file

@ -7,7 +7,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {PropType} from 'vue' import type {PropType} from 'vue'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
type Order = 'asc' | 'desc' | 'none' type Order = 'asc' | 'desc' | 'none'

View file

@ -1,7 +1,7 @@
import {createRandomID} from '@/helpers/randomId' import {createRandomID} from '@/helpers/randomId'
import {parseURL} from 'ufo' import {parseURL} from 'ufo'
interface Provider { export interface Provider {
name: string name: string
key: string key: string
authUrl: string authUrl: string

View file

@ -118,7 +118,7 @@ import {LOADING, LOADING_MODULE} from '@/store/mutation-types'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
import AsyncEditor from '@/components/input/AsyncEditor' import AsyncEditor from '@/components/input/AsyncEditor'
import ColorPicker from '@/components/input/colorPicker' import ColorPicker from '@/components/input/colorPicker.vue'
export default defineComponent({ export default defineComponent({
name: 'ListLabels', name: 'ListLabels',

View file

@ -38,7 +38,7 @@
import {defineComponent} from 'vue' import {defineComponent} from 'vue'
import LabelModel from '../../models/label' import LabelModel from '../../models/label'
import CreateEdit from '@/components/misc/create-edit.vue' import CreateEdit from '@/components/misc/create-edit.vue'
import ColorPicker from '../../components/input/colorPicker' import ColorPicker from '../../components/input/colorPicker.vue'
import {mapState} from 'vuex' import {mapState} from 'vuex'
import {LOADING, LOADING_MODULE} from '@/store/mutation-types' import {LOADING, LOADING_MODULE} from '@/store/mutation-types'

View file

@ -180,7 +180,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {toRef, computed, Ref} from 'vue' import {toRef, computed, type Ref} from 'vue'
import {useStorage} from '@vueuse/core' import {useStorage} from '@vueuse/core'
@ -197,7 +197,7 @@ import Pagination from '@/components/misc/pagination.vue'
import Popup from '@/components/misc/popup.vue' import Popup from '@/components/misc/popup.vue'
import {useTaskList} from '@/composables/taskList' import {useTaskList} from '@/composables/taskList'
import TaskModel from '@/models/task' import type TaskModel from '@/models/task'
const ACTIVE_COLUMNS_DEFAULT = { const ACTIVE_COLUMNS_DEFAULT = {
id: true, id: true,

View file

@ -12,8 +12,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import {defineComponent} from 'vue' export default {name: 'list-setting-archive'}
export default defineComponent({name: 'list-setting-archive'})
</script> </script>
<script setup lang="ts"> <script setup lang="ts">

View file

@ -23,11 +23,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import {defineComponent} from 'vue' export default {name: 'list-setting-share'}
export default defineComponent({
name: 'list-setting-share',
})
</script> </script>
<script lang="ts" setup> <script lang="ts" setup>

View file

@ -71,7 +71,7 @@ import {defineComponent} from 'vue'
import AbstractMigrationService from '@/services/migrator/abstractMigration' import AbstractMigrationService from '@/services/migrator/abstractMigration'
import AbstractMigrationFileService from '@/services/migrator/abstractMigrationFile' import AbstractMigrationFileService from '@/services/migrator/abstractMigrationFile'
import Logo from '@/assets/logo.svg?component' import Logo from '@/assets/logo.svg?component'
import Message from '@/components/misc/message' import Message from '@/components/misc/message.vue'
import {MIGRATORS} from './migrators' import {MIGRATORS} from './migrators'

View file

@ -43,11 +43,11 @@
<script lang="ts"> <script lang="ts">
import {defineComponent} from 'vue' import {defineComponent} from 'vue'
import Message from '@/components/misc/message' import Message from '@/components/misc/message.vue'
import NamespaceModel from '../../models/namespace' import NamespaceModel from '../../models/namespace'
import NamespaceService from '../../services/namespace' import NamespaceService from '../../services/namespace'
import CreateEdit from '@/components/misc/create-edit.vue' import CreateEdit from '@/components/misc/create-edit.vue'
import ColorPicker from '../../components/input/colorPicker' import ColorPicker from '../../components/input/colorPicker.vue'
export default defineComponent({ export default defineComponent({
name: 'NewNamespace', name: 'NewNamespace',

View file

@ -49,7 +49,7 @@ import {useStore} from 'vuex'
import {useRoute, useRouter} from 'vue-router' import {useRoute, useRouter} from 'vue-router'
import {useI18n} from 'vue-i18n' import {useI18n} from 'vue-i18n'
import TaskModel from '@/models/task' import type TaskModel from '@/models/task'
import {formatDate} from '@/helpers/time/formatDate' import {formatDate} from '@/helpers/time/formatDate'
import {setTitle} from '@/helpers/setTitle' import {setTitle} from '@/helpers/setTitle'

View file

@ -430,28 +430,28 @@ import TaskModel from '../../models/task'
import priorites from '../../models/constants/priorities.json' import priorites from '../../models/constants/priorities.json'
import rights from '../../models/constants/rights.json' import rights from '../../models/constants/rights.json'
import PrioritySelect from '../../components/tasks/partials/prioritySelect' import PrioritySelect from '../../components/tasks/partials/prioritySelect.vue'
import PercentDoneSelect from '../../components/tasks/partials/percentDoneSelect' import PercentDoneSelect from '../../components/tasks/partials/percentDoneSelect.vue'
import EditLabels from '../../components/tasks/partials/editLabels' import EditLabels from '../../components/tasks/partials/editLabels.vue'
import EditAssignees from '../../components/tasks/partials/editAssignees' import EditAssignees from '../../components/tasks/partials/editAssignees.vue'
import Attachments from '../../components/tasks/partials/attachments' import Attachments from '../../components/tasks/partials/attachments.vue'
import RelatedTasks from '../../components/tasks/partials/relatedTasks' import RelatedTasks from '../../components/tasks/partials/relatedTasks.vue'
import RepeatAfter from '../../components/tasks/partials/repeatAfter' import RepeatAfter from '../../components/tasks/partials/repeatAfter.vue'
import Reminders from '../../components/tasks/partials/reminders' import Reminders from '../../components/tasks/partials/reminders.vue'
import Comments from '../../components/tasks/partials/comments' import Comments from '../../components/tasks/partials/comments.vue'
import ListSearch from '../../components/tasks/partials/listSearch' import ListSearch from '../../components/tasks/partials/listSearch.vue'
import description from '@/components/tasks/partials/description.vue' import description from '@/components/tasks/partials/description.vue'
import ColorPicker from '../../components/input/colorPicker' import ColorPicker from '../../components/input/colorPicker.vue'
import heading from '@/components/tasks/partials/heading.vue' import heading from '@/components/tasks/partials/heading.vue'
import Datepicker from '@/components/input/datepicker.vue' import Datepicker from '@/components/input/datepicker.vue'
import BaseButton from '@/components/base/BaseButton' import BaseButton from '@/components/base/BaseButton.vue'
import {playPop} from '@/helpers/playPop' import {playPop} from '@/helpers/playPop'
import TaskSubscription from '@/components/misc/subscription.vue' import TaskSubscription from '@/components/misc/subscription.vue'
import {CURRENT_LIST} from '@/store/mutation-types' import {CURRENT_LIST} from '@/store/mutation-types'
import {uploadFile} from '@/helpers/attachments' import {uploadFile} from '@/helpers/attachments'
import ChecklistSummary from '../../components/tasks/partials/checklist-summary' import ChecklistSummary from '../../components/tasks/partials/checklist-summary.vue'
import CreatedUpdated from '@/components/tasks/partials/createdUpdated' import CreatedUpdated from '@/components/tasks/partials/createdUpdated.vue'
import { setTitle } from '@/helpers/setTitle' import { setTitle } from '@/helpers/setTitle'
function scrollIntoView(el) { function scrollIntoView(el) {

View file

@ -167,10 +167,10 @@ import Editor from '@/components/input/AsyncEditor'
import {useStore} from 'vuex' import {useStore} from 'vuex'
import TeamService from '../../services/team' import TeamService from '../../services/team'
import TeamModel from '../../models/team' import type TeamModel from '../../models/team'
import TeamMemberService from '../../services/teamMember' import TeamMemberService from '../../services/teamMember'
import TeamMemberModel from '../../models/teamMember' import type TeamMemberModel from '../../models/teamMember'
import UserModel from '../../models/user' import type UserModel from '../../models/user'
import UserService from '../../services/user' import UserService from '../../services/user'
import Rights from '../../models/constants/rights.json' import Rights from '../../models/constants/rights.json'

View file

@ -109,10 +109,10 @@ import {mapState} from 'vuex'
import {HTTPFactory} from '@/http-common' import {HTTPFactory} from '@/http-common'
import {LOADING} from '@/store/mutation-types' import {LOADING} from '@/store/mutation-types'
import {getErrorText} from '@/message' import {getErrorText} from '@/message'
import Message from '@/components/misc/message' import Message from '@/components/misc/message.vue'
import {redirectToProvider} from '../../helpers/redirectToProvider' import {redirectToProvider} from '../../helpers/redirectToProvider'
import {getLastVisited, clearLastVisited} from '../../helpers/saveLastVisited' import {getLastVisited, clearLastVisited} from '../../helpers/saveLastVisited'
import Password from '@/components/input/password' import Password from '@/components/input/password.vue'
export default defineComponent({ export default defineComponent({
components: { components: {

View file

@ -10,9 +10,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import {defineComponent} from 'vue' export default { name: 'Auth' }
export default defineComponent({ name: 'Auth' })
</script> </script>
<script setup lang="ts"> <script setup lang="ts">

View file

@ -74,9 +74,9 @@ import {ref, reactive, toRaw, computed, onBeforeMount} from 'vue'
import router from '@/router' import router from '@/router'
import {store} from '@/store' import {store} from '@/store'
import Message from '@/components/misc/message' import Message from '@/components/misc/message.vue'
import {isEmail} from '@/helpers/isEmail' import {isEmail} from '@/helpers/isEmail'
import Password from '@/components/input/password' import Password from '@/components/input/password.vue'
// FIXME: use the `beforeEnter` hook of vue-router // FIXME: use the `beforeEnter` hook of vue-router
// Check if the user is already logged in, if so, redirect them to the homepage // Check if the user is already logged in, if so, redirect them to the homepage

View file

@ -49,7 +49,7 @@ import {ref, reactive} from 'vue'
import PasswordResetModel from '@/models/passwordReset' import PasswordResetModel from '@/models/passwordReset'
import PasswordResetService from '@/services/passwordReset' import PasswordResetService from '@/services/passwordReset'
import Message from '@/components/misc/message' import Message from '@/components/misc/message.vue'
// Not sure if this instance needs a shalloRef at all // Not sure if this instance needs a shalloRef at all
const passwordResetService = reactive(new PasswordResetService()) const passwordResetService = reactive(new PasswordResetService())

View file

@ -77,7 +77,7 @@ import {success} from '@/message'
import BaseButton from '@/components/base/BaseButton.vue' import BaseButton from '@/components/base/BaseButton.vue'
import Message from '@/components/misc/message.vue' import Message from '@/components/misc/message.vue'
import CaldavTokenService from '@/services/caldavToken' import CaldavTokenService from '@/services/caldavToken'
import CaldavTokenModel from '@/models/caldavToken' import type CaldavTokenModel from '@/models/caldavToken'
const copy = useCopyToClipboard() const copy = useCopyToClipboard()

View file

@ -83,11 +83,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import {defineComponent} from 'vue' export default { name: 'user-settings-deletion' }
export default defineComponent({
name: 'user-settings-deletion',
})
</script> </script>
<script setup lang="ts"> <script setup lang="ts">