mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
lint types.
This commit is contained in:
parent
3a0bd06a31
commit
d891d5b331
@ -10,7 +10,7 @@ import type { Connection, WebRTCStats } from '../types/state'
|
||||
import { Reconnector } from './reconnector'
|
||||
import { WebsocketReconnector } from './reconnector/websocket'
|
||||
import { WebrtcReconnector } from './reconnector/webrtc'
|
||||
import { Logger } from '../utils/logger'
|
||||
import type { Logger } from '../utils/logger'
|
||||
|
||||
const WEBRTC_RECONN_MAX_LOSS = 25
|
||||
const WEBRTC_RECONN_FAILED_ATTEMPTS = 5
|
||||
|
@ -1,8 +1,8 @@
|
||||
import * as EVENT from '../types/events'
|
||||
import * as message from '../types/messages'
|
||||
import type * as message from '../types/messages'
|
||||
|
||||
import EventEmitter from 'eventemitter3'
|
||||
import { NekoConnection } from './connection'
|
||||
import type { NekoConnection } from './connection'
|
||||
import type { Control } from '../types/state'
|
||||
|
||||
export interface NekoControlEvents {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { NekoWebSocket } from './websocket'
|
||||
import type { NekoWebSocket } from './websocket'
|
||||
import * as EVENT from '../types/events'
|
||||
import * as message from '../types/messages'
|
||||
import type * as message from '../types/messages'
|
||||
import { Logger } from '../utils/logger'
|
||||
|
||||
const MAX_LOG_MESSAGES = 25
|
||||
|
@ -1,10 +1,10 @@
|
||||
import * as EVENT from '../types/events'
|
||||
import * as message from '../types/messages'
|
||||
import type * as message from '../types/messages'
|
||||
|
||||
import EventEmitter from 'eventemitter3'
|
||||
import type { AxiosProgressEvent } from 'axios'
|
||||
import { Logger } from '../utils/logger'
|
||||
import { NekoConnection } from './connection'
|
||||
import type { NekoConnection } from './connection'
|
||||
import type NekoState from '../types/state'
|
||||
import type { Settings } from '../types/state'
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import * as EVENT from '../../types/events'
|
||||
import type { Connection } from '../../types/state'
|
||||
|
||||
import { NekoWebSocket } from '../websocket'
|
||||
import { NekoWebRTC } from '../webrtc'
|
||||
import type { NekoWebSocket } from '../websocket'
|
||||
import type { NekoWebRTC } from '../webrtc'
|
||||
|
||||
import { ReconnectorAbstract } from '.'
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { Connection } from '../../types/state'
|
||||
|
||||
import { NekoWebSocket } from '../websocket'
|
||||
import type { NekoWebSocket } from '../websocket'
|
||||
|
||||
import { ReconnectorAbstract } from '.'
|
||||
|
||||
|
@ -78,7 +78,7 @@ import { ref, watch, computed, reactive, onMounted, onBeforeUnmount } from 'vue'
|
||||
//export * as StateModels from './types/state'
|
||||
//export * as webrtcTypes from './types/webrtc'
|
||||
|
||||
import { Configuration } from './api/configuration'
|
||||
import type { Configuration } from './api/configuration'
|
||||
import type { AxiosInstance, AxiosProgressEvent } from 'axios'
|
||||
|
||||
import ResizeObserver from 'resize-observer-polyfill'
|
||||
|
@ -56,8 +56,8 @@ import { NewKeyboard } from './utils/keyboard'
|
||||
import GestureHandlerInit from './utils/gesturehandler'
|
||||
import { KeyTable, keySymsRemap } from './utils/keyboard-remapping'
|
||||
import { getFilesFromDataTansfer } from './utils/file-upload'
|
||||
import { NekoControl } from './internal/control'
|
||||
import { NekoWebRTC } from './internal/webrtc'
|
||||
import type { NekoControl } from './internal/control'
|
||||
import type { NekoWebRTC } from './internal/webrtc'
|
||||
|
||||
// Wheel thresholds
|
||||
const WHEEL_STEP = 53 // Pixels needed for one step
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, watch, onMounted, onBeforeUnmount } from 'vue'
|
||||
import { RoomApi } from './api'
|
||||
import type { RoomApi } from './api'
|
||||
|
||||
const REFRESH_RATE = 1e3
|
||||
const ERROR_DELAY_MS = 2500
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Vue from 'vue'
|
||||
import type Vue from 'vue'
|
||||
import Neko from './component/main.vue'
|
||||
|
||||
// TODO
|
||||
|
@ -164,7 +164,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, watch, onMounted } from 'vue'
|
||||
import Neko from '@/component/main.vue'
|
||||
import type Neko from '@/component/main.vue'
|
||||
|
||||
const length = 512 // max length of message
|
||||
|
||||
|
@ -25,8 +25,8 @@
|
||||
<style lang="scss"></style>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, watch, onMounted, onBeforeUnmount } from 'vue'
|
||||
import Neko from '@/component/main.vue'
|
||||
import { ref, onMounted } from 'vue'
|
||||
import type Neko from '@/component/main.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
neko: typeof Neko
|
||||
|
@ -160,8 +160,8 @@
|
||||
</style>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, watch, computed, onMounted, onBeforeUnmount } from 'vue'
|
||||
import Neko from '@/component/main.vue'
|
||||
import { computed } from 'vue'
|
||||
import type Neko from '@/component/main.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
neko: typeof Neko
|
||||
|
@ -620,8 +620,8 @@
|
||||
</style>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, watch, computed, onMounted, onBeforeUnmount } from 'vue'
|
||||
import Neko from '@/component/main.vue'
|
||||
import { ref, watch, computed } from 'vue'
|
||||
import type Neko from '@/component/main.vue'
|
||||
import NekoColor from './color.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
|
@ -85,8 +85,8 @@
|
||||
</style>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, watch, computed, onMounted, onBeforeUnmount } from 'vue'
|
||||
import Neko from '@/component/main.vue'
|
||||
import { ref, watch } from 'vue'
|
||||
import type Neko from '@/component/main.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
neko: typeof Neko
|
||||
|
@ -41,8 +41,8 @@
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, watch, computed, onMounted, onBeforeUnmount } from 'vue'
|
||||
import Neko from '@/component/main.vue'
|
||||
import { ref, onMounted } from 'vue'
|
||||
import type Neko from '@/component/main.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
neko: typeof Neko
|
||||
|
@ -407,8 +407,8 @@
|
||||
</style>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, watch, computed, onMounted, onBeforeUnmount } from 'vue'
|
||||
import Neko from '@/component/main.vue'
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
import type Neko from '@/component/main.vue'
|
||||
|
||||
// TODO: get from lib ts?
|
||||
import type * as ApiModels from '@/component/api/models'
|
||||
|
@ -274,11 +274,10 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, computed, onMounted } from 'vue'
|
||||
import Neko from '@/component/main.vue'
|
||||
import type Neko from '@/component/main.vue'
|
||||
import type { FileTransfer, Message, Item } from './types'
|
||||
import { FILETRANSFER_UPDATE } from './types'
|
||||
import { FiletransferApi } from './api'
|
||||
import * as ApiModels from './api/models'
|
||||
|
||||
const props = defineProps<{
|
||||
neko: typeof Neko
|
||||
@ -288,7 +287,7 @@ const props = defineProps<{
|
||||
const api = props.neko.withApi(FiletransferApi) as FiletransferApi
|
||||
|
||||
const enabled = ref(false)
|
||||
const enabledForMe = computed(() => enabled && (props.neko.is_admin || (!props.neko.is_admin && !isLocked.value)))
|
||||
const enabledForMe = computed(() => enabled.value && (props.neko.is_admin || (!props.neko.is_admin && !isLocked.value)))
|
||||
const cwd = ref('')
|
||||
const files = ref<Item[]>([])
|
||||
const transfers = reactive<FileTransfer[]>([])
|
||||
|
Loading…
Reference in New Issue
Block a user