mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Use string param
This commit is contained in:
parent
2ea9f3a0ce
commit
3e445f0ad7
@ -4,7 +4,7 @@ import { isNotHtml, matchPattern } from '@/core/utils'
|
||||
import { useScopedConsole } from '@/core/utils/log'
|
||||
|
||||
const displayName = '网址参数清理'
|
||||
const console = useScopedConsole({ name: displayName })
|
||||
const console = useScopedConsole(displayName)
|
||||
const entry = async () => {
|
||||
if (isNotHtml()) {
|
||||
return
|
||||
|
||||
@ -14,7 +14,6 @@ import {
|
||||
CheckSingleTypeUpdateConfig,
|
||||
} from './utils'
|
||||
|
||||
const console = useScopedConsole({ name: '自动更新器' })
|
||||
export const checkUpdate = async (config: CheckUpdateConfig) => {
|
||||
const {
|
||||
items,
|
||||
@ -127,14 +126,18 @@ const checkByName = (method: CheckSingleTypeUpdate) => reload(
|
||||
|
||||
export const checkAllUpdate = async (config: CheckSingleTypeUpdateConfig) => {
|
||||
const { options } = getComponentSettings(name)
|
||||
console.groupCollapsed('开始检查更新')
|
||||
console.log(await checkComponentsUpdate(config) || '暂无组件更新')
|
||||
console.log(await checkPluginsUpdate(config) || '暂无插件更新')
|
||||
console.log(await checkStylesUpdate(config) || '暂无样式更新')
|
||||
const console = useScopedConsole('检查所有更新')
|
||||
console.log('开始检查更新')
|
||||
const updateMessages = [
|
||||
await checkComponentsUpdate(config) || '暂无组件更新',
|
||||
await checkPluginsUpdate(config) || '暂无插件更新',
|
||||
await checkStylesUpdate(config) || '暂无样式更新',
|
||||
]
|
||||
options.lastUpdateCheck = Number(new Date())
|
||||
options.lastInstalledVersion = meta.version
|
||||
console.groupCollapsed('完成更新检查')
|
||||
updateMessages.forEach(message => console.log(message))
|
||||
console.groupEnd()
|
||||
console.log('完成更新检查')
|
||||
}
|
||||
export const silentCheckUpdate = () => checkAllUpdate({
|
||||
maxCount: getComponentSettings(name).options.maxUpdateCount,
|
||||
|
||||
@ -5,7 +5,7 @@ import { getGeneralSettings } from './settings'
|
||||
import { formatFilename } from './utils/formatters'
|
||||
import { useScopedConsole } from './utils/log'
|
||||
|
||||
const console = useScopedConsole({ name: '文件下载' })
|
||||
const console = useScopedConsole('文件下载')
|
||||
/** 表示`DownloadPackage`中的一个文件 */
|
||||
export interface PackageEntry {
|
||||
/** 文件名 */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user