fix
This commit is contained in:
parent
766d59cdf0
commit
6e62d72ff6
|
|
@ -25,7 +25,11 @@
|
|||
}
|
||||
],
|
||||
"security": {
|
||||
"csp": null
|
||||
"csp": "default-src 'self' ipc: http://ipc.localhost; img-src 'self' asset: http://asset.localhost data:; media-src 'self' asset: http://asset.localhost; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'",
|
||||
"assetProtocol": {
|
||||
"enable": true,
|
||||
"scope": ["**"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"bundle": {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react'
|
||||
import React, { useEffect } from 'react'
|
||||
import { Routes, Route } from 'react-router-dom'
|
||||
import Layout from './components/Layout'
|
||||
import HomePage from './pages/HomePage'
|
||||
|
|
@ -13,8 +13,11 @@ import ModelManagePage from './pages/ModelManagePage'
|
|||
import AudioLibraryPage from './pages/AudioLibraryPage'
|
||||
import MediaLibraryPage from './pages/MediaLibraryPage'
|
||||
import KVTestPage from './pages/KVTestPage'
|
||||
|
||||
import { appDataDir } from '@tauri-apps/api/path'
|
||||
function App() {
|
||||
useEffect(() => {
|
||||
console.log(appDataDir())
|
||||
}, [])
|
||||
return (
|
||||
<Layout>
|
||||
<Routes>
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ const VideoPlayer: React.FC<VideoPlayerProps> = ({
|
|||
if (isOpen && videoPath) {
|
||||
// 使用Tauri的convertFileSrc来获取安全的文件URL
|
||||
const src = convertFileSrc(videoPath)
|
||||
console.log({ src })
|
||||
setVideoSrc(src)
|
||||
}
|
||||
}, [isOpen, videoPath])
|
||||
|
|
|
|||
Loading…
Reference in New Issue