Skip to content

Commit

Permalink
fix: type imports
Browse files Browse the repository at this point in the history
  • Loading branch information
mtdvlpr committed Oct 29, 2023
1 parent 07c103d commit eff1765
Show file tree
Hide file tree
Showing 63 changed files with 78 additions and 68 deletions.
4 changes: 2 additions & 2 deletions electron/mediaWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { platform } from 'os'
import { join } from 'path'
import {
BrowserWindow,
BrowserWindowConstructorOptions,
type BrowserWindowConstructorOptions,
ipcMain,
Point,
type Point,
} from 'electron'
import { AR_HEIGHT, AR_WIDTH } from './main'
import BrowserWinHandler from './BrowserWinHandler'
Expand Down
2 changes: 1 addition & 1 deletion electron/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Point, screen } from 'electron'
import { type Point, screen } from 'electron'
import { getMainWindow } from './mainWindow'
import { getMediaWin } from './mediaWindow'
import type { Screen, ScreenInfo } from '~~/types'
Expand Down
2 changes: 1 addition & 1 deletion src/components/NotifyUser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</template>
<script setup lang="ts">
import { ipcRenderer } from 'electron'
import { NotifyAction } from '~~/types'
import type { NotifyAction } from '~~/types'

const store = useNotifyStore()
const { notifications } = storeToRefs(store)
Expand Down
2 changes: 1 addition & 1 deletion src/components/SongPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/>
</template>
<script setup lang="ts">
import { VideoFile } from '~~/types'
import type { VideoFile } from '~~/types'
const props = defineProps<{
modelValue: any
}>()
Expand Down
2 changes: 1 addition & 1 deletion src/components/cong/CongDirList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</TreeView>
</template>
<script setup lang="ts">
import { CongFile } from '~~/types'
import type { CongFile } from '~~/types'
type TreeObj = Record<
string,
{
Expand Down
2 changes: 1 addition & 1 deletion src/components/form/FormTimestamp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
</v-col>
</template>
<script setup lang="ts">
import { VOtpInputRef } from '~~/types'
import type { VOtpInputRef } from '~~/types'

const props = defineProps<{
modelValue: string
Expand Down
2 changes: 1 addition & 1 deletion src/components/home/HomeWeekTiles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</template>
<script setup lang="ts">
import type { Dayjs } from 'dayjs'
import { DateFormat } from '~~/types'
import type { DateFormat } from '~~/types'
const props = defineProps<{
baseDate: Dayjs
Expand Down
2 changes: 1 addition & 1 deletion src/components/manage/ManageMedia.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ import { ipcRenderer } from 'electron'
import { readFile, stat, writeJSON } from 'fs-extra'
import { basename, changeExt, extname, join } from 'upath'
import {
import type {
LocalFile,
MeetingFile,
MeetingFileBase,
Expand Down
2 changes: 1 addition & 1 deletion src/components/manage/ManageMediaItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
<script setup lang="ts">
import { pathToFileURL } from 'url'
import { extname, join, normalize } from 'upath'
import { LocalFile, MeetingFile } from '~~/types'
import type { LocalFile, MeetingFile } from '~~/types'
const props = defineProps<{
date: string
Expand Down
2 changes: 1 addition & 1 deletion src/components/manage/ManageMediaList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</template>
<script setup lang="ts">
import { extname, join, trimExt } from 'upath'
import { LocalFile, MeetingFile, VideoFile } from '~~/types'
import type { LocalFile, MeetingFile, VideoFile } from '~~/types'
const props = defineProps<{
media: (LocalFile | MeetingFile)[]
Expand Down
2 changes: 1 addition & 1 deletion src/components/manage/ManageSelectDocument.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
import { ipcRenderer } from 'electron'
import type { Database } from '@stephen/sql.js'
import { extname, trimExt } from 'upath'
import { LocalFile, VideoFile } from '~~/types'
import type { LocalFile, VideoFile } from '~~/types'
const props = defineProps<{
file: LocalFile | VideoFile
Expand Down
2 changes: 1 addition & 1 deletion src/components/manage/ManageSelectFile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</v-col>
</template>
<script setup lang="ts">
import { LocalFile, VideoFile } from '~~/types'
import type { LocalFile, VideoFile } from '~~/types'
defineProps<{
type: string
files: (LocalFile | VideoFile)[]
Expand Down
2 changes: 1 addition & 1 deletion src/components/manage/ManageSelectVideo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</template>
<script setup lang="ts">
import { extname } from 'upath'
import { Images, MediaItem, VideoFile } from '~~/types'
import type { Images, MediaItem, VideoFile } from '~~/types'
defineProps<{
active: boolean
Expand Down
2 changes: 1 addition & 1 deletion src/components/media/MediaControls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import { useRouteQuery } from '@vueuse/router'
import { basename, dirname, join } from 'upath'
import * as fileWatcher from 'chokidar'
import { pathExistsSync, readJsonSync, readdirSync } from 'fs-extra'
import { LocalFile } from '~~/types'
import type { LocalFile } from '~~/types'
const loading = ref(false)
Expand Down
4 changes: 2 additions & 2 deletions src/components/media/MediaItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ import type { PanzoomObject } from '@panzoom/panzoom'
import { useIpcRenderer } from '@vueuse/electron'
import { pathExists, readJson } from 'fs-extra'
import { Marker, Times, TimeString, VideoFile } from '~~/types'
import { PanzoomChangeEvent } from '~~/types/global'
import type { Marker, Times, TimeString, VideoFile } from '~~/types'
import type { PanzoomChangeEvent } from '~~/types/global'
const props = defineProps<{
src: string
Expand Down
2 changes: 1 addition & 1 deletion src/components/media/MediaList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ import { useRouteQuery } from '@vueuse/router'
import { readJsonSync, writeJson } from 'fs-extra'
import { basename, dirname, join } from 'upath'
import { DateFormat, VideoFile } from '~~/types'
import type { DateFormat, VideoFile } from '~~/types'
type MediaItem = {
id: string
path: string
Expand Down
2 changes: 1 addition & 1 deletion src/components/media/MediaVideo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ import type { Duration } from 'dayjs/plugin/duration'
import { pathExists } from 'fs-extra'
import { ipcRenderer, type IpcRendererEvent } from 'electron'
import { useRouteQuery } from '@vueuse/router'
import { Time, Times, TimeString } from '~~/types'
import type { Time, Times, TimeString } from '~~/types'
const props = defineProps<{
src: string
Expand Down
2 changes: 1 addition & 1 deletion src/components/present/PresentFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<script setup lang="ts">
import { useIpcRendererOn } from '@vueuse/electron'
import type { Participant } from '@zoomus/websdk/embedded'
import { ObsPrefs } from '~~/types'
import type { ObsPrefs } from '~~/types'
defineProps<{
participant: Participant | null
Expand Down
2 changes: 1 addition & 1 deletion src/components/present/PresentSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</template>
<script setup lang="ts">
import { basename, join } from 'upath'
import { DateFormat } from '~~/types'
import type { DateFormat } from '~~/types'
const props = defineProps<{
firstChoice?: boolean
Expand Down
2 changes: 1 addition & 1 deletion src/components/settings/SettingsApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ import { ipcRenderer } from 'electron'
import { extname, join } from 'upath'
import type { LocaleObject } from '#i18n'
import { existsSync } from 'fs-extra'
import { AppPrefs, VFormRef, PrefStore } from '~~/types'
import type { AppPrefs, VFormRef, PrefStore } from '~~/types'

const props = defineProps<{
prefs: PrefStore
Expand Down
2 changes: 1 addition & 1 deletion src/components/settings/SettingsCong.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
</v-form>
</template>
<script setup lang="ts">
import { CongPrefs, Host, VFormRef } from '~~/types'
import type { CongPrefs, Host, VFormRef } from '~~/types'
const emit = defineEmits<{
valid: [val: boolean]
Expand Down
2 changes: 1 addition & 1 deletion src/components/settings/SettingsFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ import { useRouteQuery } from '@vueuse/router'
import { remove } from 'fs-extra'
import { join } from 'upath'
import getFolderSize from 'get-folder-size'
import { PrefStore } from '~~/types'
import type { PrefStore } from '~~/types'
const props = defineProps<{
cache: number
Expand Down
2 changes: 1 addition & 1 deletion src/components/settings/SettingsMedia.vue
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
import { readFile } from 'fs-extra'
import { extname, join } from 'upath'
import { ipcRenderer } from 'electron'
import { MediaPrefs, PrefStore, ShortJWLang, VFormRef } from '~~/types'
import type { MediaPrefs, PrefStore, ShortJWLang, VFormRef } from '~~/types'

const props = defineProps<{
prefs: PrefStore
Expand Down
2 changes: 1 addition & 1 deletion src/components/settings/SettingsMeeting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
<script setup lang="ts">
import { ensureDir, readdir } from 'fs-extra'
import { extname, join } from 'upath'
import { MeetingPrefs, PrefStore, VFormRef, VideoFile } from '~~/types'
import type { MeetingPrefs, PrefStore, VFormRef, VideoFile } from '~~/types'
const props = defineProps<{
prefs: PrefStore
Expand Down
2 changes: 1 addition & 1 deletion src/composables/useComputedLabel.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { MaybeRef } from '@vueuse/core'
import {
import type {
AppPrefs,
CongPrefs,
MediaPrefs,
Expand Down
2 changes: 1 addition & 1 deletion src/composables/usePrefs.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
AppPrefs,
CongPrefs,
MediaPrefs,
Expand Down
2 changes: 1 addition & 1 deletion src/constants/cong.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Host } from '~~/types'
import type { Host } from '~~/types'

export const HOSTS: Host[] = [
{
Expand Down
2 changes: 1 addition & 1 deletion src/constants/keys.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PrefStore } from '~~/types'
import type { PrefStore } from '~~/types'

// Provided by default layout
export const windowSizeKey = Symbol('windowSize') as InjectionKey<{
Expand Down
2 changes: 1 addition & 1 deletion src/constants/lang.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { LocaleObject } from '#i18n'
import { ShortJWLang } from '~~/types'
import type { ShortJWLang } from '~~/types'

export const DAYJS_LOCALES = [
'af',
Expand Down
2 changes: 1 addition & 1 deletion src/constants/prefs.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PrefStore } from '~~/types'
import type { PrefStore } from '~~/types'
export const PREFS = {
app: {
autoOpenFolderWhenDone: false,
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { fileURLToPath, pathToFileURL } from 'url'
import { ipcRenderer } from 'electron'
import { useIpcRendererOn } from '@vueuse/electron'
import { join } from 'upath'
import { Theme } from '~~/types'
import type { Theme } from '~~/types'
const statStore = useStatStore()
const windowSize = useWindowSize()
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ import { fileURLToPath, pathToFileURL } from 'url'
import { useIpcRenderer } from '@vueuse/electron'
import { existsSync } from 'fs-extra'
import { basename, join } from 'upath'
import { AppPrefs, MediaPrefs, MeetingPrefs } from '~~/types'
import type { AppPrefs, MediaPrefs, MeetingPrefs } from '~~/types'
useHead({ title: 'Home' })
const { $dayjs } = useNuxtApp()
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import { useIpcRenderer } from '@vueuse/electron'
import { useRouteQuery } from '@vueuse/router'
import * as fileWatcher from 'chokidar'
import type { LocaleObject } from '#i18n'
import { CongPrefs, ObsPrefs, Theme, ZoomPrefs } from '~~/types'
import type { CongPrefs, ObsPrefs, Theme, ZoomPrefs } from '~~/types'

interface Cong {
id: string
Expand Down
2 changes: 1 addition & 1 deletion src/pages/manage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<script setup lang="ts">
import { existsSync, readdirSync } from 'fs-extra'
import { extname, join } from 'upath'
import { DateFormat, LocalFile, MeetingFile } from '~~/types'
import type { DateFormat, LocalFile, MeetingFile } from '~~/types'
const { t } = useI18n()
const date = computed(() => useRoute().query.date as string)
Expand Down
2 changes: 1 addition & 1 deletion src/pages/media.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { useIpcRendererOn } from '@vueuse/electron'
import { ipcRenderer } from 'electron'
import { basename, changeExt, join } from 'upath'
import { existsSync, readFileSync } from 'fs-extra'
import { PrefStore } from '~~/types'
import type { PrefStore } from '~~/types'

definePageMeta({ layout: 'media' })

Expand Down
2 changes: 1 addition & 1 deletion src/pages/present.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import { useRouteQuery } from '@vueuse/router'
import { useIpcRenderer, useIpcRendererOn } from '@vueuse/electron'
import type { Participant } from '@zoomus/websdk/embedded'
import { ZoomPrefs } from '~~/types'
import type { ZoomPrefs } from '~~/types'

const date = useRouteQuery<string>('date', '')
useHead({
Expand Down
2 changes: 1 addition & 1 deletion src/pages/settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
</div>
</template>
<script setup lang="ts">
import { PrefStore } from '~~/types'
import type { PrefStore } from '~~/types'

useHead({ title: 'Settings' })
const { totalProgress, setProgress, relativeDownloadProgress } = useProgress()
Expand Down
2 changes: 1 addition & 1 deletion src/stores/cong.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { WebDAVClient } from 'webdav/web/types'
import { CongFile, PrefStore } from '~~/types'
import type { CongFile, PrefStore } from '~~/types'

interface CongStore {
client: WebDAVClient | null
Expand Down
2 changes: 1 addition & 1 deletion src/stores/media.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Dayjs } from 'dayjs'
import { MeetingFile, ShortJWLang } from '~~/types'
import type { MeetingFile, ShortJWLang } from '~~/types'

interface MediaStore {
songPub: string
Expand Down
2 changes: 1 addition & 1 deletion src/stores/notify.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Notification } from '~~/types'
import type { Notification } from '~~/types'

const defaultNotification: Notification = {
action: undefined, // A button to click
Expand Down
2 changes: 1 addition & 1 deletion src/stores/present.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Shortcut } from '~~/types'
import type { Shortcut } from '~~/types'

interface Screen {
id: number
Expand Down
2 changes: 1 addition & 1 deletion src/stores/stats.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MeetingFile } from '~~/types'
import type { MeetingFile } from '~~/types'

interface Perf {
start: number
Expand Down
2 changes: 1 addition & 1 deletion src/utils/congConnect.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { join, dirname, basename, resolve } from 'upath'
import type { WebDAVClient, FileStat } from 'webdav/web/types'
import { CongPrefs, DateFormat } from '~~/types'
import type { CongPrefs, DateFormat } from '~~/types'

export async function connect(
host: string,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/congMedia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Dayjs } from 'dayjs'
import { stat } from 'fs-extra'
import { join, extname, basename } from 'upath'
import type { LocaleObject } from '#i18n'
import { MeetingFile, DateFormat, CongFile } from '~~/types'
import type { MeetingFile, DateFormat, CongFile } from '~~/types'

export function getCongMedia(baseDate: Dayjs, now: Dayjs) {
const statStore = useStatStore()
Expand Down
2 changes: 1 addition & 1 deletion src/utils/congPrefs.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { pathExists, readFile } from 'fs-extra'
import { join } from 'upath'
import {
import type {
ObsPrefs,
AppPrefs,
CongPrefs,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/converters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
import { join, changeExt, dirname, basename, extname } from 'upath'
import type { PDFDocumentProxy } from 'pdfjs-dist/types/src/pdf'
import pdfWorkerSrc from 'pdfjs-dist/build/pdf.worker.min.js?url'
import { Release, DateFormat } from '~~/types'
import type { Release, DateFormat } from '~~/types'

export async function convertToMP4(
baseDate: Dayjs,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/fetch.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createWriteStream, WriteStream, ensureFile } from 'fs-extra'
import { author, name } from '~~/package.json'
import {
import type {
Publication,
Release,
MediaItemResult,
Expand Down
Loading

0 comments on commit eff1765

Please sign in to comment.