Compare commits
7 Commits
8faf34f85a
...
v1.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
| e3402dbfa3 | |||
| 73687b889e | |||
|
4333d0ea2a
|
|||
|
e4f2d1aaab
|
|||
|
bc67dab122
|
|||
|
ce5ca88694
|
|||
|
70ec35653d
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -2,6 +2,6 @@ build/bin
|
||||
node_modules
|
||||
frontend/dist
|
||||
|
||||
frontend/wailsjs
|
||||
frontend/wailsjs/
|
||||
|
||||
frontend/package.json.md5
|
||||
@@ -74,6 +74,8 @@ const useStyles = makeStyles({
|
||||
},
|
||||
})
|
||||
|
||||
let loaded = false
|
||||
|
||||
export const App = () => {
|
||||
const styles = useStyles()
|
||||
|
||||
@@ -199,17 +201,19 @@ export const App = () => {
|
||||
})
|
||||
})
|
||||
Load().then(res => {
|
||||
console.log(res)
|
||||
setSaveTo(res.save_to as SaveTo)
|
||||
setSavePath(res.path)
|
||||
loaded = true
|
||||
})
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
Save({
|
||||
save_to: saveTo,
|
||||
path: savePath,
|
||||
}).then(_ => {})
|
||||
if (loaded) {
|
||||
Save({
|
||||
save_to: saveTo,
|
||||
path: savePath,
|
||||
}).then(_ => {})
|
||||
}
|
||||
}, [saveTo, savePath])
|
||||
|
||||
OnFileDrop((_x, _y, paths) => {
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 407 KiB After Width: | Height: | Size: 425 KiB |
9
main.go
9
main.go
@@ -6,6 +6,7 @@ import (
|
||||
"github.com/wailsapp/wails/v2"
|
||||
"github.com/wailsapp/wails/v2/pkg/options"
|
||||
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
|
||||
"github.com/wailsapp/wails/v2/pkg/options/mac"
|
||||
|
||||
"git.taurusxin.com/taurusxin/ncmdump-gui/utils"
|
||||
)
|
||||
@@ -37,9 +38,15 @@ func main() {
|
||||
config_manager,
|
||||
},
|
||||
DragAndDrop: &options.DragAndDrop{
|
||||
EnableFileDrop: true,
|
||||
EnableFileDrop: true,
|
||||
DisableWebViewDrop: true,
|
||||
},
|
||||
Mac: &mac.Options{
|
||||
About: &mac.AboutInfo{
|
||||
Title: "ncmdump-gui",
|
||||
Message: "Copyright © 2025 TaurusXin",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
|
||||
@@ -2,7 +2,6 @@ package utils
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
)
|
||||
@@ -75,7 +74,6 @@ func (cm *ConfigManager) Load() *Preference {
|
||||
var preference *Preference = nil
|
||||
decoder := json.NewDecoder(file)
|
||||
err = decoder.Decode(&preference)
|
||||
fmt.Println(preference)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user