🐛 Fix(custom): fix titlebar in macos

This commit is contained in:
Kuingsmile
2025-08-14 14:25:20 +08:00
parent 3ebbeb4dc7
commit 9d4e280b3d
9 changed files with 316 additions and 317 deletions

View File

@@ -72,7 +72,6 @@ export const checkProxyMap: IToolboxCheckerMap<string> = {
msg: $t('TOOLBOX_CHECK_PROXY_SUCCESS_TIPS')
})
} catch (e) {
console.log(e)
return sendToolboxRes(event, {
status: IToolboxItemCheckStatus.ERROR,
msg: $t('TOOLBOX_CHECK_PROXY_PROXY_IS_NOT_WORKING')

View File

@@ -151,7 +151,7 @@ updater.autoUpdater.on('update-downloaded', () => {
})
updater.autoUpdater.on('error', err => {
console.log(err)
logger.error(err)
})
class LifeCycle {
@@ -175,7 +175,7 @@ class LifeCycle {
const readyFunction = async () => {
if (process.env.NODE_ENV !== 'production') {
installExtension(VUEJS_DEVTOOLS).catch(err => {
console.log('An error occurred: ', err)
logger.error('An error occurred: ', err)
})
}
windowManager.create(IWindowList.TRAY_WINDOW)

View File

@@ -6,6 +6,7 @@ import querystring from 'node:querystring'
import type { S3ClientConfig } from '@aws-sdk/client-s3'
import { DeleteObjectCommand, S3Client } from '@aws-sdk/client-s3'
import logger from '@core/picgo/logger'
import { NodeHttpHandler } from '@smithy/node-http-handler'
import axios from 'axios'
import type { ISftpPlistConfig } from 'piclist'
@@ -82,7 +83,7 @@ async function getDogeToken (accessKey: string, secretKey: string): Promise<IObj
)
return data
} catch (err: any) {
console.log(err)
logger.error(err)
return {}
}
}
@@ -179,7 +180,7 @@ export async function removeFileFromS3InMain (configMap: IStringKeyMap, dogeMode
}
return result.$metadata.httpStatusCode === 204
} catch (err: any) {
console.log(err)
logger.error(err)
return false
}
}
@@ -203,7 +204,7 @@ export async function removeFileFromDogeInMain (configMap: IStringKeyMap) {
}
return await removeFileFromS3InMain(newConfigMap, true)
} catch (err: any) {
console.log(err)
logger.error(err)
return false
}
}
@@ -241,8 +242,8 @@ export async function removeFileFromHuaweiInMain (configMap: IStringKeyMap) {
}
})
return res.status === 204
} catch (error) {
console.log(error)
} catch (error: any) {
logger.error(error)
return false
}
}
@@ -257,7 +258,7 @@ export async function removeFileFromSFTPInMain (config: ISftpPlistConfig, fileNa
client.close()
return deleteResult
} catch (err: any) {
console.log(err)
logger.error(err)
return false
}
}

View File

@@ -1,5 +1,6 @@
import path from 'node:path'
import logger from '@core/picgo/logger'
import fs from 'fs-extra'
import { Config, NodeSSH, SSHExecCommandResponse } from 'node-ssh-no-cpu-features'
import { ISftpPlistConfig } from 'piclist/dist/types'
@@ -86,7 +87,7 @@ class SSHClient {
})
return (await promise) as boolean
} catch (err: any) {
console.log(err)
logger.error(err)
return false
}
}
@@ -113,7 +114,7 @@ class SSHClient {
})
return true
} catch (err: any) {
console.log(err)
logger.error(err)
return false
}
}
@@ -140,7 +141,7 @@ class SSHClient {
}
return true
} catch (err: any) {
console.log(err)
logger.error(err)
return false
}
}
@@ -175,7 +176,7 @@ class SSHClient {
return true
}
} catch (err: any) {
console.log(err)
logger.error(err)
return false
}
}

View File

@@ -4,7 +4,10 @@
data-drag-region
>
<div class="title-bar-content">
<div class="title-left">
<div
v-if="osGlobal !== 'darwin'"
class="title-left"
>
<div class="app-icon">
<img
:src="defaultLogo"
@@ -78,6 +81,7 @@ import { MinusIcon, PinIcon, ShrinkIcon, XIcon } from 'lucide-vue-next'
import { computed, onBeforeMount, onBeforeUnmount, ref } from 'vue'
import { IRPCActionType } from '@/utils/enum'
import { osGlobal } from '@/utils/global'
const isShowprogress = ref(false)
const progress = ref(0)

View File

@@ -2367,7 +2367,6 @@ async function resetParam (force: boolean = false) {
fileSortSizeReverse.value = false
fileSortTimeReverse.value = false
if (!isAutoRefresh.value && !force && !paging.value) {
console.log('use cache')
const cachedData = await searchExistFileList()
if (cachedData.length > 0) {
currentPageFilesInfo.push(...cachedData[0].value.fullList)

View File

@@ -585,8 +585,6 @@ async function handleConfigChange (name: string) {
for (const key of allKeys) {
const resultKey = name + '.' + key
console.log('Config change detected for:', resultKey)
if (key === 'customUrl' && configResult[resultKey] !== undefined && configResult[resultKey] !== '') {
if (name !== 'upyun') {
configResult[resultKey] = formatEndpoint(configResult[resultKey], false)

View File

@@ -371,7 +371,6 @@ const picBedSwitchDialogVisible = ref(false)
watch(route, async (newRoute) => {
if (newRoute.fullPath.split('?')[0] === '/main-page/manage-main-page') {
console.log('route changed')
currentAlias.value = newRoute.query.alias as string
currentPicBedName.value = newRoute.query.picBedName as string
allPicBedConfigure = JSON.parse(newRoute.query.allPicBedConfigure as string)
@@ -553,7 +552,6 @@ function changePicBed () {
}
function openBucketPageSetting () {
console.log('Open Bucket Page Setting')
router.push({
path: '/main-page/manage-main-page/manage-setting-page',
query: {

View File

@@ -3,7 +3,6 @@ import { ref } from 'vue'
import { IRPCActionType } from '@/utils/enum'
import type { IPicBedType } from '#/types/types'
console.log('global.ts loaded', window.electron.platform)
const osGlobal = ref<string>(window.electron.platform)
const picBedGlobal = ref<IPicBedType[]>([])