🐛 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

@@ -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

@@ -1,20 +1,19 @@
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[]>([])
const pageReloadCount = ref(0)
async function updatePicBedGlobal () {
picBedGlobal.value = (await window.electron.triggerRPC<IPicBedType[]>(IRPCActionType.MAIN_GET_PICBED))!
}
async function updatePageReloadCount () {
pageReloadCount.value++
}
export { osGlobal, pageReloadCount, picBedGlobal, updatePageReloadCount, updatePicBedGlobal }
import { ref } from 'vue'
import { IRPCActionType } from '@/utils/enum'
import type { IPicBedType } from '#/types/types'
const osGlobal = ref<string>(window.electron.platform)
const picBedGlobal = ref<IPicBedType[]>([])
const pageReloadCount = ref(0)
async function updatePicBedGlobal () {
picBedGlobal.value = (await window.electron.triggerRPC<IPicBedType[]>(IRPCActionType.MAIN_GET_PICBED))!
}
async function updatePageReloadCount () {
pageReloadCount.value++
}
export { osGlobal, pageReloadCount, picBedGlobal, updatePageReloadCount, updatePicBedGlobal }