mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-06 20:42:57 +08:00
🐛 Fix(custom): fix titlebar in macos
This commit is contained in:
@@ -72,7 +72,6 @@ export const checkProxyMap: IToolboxCheckerMap<string> = {
|
|||||||
msg: $t('TOOLBOX_CHECK_PROXY_SUCCESS_TIPS')
|
msg: $t('TOOLBOX_CHECK_PROXY_SUCCESS_TIPS')
|
||||||
})
|
})
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
|
||||||
return sendToolboxRes(event, {
|
return sendToolboxRes(event, {
|
||||||
status: IToolboxItemCheckStatus.ERROR,
|
status: IToolboxItemCheckStatus.ERROR,
|
||||||
msg: $t('TOOLBOX_CHECK_PROXY_PROXY_IS_NOT_WORKING')
|
msg: $t('TOOLBOX_CHECK_PROXY_PROXY_IS_NOT_WORKING')
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ updater.autoUpdater.on('update-downloaded', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
updater.autoUpdater.on('error', err => {
|
updater.autoUpdater.on('error', err => {
|
||||||
console.log(err)
|
logger.error(err)
|
||||||
})
|
})
|
||||||
|
|
||||||
class LifeCycle {
|
class LifeCycle {
|
||||||
@@ -175,7 +175,7 @@ class LifeCycle {
|
|||||||
const readyFunction = async () => {
|
const readyFunction = async () => {
|
||||||
if (process.env.NODE_ENV !== 'production') {
|
if (process.env.NODE_ENV !== 'production') {
|
||||||
installExtension(VUEJS_DEVTOOLS).catch(err => {
|
installExtension(VUEJS_DEVTOOLS).catch(err => {
|
||||||
console.log('An error occurred: ', err)
|
logger.error('An error occurred: ', err)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
windowManager.create(IWindowList.TRAY_WINDOW)
|
windowManager.create(IWindowList.TRAY_WINDOW)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import querystring from 'node:querystring'
|
|||||||
|
|
||||||
import type { S3ClientConfig } from '@aws-sdk/client-s3'
|
import type { S3ClientConfig } from '@aws-sdk/client-s3'
|
||||||
import { DeleteObjectCommand, S3Client } 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 { NodeHttpHandler } from '@smithy/node-http-handler'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import type { ISftpPlistConfig } from 'piclist'
|
import type { ISftpPlistConfig } from 'piclist'
|
||||||
@@ -82,7 +83,7 @@ async function getDogeToken (accessKey: string, secretKey: string): Promise<IObj
|
|||||||
)
|
)
|
||||||
return data
|
return data
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
console.log(err)
|
logger.error(err)
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -179,7 +180,7 @@ export async function removeFileFromS3InMain (configMap: IStringKeyMap, dogeMode
|
|||||||
}
|
}
|
||||||
return result.$metadata.httpStatusCode === 204
|
return result.$metadata.httpStatusCode === 204
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
console.log(err)
|
logger.error(err)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -203,7 +204,7 @@ export async function removeFileFromDogeInMain (configMap: IStringKeyMap) {
|
|||||||
}
|
}
|
||||||
return await removeFileFromS3InMain(newConfigMap, true)
|
return await removeFileFromS3InMain(newConfigMap, true)
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
console.log(err)
|
logger.error(err)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -241,8 +242,8 @@ export async function removeFileFromHuaweiInMain (configMap: IStringKeyMap) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
return res.status === 204
|
return res.status === 204
|
||||||
} catch (error) {
|
} catch (error: any) {
|
||||||
console.log(error)
|
logger.error(error)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -257,7 +258,7 @@ export async function removeFileFromSFTPInMain (config: ISftpPlistConfig, fileNa
|
|||||||
client.close()
|
client.close()
|
||||||
return deleteResult
|
return deleteResult
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
console.log(err)
|
logger.error(err)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import path from 'node:path'
|
import path from 'node:path'
|
||||||
|
|
||||||
|
import logger from '@core/picgo/logger'
|
||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
import { Config, NodeSSH, SSHExecCommandResponse } from 'node-ssh-no-cpu-features'
|
import { Config, NodeSSH, SSHExecCommandResponse } from 'node-ssh-no-cpu-features'
|
||||||
import { ISftpPlistConfig } from 'piclist/dist/types'
|
import { ISftpPlistConfig } from 'piclist/dist/types'
|
||||||
@@ -86,7 +87,7 @@ class SSHClient {
|
|||||||
})
|
})
|
||||||
return (await promise) as boolean
|
return (await promise) as boolean
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
console.log(err)
|
logger.error(err)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -113,7 +114,7 @@ class SSHClient {
|
|||||||
})
|
})
|
||||||
return true
|
return true
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
console.log(err)
|
logger.error(err)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -140,7 +141,7 @@ class SSHClient {
|
|||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
console.log(err)
|
logger.error(err)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -175,7 +176,7 @@ class SSHClient {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
console.log(err)
|
logger.error(err)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,10 @@
|
|||||||
data-drag-region
|
data-drag-region
|
||||||
>
|
>
|
||||||
<div class="title-bar-content">
|
<div class="title-bar-content">
|
||||||
<div class="title-left">
|
<div
|
||||||
|
v-if="osGlobal !== 'darwin'"
|
||||||
|
class="title-left"
|
||||||
|
>
|
||||||
<div class="app-icon">
|
<div class="app-icon">
|
||||||
<img
|
<img
|
||||||
:src="defaultLogo"
|
:src="defaultLogo"
|
||||||
@@ -78,6 +81,7 @@ import { MinusIcon, PinIcon, ShrinkIcon, XIcon } from 'lucide-vue-next'
|
|||||||
import { computed, onBeforeMount, onBeforeUnmount, ref } from 'vue'
|
import { computed, onBeforeMount, onBeforeUnmount, ref } from 'vue'
|
||||||
|
|
||||||
import { IRPCActionType } from '@/utils/enum'
|
import { IRPCActionType } from '@/utils/enum'
|
||||||
|
import { osGlobal } from '@/utils/global'
|
||||||
|
|
||||||
const isShowprogress = ref(false)
|
const isShowprogress = ref(false)
|
||||||
const progress = ref(0)
|
const progress = ref(0)
|
||||||
|
|||||||
@@ -2367,7 +2367,6 @@ async function resetParam (force: boolean = false) {
|
|||||||
fileSortSizeReverse.value = false
|
fileSortSizeReverse.value = false
|
||||||
fileSortTimeReverse.value = false
|
fileSortTimeReverse.value = false
|
||||||
if (!isAutoRefresh.value && !force && !paging.value) {
|
if (!isAutoRefresh.value && !force && !paging.value) {
|
||||||
console.log('use cache')
|
|
||||||
const cachedData = await searchExistFileList()
|
const cachedData = await searchExistFileList()
|
||||||
if (cachedData.length > 0) {
|
if (cachedData.length > 0) {
|
||||||
currentPageFilesInfo.push(...cachedData[0].value.fullList)
|
currentPageFilesInfo.push(...cachedData[0].value.fullList)
|
||||||
|
|||||||
@@ -585,8 +585,6 @@ async function handleConfigChange (name: string) {
|
|||||||
|
|
||||||
for (const key of allKeys) {
|
for (const key of allKeys) {
|
||||||
const resultKey = name + '.' + key
|
const resultKey = name + '.' + key
|
||||||
console.log('Config change detected for:', resultKey)
|
|
||||||
|
|
||||||
if (key === 'customUrl' && configResult[resultKey] !== undefined && configResult[resultKey] !== '') {
|
if (key === 'customUrl' && configResult[resultKey] !== undefined && configResult[resultKey] !== '') {
|
||||||
if (name !== 'upyun') {
|
if (name !== 'upyun') {
|
||||||
configResult[resultKey] = formatEndpoint(configResult[resultKey], false)
|
configResult[resultKey] = formatEndpoint(configResult[resultKey], false)
|
||||||
|
|||||||
@@ -371,7 +371,6 @@ const picBedSwitchDialogVisible = ref(false)
|
|||||||
|
|
||||||
watch(route, async (newRoute) => {
|
watch(route, async (newRoute) => {
|
||||||
if (newRoute.fullPath.split('?')[0] === '/main-page/manage-main-page') {
|
if (newRoute.fullPath.split('?')[0] === '/main-page/manage-main-page') {
|
||||||
console.log('route changed')
|
|
||||||
currentAlias.value = newRoute.query.alias as string
|
currentAlias.value = newRoute.query.alias as string
|
||||||
currentPicBedName.value = newRoute.query.picBedName as string
|
currentPicBedName.value = newRoute.query.picBedName as string
|
||||||
allPicBedConfigure = JSON.parse(newRoute.query.allPicBedConfigure as string)
|
allPicBedConfigure = JSON.parse(newRoute.query.allPicBedConfigure as string)
|
||||||
@@ -553,7 +552,6 @@ function changePicBed () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function openBucketPageSetting () {
|
function openBucketPageSetting () {
|
||||||
console.log('Open Bucket Page Setting')
|
|
||||||
router.push({
|
router.push({
|
||||||
path: '/main-page/manage-main-page/manage-setting-page',
|
path: '/main-page/manage-main-page/manage-setting-page',
|
||||||
query: {
|
query: {
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import { ref } from 'vue'
|
|||||||
import { IRPCActionType } from '@/utils/enum'
|
import { IRPCActionType } from '@/utils/enum'
|
||||||
import type { IPicBedType } from '#/types/types'
|
import type { IPicBedType } from '#/types/types'
|
||||||
|
|
||||||
console.log('global.ts loaded', window.electron.platform)
|
|
||||||
const osGlobal = ref<string>(window.electron.platform)
|
const osGlobal = ref<string>(window.electron.platform)
|
||||||
|
|
||||||
const picBedGlobal = ref<IPicBedType[]>([])
|
const picBedGlobal = ref<IPicBedType[]>([])
|
||||||
|
|||||||
Reference in New Issue
Block a user