Skip to content

Commit

Permalink
ignore generated sidebar d.ts files
Browse files Browse the repository at this point in the history
  • Loading branch information
qwqcode committed Apr 8, 2024
1 parent 80c5d63 commit 104e208
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 92 deletions.
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ docs/swagger/swagger.json
docs/swagger/swagger.yaml
pnpm-lock.yaml
ui/artalk/src/api/v2.ts
ui/artalk-sidebar/auto-imports.d.ts
ui/artalk-sidebar/components.d.ts
130 changes: 59 additions & 71 deletions ui/artalk-sidebar/auto-imports.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,81 +5,69 @@
// Generated by unplugin-auto-import
export {}
declare global {
const EffectScope: (typeof import('vue'))['EffectScope']
const computed: (typeof import('vue'))['computed']
const createApp: (typeof import('vue'))['createApp']
const customRef: (typeof import('vue'))['customRef']
const defineAsyncComponent: (typeof import('vue'))['defineAsyncComponent']
const defineComponent: (typeof import('vue'))['defineComponent']
const EffectScope: typeof import('vue')['EffectScope']
const computed: typeof import('vue')['computed']
const createApp: typeof import('vue')['createApp']
const customRef: typeof import('vue')['customRef']
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
const defineComponent: typeof import('vue')['defineComponent']
const defineLoader: (typeof import('vue-router/auto'))['defineLoader']
const definePage: (typeof import('unplugin-vue-router/runtime'))['definePage']
const effectScope: (typeof import('vue'))['effectScope']
const getCurrentInstance: (typeof import('vue'))['getCurrentInstance']
const getCurrentScope: (typeof import('vue'))['getCurrentScope']
const h: (typeof import('vue'))['h']
const inject: (typeof import('vue'))['inject']
const isProxy: (typeof import('vue'))['isProxy']
const isReactive: (typeof import('vue'))['isReactive']
const isReadonly: (typeof import('vue'))['isReadonly']
const isRef: (typeof import('vue'))['isRef']
const markRaw: (typeof import('vue'))['markRaw']
const nextTick: (typeof import('vue'))['nextTick']
const onActivated: (typeof import('vue'))['onActivated']
const onBeforeMount: (typeof import('vue'))['onBeforeMount']
const onBeforeRouteLeave: (typeof import('vue-router/auto'))['onBeforeRouteLeave']
const onBeforeRouteUpdate: (typeof import('vue-router/auto'))['onBeforeRouteUpdate']
const onBeforeUnmount: (typeof import('vue'))['onBeforeUnmount']
const onBeforeUpdate: (typeof import('vue'))['onBeforeUpdate']
const onDeactivated: (typeof import('vue'))['onDeactivated']
const onErrorCaptured: (typeof import('vue'))['onErrorCaptured']
const onMounted: (typeof import('vue'))['onMounted']
const onRenderTracked: (typeof import('vue'))['onRenderTracked']
const onRenderTriggered: (typeof import('vue'))['onRenderTriggered']
const onScopeDispose: (typeof import('vue'))['onScopeDispose']
const onServerPrefetch: (typeof import('vue'))['onServerPrefetch']
const onUnmounted: (typeof import('vue'))['onUnmounted']
const onUpdated: (typeof import('vue'))['onUpdated']
const provide: (typeof import('vue'))['provide']
const reactive: (typeof import('vue'))['reactive']
const readonly: (typeof import('vue'))['readonly']
const ref: (typeof import('vue'))['ref']
const resolveComponent: (typeof import('vue'))['resolveComponent']
const shallowReactive: (typeof import('vue'))['shallowReactive']
const shallowReadonly: (typeof import('vue'))['shallowReadonly']
const shallowRef: (typeof import('vue'))['shallowRef']
const toRaw: (typeof import('vue'))['toRaw']
const toRef: (typeof import('vue'))['toRef']
const toRefs: (typeof import('vue'))['toRefs']
const toValue: (typeof import('vue'))['toValue']
const triggerRef: (typeof import('vue'))['triggerRef']
const unref: (typeof import('vue'))['unref']
const useAttrs: (typeof import('vue'))['useAttrs']
const useCssModule: (typeof import('vue'))['useCssModule']
const useCssVars: (typeof import('vue'))['useCssVars']
const useI18n: (typeof import('vue-i18n'))['useI18n']
const useRoute: (typeof import('vue-router/auto'))['useRoute']
const useRouter: (typeof import('vue-router/auto'))['useRouter']
const useSlots: (typeof import('vue'))['useSlots']
const watch: (typeof import('vue'))['watch']
const watchEffect: (typeof import('vue'))['watchEffect']
const watchPostEffect: (typeof import('vue'))['watchPostEffect']
const watchSyncEffect: (typeof import('vue'))['watchSyncEffect']
const definePage: typeof import('unplugin-vue-router/runtime')['definePage']
const effectScope: typeof import('vue')['effectScope']
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
const getCurrentScope: typeof import('vue')['getCurrentScope']
const h: typeof import('vue')['h']
const inject: typeof import('vue')['inject']
const isProxy: typeof import('vue')['isProxy']
const isReactive: typeof import('vue')['isReactive']
const isReadonly: typeof import('vue')['isReadonly']
const isRef: typeof import('vue')['isRef']
const markRaw: typeof import('vue')['markRaw']
const nextTick: typeof import('vue')['nextTick']
const onActivated: typeof import('vue')['onActivated']
const onBeforeMount: typeof import('vue')['onBeforeMount']
const onBeforeRouteLeave: typeof import('vue-router/auto')['onBeforeRouteLeave']
const onBeforeRouteUpdate: typeof import('vue-router/auto')['onBeforeRouteUpdate']
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
const onDeactivated: typeof import('vue')['onDeactivated']
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
const onMounted: typeof import('vue')['onMounted']
const onRenderTracked: typeof import('vue')['onRenderTracked']
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
const onScopeDispose: typeof import('vue')['onScopeDispose']
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
const onUnmounted: typeof import('vue')['onUnmounted']
const onUpdated: typeof import('vue')['onUpdated']
const provide: typeof import('vue')['provide']
const reactive: typeof import('vue')['reactive']
const readonly: typeof import('vue')['readonly']
const ref: typeof import('vue')['ref']
const resolveComponent: typeof import('vue')['resolveComponent']
const shallowReactive: typeof import('vue')['shallowReactive']
const shallowReadonly: typeof import('vue')['shallowReadonly']
const shallowRef: typeof import('vue')['shallowRef']
const toRaw: typeof import('vue')['toRaw']
const toRef: typeof import('vue')['toRef']
const toRefs: typeof import('vue')['toRefs']
const toValue: typeof import('vue')['toValue']
const triggerRef: typeof import('vue')['triggerRef']
const unref: typeof import('vue')['unref']
const useAttrs: typeof import('vue')['useAttrs']
const useCssModule: typeof import('vue')['useCssModule']
const useCssVars: typeof import('vue')['useCssVars']
const useI18n: typeof import('vue-i18n')['useI18n']
const useRoute: typeof import('vue-router/auto')['useRoute']
const useRouter: typeof import('vue-router/auto')['useRouter']
const useSlots: typeof import('vue')['useSlots']
const watch: typeof import('vue')['watch']
const watchEffect: typeof import('vue')['watchEffect']
const watchPostEffect: typeof import('vue')['watchPostEffect']
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
}
// for type re-export
declare global {
// @ts-ignore
export type {
Component,
ComponentPublicInstance,
ComputedRef,
ExtractDefaultPropTypes,
ExtractPropTypes,
ExtractPublicPropTypes,
InjectionKey,
PropType,
Ref,
VNode,
WritableComputedRef,
} from 'vue'
export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
import('vue')
}
34 changes: 17 additions & 17 deletions ui/artalk-sidebar/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ export {}

declare module 'vue' {
export interface GlobalComponents {
FileUploader: (typeof import('./src/components/FileUploader.vue'))['default']
Header: (typeof import('./src/components/Header.vue'))['default']
ItemTextEditor: (typeof import('./src/components/ItemTextEditor.vue'))['default']
LoadingLayer: (typeof import('./src/components/LoadingLayer.vue'))['default']
LogTerminal: (typeof import('./src/components/LogTerminal.vue'))['default']
PageEditor: (typeof import('./src/components/PageEditor.vue'))['default']
Pagination: (typeof import('./src/components/Pagination.vue'))['default']
PreferenceArr: (typeof import('./src/components/PreferenceArr.vue'))['default']
PreferenceGrp: (typeof import('./src/components/PreferenceGrp.vue'))['default']
PreferenceItem: (typeof import('./src/components/PreferenceItem.vue'))['default']
RouterLink: (typeof import('vue-router'))['RouterLink']
RouterView: (typeof import('vue-router'))['RouterView']
SiteCreate: (typeof import('./src/components/SiteCreate.vue'))['default']
SiteEditor: (typeof import('./src/components/SiteEditor.vue'))['default']
SiteSwitcher: (typeof import('./src/components/SiteSwitcher.vue'))['default']
Tab: (typeof import('./src/components/Tab.vue'))['default']
UserEditor: (typeof import('./src/components/UserEditor.vue'))['default']
FileUploader: typeof import('./src/components/FileUploader.vue')['default']
Header: typeof import('./src/components/Header.vue')['default']
ItemTextEditor: typeof import('./src/components/ItemTextEditor.vue')['default']
LoadingLayer: typeof import('./src/components/LoadingLayer.vue')['default']
LogTerminal: typeof import('./src/components/LogTerminal.vue')['default']
PageEditor: typeof import('./src/components/PageEditor.vue')['default']
Pagination: typeof import('./src/components/Pagination.vue')['default']
PreferenceArr: typeof import('./src/components/PreferenceArr.vue')['default']
PreferenceGrp: typeof import('./src/components/PreferenceGrp.vue')['default']
PreferenceItem: typeof import('./src/components/PreferenceItem.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
SiteCreate: typeof import('./src/components/SiteCreate.vue')['default']
SiteEditor: typeof import('./src/components/SiteEditor.vue')['default']
SiteSwitcher: typeof import('./src/components/SiteSwitcher.vue')['default']
Tab: typeof import('./src/components/Tab.vue')['default']
UserEditor: typeof import('./src/components/UserEditor.vue')['default']
}
}
10 changes: 6 additions & 4 deletions ui/artalk-sidebar/src/pages/login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ function login(username?: string) {
}
})
}
function selectUser(username: string) {
userSelector.value = null
login(username)
}
</script>

<template>
Expand Down Expand Up @@ -112,10 +117,7 @@ function login(username?: string) {
v-for="(u, i) in userSelector"
:key="i"
class="item"
@click="
userSelector = null
login(u)
"
@click="selectUser(u)"
>
{{ u }}
</div>
Expand Down

0 comments on commit 104e208

Please sign in to comment.