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