chore: format code
This commit is contained in:
@@ -36,7 +36,7 @@ export const useConfig = defineStore('config', () => {
|
||||
refresh,
|
||||
}
|
||||
|
||||
useAddConfigSettings(config)
|
||||
useAddConfigSettings()
|
||||
|
||||
return config
|
||||
})
|
||||
@@ -49,7 +49,7 @@ declare module 'hooks/store' {
|
||||
}
|
||||
}
|
||||
|
||||
function useAddConfigSettings(config: Config) {
|
||||
function useAddConfigSettings() {
|
||||
onMounted(() => {
|
||||
// API keys
|
||||
app.ui?.settings.addSetting({
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { defineStore } from 'hooks/store'
|
||||
import { ContainerSize } from 'types/typings'
|
||||
import { Component, markRaw, ref } from 'vue'
|
||||
|
||||
interface HeaderButton {
|
||||
key: string
|
||||
icon: string
|
||||
command: () => void
|
||||
}
|
||||
|
||||
@@ -4,6 +4,13 @@ import { request } from 'hooks/request'
|
||||
import { defineStore } from 'hooks/store'
|
||||
import { useToast } from 'hooks/toast'
|
||||
import { api } from 'scripts/comfyAPI'
|
||||
import {
|
||||
BaseModel,
|
||||
DownloadTask,
|
||||
DownloadTaskOptions,
|
||||
SelectOptions,
|
||||
VersionModel,
|
||||
} from 'types/typings'
|
||||
import { bytesToSize } from 'utils/common'
|
||||
import { onBeforeMount, onMounted, ref, watch } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
@@ -385,7 +392,7 @@ class Huggingface extends ModelSearch {
|
||||
}
|
||||
|
||||
class UnknownWebsite extends ModelSearch {
|
||||
async search(searchUrl: string): Promise<VersionModel[]> {
|
||||
async search(): Promise<VersionModel[]> {
|
||||
return Promise.reject(
|
||||
new Error(
|
||||
'Unknown Website, please input a URL from huggingface.co or civitai.com.',
|
||||
|
||||
@@ -6,6 +6,7 @@ import { defineStore } from 'hooks/store'
|
||||
import { useToast } from 'hooks/toast'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import { app } from 'scripts/comfyAPI'
|
||||
import { BaseModel, Model, SelectEvent } from 'types/typings'
|
||||
import { bytesToSize, formatDate, previewUrlToFile } from 'utils/common'
|
||||
import { ModelGrid } from 'utils/legacy'
|
||||
import { genModelKey, resolveModelTypeLoader } from 'utils/model'
|
||||
|
||||
@@ -13,7 +13,7 @@ export const useStoreProvider = () => {
|
||||
return storeEvent
|
||||
}
|
||||
|
||||
const storeKeys = new Map<string, Symbol>()
|
||||
const storeKeys = new Map<string, symbol>()
|
||||
|
||||
const getStoreKey = (key: string) => {
|
||||
let storeKey = storeKeys.get(key)
|
||||
|
||||
@@ -12,7 +12,7 @@ export const useToast = () => {
|
||||
|
||||
globalToast.value = toast
|
||||
|
||||
const wrapperToastError = <T extends Function>(callback: T): T => {
|
||||
const wrapperToastError = <T extends CallableFunction>(callback: T): T => {
|
||||
const showToast = (error: Error) => {
|
||||
toast.add({
|
||||
severity: 'error',
|
||||
|
||||
Reference in New Issue
Block a user