🐛 Fix(custom): fix static assets bugs

This commit is contained in:
Kuingsmile
2025-08-12 22:49:21 +08:00
parent d75ec2e31e
commit 5cfeaadcfe
263 changed files with 2057 additions and 2058 deletions

View File

@@ -10,7 +10,7 @@
"extraResources": [
{
"from": "resources",
"to": "resources",
"to": ".",
"filter": ["**/*"]
}
],

View File

@@ -7,7 +7,6 @@ import vue from '@vitejs/plugin-vue'
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
export default defineConfig({
main: {
// Main process configuration
plugins: [
externalizeDepsPlugin()
],
@@ -23,7 +22,6 @@ export default defineConfig({
}
},
preload: {
// Preload scripts configuration
plugins: [externalizeDepsPlugin(),
VueI18nPlugin({
/* options */
@@ -41,12 +39,8 @@ export default defineConfig({
}
},
renderer: {
// Renderer process configuration
root: resolve('src/renderer'),
publicDir: resolve('./public'),
build: {
outDir: resolve('dist/renderer')
},
base: './',
resolve: {
alias: {
'@': resolve('src/renderer'),

View File

@@ -181,7 +181,7 @@ windowList.set(IWindowList.TRAY_WINDOW, {
if (!app.isPackaged && process.env.ELECTRON_RENDERER_URL) {
window.loadURL(process.env.ELECTRON_RENDERER_URL)
} else {
window.loadFile(path.join(__dirname, '../render/index.html'))
window.loadFile(path.join(__dirname, '../renderer/index.html'))
}
window.on('blur', () => {
window.hide()
@@ -197,7 +197,7 @@ windowList.set(IWindowList.SETTING_WINDOW, {
if (!app.isPackaged && process.env.ELECTRON_RENDERER_URL) {
window.loadURL(`${process.env.ELECTRON_RENDERER_URL}#main-page/upload`)
} else {
window.loadFile(path.join(__dirname, '../render/index.html'), {
window.loadFile(path.join(__dirname, '../renderer/index.html'), {
hash: 'main-page/upload'
})
}
@@ -222,7 +222,7 @@ windowList.set(IWindowList.MINI_WINDOW, {
if (!app.isPackaged && process.env.ELECTRON_RENDERER_URL) {
window.loadURL(`${process.env.ELECTRON_RENDERER_URL}#mini-page`)
} else {
window.loadFile(path.join(__dirname, '../render/index.html'), {
window.loadFile(path.join(__dirname, '../renderer/index.html'), {
hash: 'mini-page'
})
}
@@ -238,7 +238,7 @@ windowList.set(IWindowList.RENAME_WINDOW, {
if (!app.isPackaged && process.env.ELECTRON_RENDERER_URL) {
window.loadURL(`${process.env.ELECTRON_RENDERER_URL}#rename-page`)
} else {
window.loadFile(path.join(__dirname, '../render/index.html'), {
window.loadFile(path.join(__dirname, '../renderer/index.html'), {
hash: 'rename-page'
})
}
@@ -260,7 +260,7 @@ windowList.set(IWindowList.TOOLBOX_WINDOW, {
if (!app.isPackaged && process.env.ELECTRON_RENDERER_URL) {
window.loadURL(`${process.env.ELECTRON_RENDERER_URL}#toolbox-page`)
} else {
window.loadFile(path.join(__dirname, '../render/index.html'), {
window.loadFile(path.join(__dirname, '../renderer/index.html'), {
hash: 'toolbox-page'
})
}

View File

@@ -11,7 +11,7 @@
:src="
isShowThumbnail && item.isImage
? base64Image
: `/assets/icons/${getFileIconPath(item.fileName ?? '')}`
: `./assets/icons/${getFileIconPath(item.fileName ?? '')}`
"
alt=""
class="image"
@@ -20,7 +20,7 @@
>
<img
v-else
:src="`/assets/icons/${getFileIconPath(item.fileName ?? '')}`"
:src="`./assets/icons/${getFileIconPath(item.fileName ?? '')}`"
alt=""
class="image"
>

View File

@@ -48,10 +48,10 @@ const props = defineProps<{
const imageSource = computed(() => {
return props.isShowThumbnail && props.item.isImage
? preSignedUrl.value
: `/assets/icons/${getFileIconPath(props.item.fileName ?? '')}`
: `./assets/icons/${getFileIconPath(props.item.fileName ?? '')}`
})
const iconPath = computed(() => `/assets/icons/${getFileIconPath(props.item.fileName ?? '')}`)
const iconPath = computed(() => `./assets/icons/${getFileIconPath(props.item.fileName ?? '')}`)
async function getUrl () {
try {

View File

@@ -49,10 +49,10 @@ const props = defineProps<{
const imageSource = computed(() => {
return props.isShowThumbnail && props.item.isImage && success.value
? base64Url.value
: `/assets/icons/${getFileIconPath(props.item.fileName ?? '')}`
: `./assets/icons/${getFileIconPath(props.item.fileName ?? '')}`
})
const iconPath = computed(() => `/assets/icons/${getFileIconPath(props.item.fileName ?? '')}`)
const iconPath = computed(() => `./assets/icons/${getFileIconPath(props.item.fileName ?? '')}`)
async function getWebdavHeader (key: string) {
let headers = {} as any

View File

@@ -7,7 +7,7 @@
<div class="title-left">
<div class="app-icon">
<img
src="/roundLogo.png"
:src="defaultLogo"
alt="App Icon"
width="20"
height="20"
@@ -75,13 +75,14 @@
<script setup lang="ts">
import { MinusIcon, PinIcon, ShrinkIcon, XIcon } from 'lucide-vue-next'
import { onBeforeMount, onBeforeUnmount, ref } from 'vue'
import { computed, onBeforeMount, onBeforeUnmount, ref } from 'vue'
import { IRPCActionType } from '@/utils/enum'
const isShowprogress = ref(false)
const progress = ref(0)
const isAlwaysOnTop = ref(false)
const defaultLogo = computed(() => `${import.meta.env.BASE_URL}roundLogo.png`)
function setAlwaysOnTop () {
isAlwaysOnTop.value = !isAlwaysOnTop.value

View File

@@ -42,8 +42,8 @@ const i18n = createI18n<[MessageSchema], 'en' | 'zh-CN' | 'zh-TW'>({
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
app.use(VueLazyLoad, {
loading: '/loading.jpg',
error: '/unknown-file-type.svg',
loading: './loading.jpg',
error: './unknown-file-type.svg',
delay: 500
})
app.use(i18n)

View File

@@ -460,7 +460,7 @@
>
<img
v-else
:src="`/assets/icons/${getFileIconPath(item.fileName ?? '')}`"
:src="`./assets/icons/${getFileIconPath(item.fileName ?? '')}`"
class="file-image"
>
</template>
@@ -495,7 +495,7 @@
<!-- Default File Icon -->
<template v-else-if="!item.isDir">
<img
:src="`/assets/icons/${getFileIconPath(item.fileName ?? '')}`"
:src="`./assets/icons/${getFileIconPath(item.fileName ?? '')}`"
class="file-image"
>
</template>
@@ -622,7 +622,7 @@
>
<img
v-else
:src="`/assets/icons/${getFileIconPath(item.fileName ?? '')}`"
:src="`./assets/icons/${getFileIconPath(item.fileName ?? '')}`"
style="width: 32px; height: 32px; object-fit: contain;"
>
</template>

View File

@@ -45,7 +45,7 @@
/>
<img
v-else
:src="`/assets/${item.key}.webp`"
:src="`./assets/${item.key}.webp`"
class="tab-icon"
:alt="item.name"
>
@@ -85,7 +85,7 @@
>
<div class="config-header">
<img
:src="`/assets/${item.picBedName}.webp`"
:src="`./assets/${item.picBedName}.webp`"
class="config-icon"
:alt="item.picBedName"
>

View File

@@ -6,7 +6,7 @@
<div class="header-content">
<div class="header-icon">
<img
:src="`/assets/${currentPagePicBedConfig.picBedName}.webp`"
:src="`./assets/${currentPagePicBedConfig.picBedName}.webp`"
class="header-icon-img"
>
</div>
@@ -176,7 +176,7 @@
>
<div class="card-icon">
<img
:src="`/assets/${config.picBedName}.webp`"
:src="`./assets/${config.picBedName}.webp`"
class="picbed-icon"
>
</div>
@@ -223,7 +223,7 @@
<div class="form-header">
<div class="form-icon">
<img
:src="`/assets/${currentPicBedName}.webp`"
:src="`./assets/${currentPicBedName}.webp`"
class="picbed-form-icon"
>
</div>

View File

@@ -318,7 +318,7 @@
>
<img
:src="imageErrorStates[item.key || '']
? '/errorLoading.png'
? './errorLoading.png'
: isAlwaysForceReload ? addCacheBustParam(item.src) : item.src"
class="gallery-image"
:class="{ loading: !imageLoadStates[item.key || ''] }"

View File

@@ -14,7 +14,7 @@
>
<img
v-if="!dragover && !isShowingProgress"
:src="logoPath ? logoPath : '/squareLogo.png'"
:src="logoPath ? logoPath : './squareLogo.png'"
style="width: 100%; height: 100%; border-radius: 50%"
draggable="false"
@dragstart.prevent

View File

@@ -126,7 +126,7 @@
<img
class="plugin-logo"
:src="item.logo"
:onerror="defaultLogo"
:onerror="setSrc"
alt=""
>
<div class="plugin-info">
@@ -331,9 +331,13 @@ const pluginNameList = ref<string[]>([])
const loading = ref(true)
const needReload = ref(false)
const latestVersionMap = reactive<{ [key: string]: string }>({})
const defaultLogo = ref('this.src=\'/roundLogo.png\'')
const $configForm = ref<InstanceType<typeof ConfigForm> | null>(null)
function setSrc (e: Event) {
const target = e.target as HTMLImageElement
target.src = import.meta.env.BASE_URL + 'roundLogo.png'
}
const npmSearchText = computed(() => {
return searchText.value.match('picgo-plugin-')
? searchText.value

View File

@@ -146,8 +146,8 @@ import type { IToolboxMap } from '#/types/view'
const { t } = useI18n()
const { confirm } = useConfirm()
const defaultLogo = ref('/roundLogo.png')
const activeTypes = ref<string[]>([])
const defaultLogo = computed(() => `${import.meta.env.BASE_URL}roundLogo.png`)
const fixList = reactive<IToolboxMap>({
[IToolboxItemType.IS_CONFIG_FILE_BROKEN]: {
title: t('pages.toolbox.checkConfigFileBroken'),

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

Before

Width:  |  Height:  |  Size: 690 B

After

Width:  |  Height:  |  Size: 690 B

View File

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Some files were not shown because too many files have changed in this diff Show More