feat: finished basic functio

This commit is contained in:
TaurusXin 2024-11-26 19:40:57 +08:00
parent 8f9dd089bc
commit b2e3930c10
Signed by: taurusxin
GPG Key ID: C334DCA04AC2D2CC
15 changed files with 561 additions and 29 deletions

79
app.go
View File

@ -2,7 +2,10 @@ package main
import ( import (
"context" "context"
"fmt"
"github.com/wailsapp/wails/v2/pkg/runtime"
"git.taurusxin.com/taurusxin/ncmdump-go/ncmcrypt"
) )
// App struct // App struct
@ -21,7 +24,75 @@ func (a *App) startup(ctx context.Context) {
a.ctx = ctx a.ctx = ctx
} }
// Greet returns a greeting for the given name // select files to dump
func (a *App) Greet(name string) string { func (a *App) SelectFiles() []string {
return fmt.Sprintf("Hello %s, It's show time!", name) selection, err := runtime.OpenMultipleFilesDialog(a.ctx, runtime.OpenDialogOptions{
Title: "请选择文件",
Filters: []runtime.FileFilter{
{
DisplayName: "NCM Files",
Pattern: "*.ncm",
},
},
})
if err != nil {
return []string{}
}
return selection
}
func (a *App) SelectFolder() string {
folder, err := runtime.OpenDirectoryDialog(a.ctx, runtime.OpenDialogOptions{
Title: "请选择保存目录",
})
if err != nil {
return ""
}
return folder
}
type Status = string
const (
Pending Status = "pending"
Processing Status = "processing"
Done Status = "done"
Error Status = "error"
)
type NcmFile struct {
Name string
Status Status
}
// process single file
func (a *App) processFile(file string, index int, savePath string) {
runtime.EventsEmit(a.ctx, "file-status-changed", index, Processing)
ncm, err := ncmcrypt.NewNeteaseCloudMusic(file)
if err != nil {
runtime.EventsEmit(a.ctx, "file-status-changed", index, Error)
return
}
dumpResult, err := ncm.Dump(savePath)
if err != nil {
runtime.EventsEmit(a.ctx, "file-status-changed", index, Error)
return
}
if dumpResult {
_, err := ncm.FixMetadata(true)
if err != nil {
runtime.EventsEmit(a.ctx, "file-status-changed", index, Error)
return
}
runtime.EventsEmit(a.ctx, "file-status-changed", index, Done)
}
}
// process files
func (a *App) ProcessFiles(files []NcmFile, savePath string) {
for index, file := range files {
if file.Status == Pending {
go a.processFile(file.Name, index, savePath)
}
}
} }

View File

@ -9,6 +9,7 @@
"version": "0.0.0", "version": "0.0.0",
"dependencies": { "dependencies": {
"@fluentui/react-components": "^9.56.2", "@fluentui/react-components": "^9.56.2",
"@fluentui/react-icons": "^2.0.266",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0" "react-dom": "^18.2.0"
}, },
@ -16,6 +17,8 @@
"@types/react": "^18.0.17", "@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6", "@types/react-dom": "^18.0.6",
"@vitejs/plugin-react": "^2.0.1", "@vitejs/plugin-react": "^2.0.1",
"autoprefixer": "^10.4.20",
"postcss": "^8.4.49",
"tailwindcss": "^3.4.15", "tailwindcss": "^3.4.15",
"typescript": "^4.6.4", "typescript": "^4.6.4",
"vite": "^3.0.7" "vite": "^3.0.7"
@ -2602,6 +2605,44 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/autoprefixer": {
"version": "10.4.20",
"resolved": "https://registry.npmmirror.com/autoprefixer/-/autoprefixer-10.4.20.tgz",
"integrity": "sha512-XY25y5xSv/wEoqzDyXXME4AFfkZI0P23z6Fs3YgymDnKJkCGOnkL0iTxCa85UTqaSgfcqyf3UA6+c7wUvx/16g==",
"dev": true,
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/autoprefixer"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"license": "MIT",
"dependencies": {
"browserslist": "^4.23.3",
"caniuse-lite": "^1.0.30001646",
"fraction.js": "^4.3.7",
"normalize-range": "^0.1.2",
"picocolors": "^1.0.1",
"postcss-value-parser": "^4.2.0"
},
"bin": {
"autoprefixer": "bin/autoprefixer"
},
"engines": {
"node": "^10 || ^12 || >=14"
},
"peerDependencies": {
"postcss": "^8.1.0"
}
},
"node_modules/balanced-match": { "node_modules/balanced-match": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz", "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz",
@ -3363,6 +3404,20 @@
"url": "https://github.com/sponsors/isaacs" "url": "https://github.com/sponsors/isaacs"
} }
}, },
"node_modules/fraction.js": {
"version": "4.3.7",
"resolved": "https://registry.npmmirror.com/fraction.js/-/fraction.js-4.3.7.tgz",
"integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==",
"dev": true,
"license": "MIT",
"engines": {
"node": "*"
},
"funding": {
"type": "patreon",
"url": "https://github.com/sponsors/rawify"
}
},
"node_modules/fsevents": { "node_modules/fsevents": {
"version": "2.3.3", "version": "2.3.3",
"resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz", "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz",
@ -3755,6 +3810,16 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/normalize-range": {
"version": "0.1.2",
"resolved": "https://registry.npmmirror.com/normalize-range/-/normalize-range-0.1.2.tgz",
"integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/object-assign": { "node_modules/object-assign": {
"version": "4.1.1", "version": "4.1.1",
"resolved": "https://registry.npmmirror.com/object-assign/-/object-assign-4.1.1.tgz", "resolved": "https://registry.npmmirror.com/object-assign/-/object-assign-4.1.1.tgz",

View File

@ -10,6 +10,7 @@
}, },
"dependencies": { "dependencies": {
"@fluentui/react-components": "^9.56.2", "@fluentui/react-components": "^9.56.2",
"@fluentui/react-icons": "^2.0.266",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0" "react-dom": "^18.2.0"
}, },

View File

@ -1 +1 @@
c5764cc06684403f68bdc08107b7dc4a d96d5e55cba5f9d68f0aa1d714fb5f1a

View File

@ -11,6 +11,9 @@ importers:
'@fluentui/react-components': '@fluentui/react-components':
specifier: ^9.56.2 specifier: ^9.56.2
version: 9.56.2(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(scheduler@0.23.2) version: 9.56.2(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(scheduler@0.23.2)
'@fluentui/react-icons':
specifier: ^2.0.266
version: 2.0.266(react@18.3.1)
react: react:
specifier: ^18.2.0 specifier: ^18.2.0
version: 18.3.1 version: 18.3.1

View File

@ -1,5 +1,24 @@
import React, { useEffect } from 'react'
import { useState } from 'react' import { useState } from 'react'
import { Button } from '@fluentui/react-components' import {
Button,
createTableColumn,
Dialog,
DialogActions,
DialogBody,
DialogContent,
DialogSurface,
DialogTitle,
DialogTrigger,
Field,
Input,
Radio,
RadioGroup,
TableColumnDefinition,
TableColumnSizingOptions,
useTableColumnSizing_unstable,
useTableFeatures,
} from '@fluentui/react-components'
import { import {
TableBody, TableBody,
TableCell, TableCell,
@ -8,18 +27,272 @@ import {
TableHeader, TableHeader,
TableHeaderCell, TableHeaderCell,
TableCellLayout, TableCellLayout,
PresenceBadgeStatus, makeStyles,
Avatar, tokens,
} from '@fluentui/react-components' } from '@fluentui/react-components'
import {
ClockRegular,
CheckmarkRegular,
DismissRegular,
DocumentArrowRightRegular,
} from '@fluentui/react-icons'
import { Status, Item, SaveTo } from './types'
import { SelectFiles, SelectFolder, ProcessFiles } from '../wailsjs/go/main/App'
import { main } from '../wailsjs/go/models'
import { EventsOn } from '../wailsjs/runtime/runtime'
const columnsDef: TableColumnDefinition<Item>[] = [
createTableColumn<Item>({
columnId: 'status',
renderHeaderCell: () => <></>,
}),
createTableColumn<Item>({
columnId: 'file',
renderHeaderCell: () => <></>,
}),
]
const useStyles = makeStyles({
iconGreen: {
color: tokens.colorPaletteGreenForeground1,
},
iconRed: {
color: tokens.colorPaletteRedForeground1,
},
iconYellow: {
color: tokens.colorPaletteYellowForeground1,
},
})
export const App = () => { export const App = () => {
const styles = useStyles()
const [items, setItems] = useState<Item[]>([])
const [isProcessing, setIsProcessing] = useState(false)
const [totalFilesNeedToProcess, setTotalFilesNeedToProcess] = useState(0)
const [finishedCount, setFinishedCount] = useState(0)
const [saveTo, setSaveTo] = useState<SaveTo>('original')
const [savePath, setSavePath] = useState('')
const [message, setMessage] = useState('')
const [open, setOpen] = useState(false)
const [columns] = React.useState<TableColumnDefinition<Item>[]>(columnsDef)
const [columnSizingOptions] = React.useState<TableColumnSizingOptions>({
status: {
idealWidth: 100,
minWidth: 100,
},
file: {
idealWidth: 150,
minWidth: 150,
},
})
// eslint-disable-next-line @typescript-eslint/naming-convention
const { getRows, columnSizing_unstable, tableRef } = useTableFeatures(
{
columns,
items,
},
[useTableColumnSizing_unstable({ columnSizingOptions })]
)
// return the icon based on the status
const statusMapIcon = (status: Status) => {
switch (status) {
case 'pending':
return <ClockRegular />
case 'processing':
return <DocumentArrowRightRegular className={styles.iconYellow} />
case 'done':
return <CheckmarkRegular className={styles.iconGreen} />
case 'error':
return <DismissRegular className={styles.iconRed} />
default:
}
}
// return the text based on the status
const statusMapText = (status: Status) => {
switch (status) {
case 'pending':
return '等待'
case 'processing':
return '处理'
case 'done':
return '完成'
case 'error':
return '错误'
}
}
const selectFiles = () => {
SelectFiles().then(files => {
for (const file of files) {
setItems(prev => [...prev, { file, status: 'pending' }])
}
setTotalFilesNeedToProcess(files.length)
})
}
const showDialog = (message: string) => {
setMessage(message)
setOpen(true)
}
const startProcess = async () => {
// 未添加文件时
if (items.length === 0) {
showDialog('当前文件列表为空,请先添加文件。')
return
}
// 检查所有文件是否都已处理完毕
let isAllFinished = true
for (const item of items) {
if (item.status === 'pending') {
isAllFinished = false
break
}
}
if (isAllFinished) {
showDialog('当前文件列表已全部处理完毕,请重新添加新的文件。')
return
}
setIsProcessing(true)
const ncmFiles: main.NcmFile[] = []
items.forEach(item => {
ncmFiles.push({
Name: item.file,
Status: item.status,
})
})
ProcessFiles(ncmFiles, savePath).then(() => {})
}
useEffect(() => {
EventsOn('file-status-changed', (index: number, status: Status) => {
if (status == 'done' || status === 'error') {
setFinishedCount(prev => prev + 1)
}
setItems(prev => {
const newItems = [...prev]
newItems[index].status = status
return newItems
})
})
}, [])
useEffect(() => {
if (finishedCount === totalFilesNeedToProcess) {
setFinishedCount(0)
setTotalFilesNeedToProcess(0)
setIsProcessing(false)
}
}, [finishedCount])
return ( return (
<div className='p-2'> <div className="p-3">
<div className="flex space-between gap-2"> <Dialog
<Button></Button> // this controls the dialog open state
<Button></Button> open={open}
<Button appearance="primary"></Button> onOpenChange={(event, data) => {
// it is the users responsibility to react accordingly to the open state change
setOpen(data.open)
}}
>
<DialogSurface style={{ width: '400px' }}>
<DialogBody>
<DialogTitle></DialogTitle>
<DialogContent>{message}</DialogContent>
<DialogActions>
<DialogTrigger disableButtonEnhancement>
<Button appearance="primary"></Button>
</DialogTrigger>
</DialogActions>
</DialogBody>
</DialogSurface>
</Dialog>
<div className="flex space-between gap-3">
<Button onClick={selectFiles}></Button>
<Button onClick={() => setItems([])}></Button>
<Button
appearance="primary"
onClick={() => {
startProcess()
}}
disabled={isProcessing}
>
{isProcessing ? '处理中...' : '开始处理'}
</Button>
</div> </div>
<div className="mt-3">
<Field label="保存转换后的文件到">
<RadioGroup
layout="horizontal"
value={saveTo}
onChange={(_, data) => {
setSaveTo(data.value as SaveTo)
if (data.value === 'original') {
setSavePath('')
}
}}
>
<Radio value="original" label="源文件所在目录" />
<Radio value="custom" label="自定义保存目录" />
{saveTo === 'custom' && (
<Input
placeholder="点击来选择保存目录"
value={savePath}
readOnly
style={{ flexGrow: 1 }}
onClick={() => {
SelectFolder().then(path => {
if (path) {
setSavePath(path)
}
})
}}
/>
)}
</RadioGroup>
</Field>
</div>
<Table
ref={tableRef}
arial-label="Default table"
style={{ minWidth: '510px' }}
size="small"
className="mt-3"
>
<TableHeader>
<TableRow>
{columns.map(column => (
<TableHeaderCell
key={column.columnId}
{...columnSizing_unstable.getTableHeaderCellProps(column.columnId)}
>
{column.renderHeaderCell()}
</TableHeaderCell>
))}
</TableRow>
</TableHeader>
<TableBody>
{items.map((file, index) => (
<TableRow key={index}>
<TableCell>
<TableCellLayout media={statusMapIcon(file.status)}>
{statusMapText(file.status)}
</TableCellLayout>
</TableCell>
<TableCell>{file.file}</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</div> </div>
) )
} }

View File

@ -1,3 +1,10 @@
@tailwind base; @tailwind base;
@tailwind components; @tailwind components;
@tailwind utilities; @tailwind utilities;
/* Set automatic background color */
@media (prefers-color-scheme: dark) {
body {
background-color: #292929;
}
}

View File

@ -1,14 +1,35 @@
import {createRoot} from 'react-dom/client' import { createRoot } from 'react-dom/client'
import React, { useEffect, useState } from 'react'
import './main.css' import './main.css'
import App from './App' import App from './App'
import { FluentProvider, webLightTheme } from '@fluentui/react-components'; import { FluentProvider, webLightTheme, webDarkTheme } from '@fluentui/react-components'
const container = document.getElementById('root') const Root: React.FC = () => {
const [isDarkMode, setIsDarkMode] = useState(
window.matchMedia('(prefers-color-scheme: dark)').matches
)
const root = createRoot(container!) useEffect(() => {
const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)')
root.render( const handleChange = (e: MediaQueryListEvent) => {
<FluentProvider theme={webLightTheme}> setIsDarkMode(e.matches)
}
// 监听系统主题变化
mediaQuery.addEventListener('change', handleChange)
// 清理监听器
return () => {
mediaQuery.removeEventListener('change', handleChange)
}
}, [])
return (
<FluentProvider theme={isDarkMode ? webDarkTheme : webLightTheme}>
<App /> <App />
</FluentProvider>, </FluentProvider>
) )
}
createRoot(document.getElementById('root')!).render(<Root />)

8
frontend/src/types.ts Normal file
View File

@ -0,0 +1,8 @@
export type Status = 'pending' | 'processing' | 'done' | 'error';
export type SaveTo = 'original' | 'custom'
export type Item = {
status: Status;
file: string;
}

View File

@ -1,4 +1,9 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT // This file is automatically generated. DO NOT EDIT
import {main} from '../models';
export function Greet(arg1:string):Promise<string>; export function ProcessFiles(arg1:Array<main.NcmFile>,arg2:string):Promise<void>;
export function SelectFiles():Promise<Array<string>>;
export function SelectFolder():Promise<string>;

View File

@ -2,6 +2,14 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT // This file is automatically generated. DO NOT EDIT
export function Greet(arg1) { export function ProcessFiles(arg1, arg2) {
return window['go']['main']['App']['Greet'](arg1); return window['go']['main']['App']['ProcessFiles'](arg1, arg2);
}
export function SelectFiles() {
return window['go']['main']['App']['SelectFiles']();
}
export function SelectFolder() {
return window['go']['main']['App']['SelectFolder']();
} }

19
frontend/wailsjs/go/models.ts Executable file
View File

@ -0,0 +1,19 @@
export namespace main {
export class NcmFile {
Name: string;
Status: string;
static createFrom(source: any = {}) {
return new NcmFile(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.Name = source["Name"];
this.Status = source["Status"];
}
}
}

13
go.mod
View File

@ -4,10 +4,18 @@ go 1.23.0
toolchain go1.23.3 toolchain go1.23.3
require github.com/wailsapp/wails/v2 v2.9.2 require (
git.taurusxin.com/taurusxin/ncmdump-go v0.0.0-20241125060401-1765813f08ed
github.com/wailsapp/wails/v2 v2.9.2
)
require ( require (
github.com/TwiN/go-color v1.4.1 // indirect
github.com/bep/debounce v1.2.1 // indirect github.com/bep/debounce v1.2.1 // indirect
github.com/bogem/id3v2/v2 v2.1.4 // indirect
github.com/go-flac/flacpicture v0.3.0 // indirect
github.com/go-flac/flacvorbis v0.2.0 // indirect
github.com/go-flac/go-flac v1.0.0 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-ole/go-ole v1.3.0 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/google/uuid v1.6.0 // indirect github.com/google/uuid v1.6.0 // indirect
@ -24,6 +32,9 @@ require (
github.com/pkg/errors v0.9.1 // indirect github.com/pkg/errors v0.9.1 // indirect
github.com/rivo/uniseg v0.4.7 // indirect github.com/rivo/uniseg v0.4.7 // indirect
github.com/samber/lo v1.47.0 // indirect github.com/samber/lo v1.47.0 // indirect
github.com/tidwall/gjson v1.18.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/tkrajina/go-reflector v0.5.8 // indirect github.com/tkrajina/go-reflector v0.5.8 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect github.com/valyala/fasttemplate v1.2.2 // indirect

40
go.sum
View File

@ -1,7 +1,19 @@
git.taurusxin.com/taurusxin/ncmdump-go v0.0.0-20241125060401-1765813f08ed h1:s69G8VyfG5wTlj4f8UGokg6XDYeFpnETXYYOz5jNCqM=
git.taurusxin.com/taurusxin/ncmdump-go v0.0.0-20241125060401-1765813f08ed/go.mod h1:6kRSwUFM9BZwvDrg6MEPBn+29+Q2131QjK/URWO7seg=
github.com/TwiN/go-color v1.4.1 h1:mqG0P/KBgHKVqmtL5ye7K0/Gr4l6hTksPgTgMk3mUzc=
github.com/TwiN/go-color v1.4.1/go.mod h1:WcPf/jtiW95WBIsEeY1Lc/b8aaWoiqQpu5cf8WFxu+s=
github.com/bep/debounce v1.2.1 h1:v67fRdBA9UQu2NhLFXrSg0Brw7CexQekrBwDMM8bzeY= github.com/bep/debounce v1.2.1 h1:v67fRdBA9UQu2NhLFXrSg0Brw7CexQekrBwDMM8bzeY=
github.com/bep/debounce v1.2.1/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0= github.com/bep/debounce v1.2.1/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0=
github.com/bogem/id3v2/v2 v2.1.4 h1:CEwe+lS2p6dd9UZRlPc1zbFNIha2mb2qzT1cCEoNWoI=
github.com/bogem/id3v2/v2 v2.1.4/go.mod h1:l+gR8MZ6rc9ryPTPkX77smS5Me/36gxkMgDayZ9G1vY=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-flac/flacpicture v0.3.0 h1:LkmTxzFLIynwfhHiZsX0s8xcr3/u33MzvV89u+zOT8I=
github.com/go-flac/flacpicture v0.3.0/go.mod h1:DPbrzVYQ3fJcvSgLFp9HXIrEQEdfdk/+m0nQCzwodZI=
github.com/go-flac/flacvorbis v0.2.0 h1:KH0xjpkNTXFER4cszH4zeJxYcrHbUobz/RticWGOESs=
github.com/go-flac/flacvorbis v0.2.0/go.mod h1:uIysHOtuU7OLGoCRG92bvnkg7QEqHx19qKRV6K1pBrI=
github.com/go-flac/go-flac v1.0.0 h1:6qI9XOVLcO50xpzm3nXvO31BgDgHhnr/p/rER/K/doY=
github.com/go-flac/go-flac v1.0.0/go.mod h1:WnZhcpmq4u1UdZMNn9LYSoASpWOCMOoxXxcWEHSzkW8=
github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=
github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78=
github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
@ -45,6 +57,13 @@ github.com/samber/lo v1.47.0 h1:z7RynLwP5nbyRscyvcD043DWYoOcYRv3mV8lBeqOCLc=
github.com/samber/lo v1.47.0/go.mod h1:RmDH9Ct32Qy3gduHQuKJ3gW1fMHAnE/fAzQuf6He5cU= github.com/samber/lo v1.47.0/go.mod h1:RmDH9Ct32Qy3gduHQuKJ3gW1fMHAnE/fAzQuf6He5cU=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY=
github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4=
github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
github.com/tkrajina/go-reflector v0.5.8 h1:yPADHrwmUbMq4RGEyaOUpz2H90sRsETNVpjzo3DLVQQ= github.com/tkrajina/go-reflector v0.5.8 h1:yPADHrwmUbMq4RGEyaOUpz2H90sRsETNVpjzo3DLVQQ=
github.com/tkrajina/go-reflector v0.5.8/go.mod h1:ECbqLgccecY5kPmPmXg1MrHW585yMcDkVl6IvJe64T4= github.com/tkrajina/go-reflector v0.5.8/go.mod h1:ECbqLgccecY5kPmPmXg1MrHW585yMcDkVl6IvJe64T4=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
@ -57,23 +76,44 @@ github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhw
github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
github.com/wailsapp/wails/v2 v2.9.2 h1:Xb5YRTos1w5N7DTMyYegWaGukCP2fIaX9WF21kPPF2k= github.com/wailsapp/wails/v2 v2.9.2 h1:Xb5YRTos1w5N7DTMyYegWaGukCP2fIaX9WF21kPPF2k=
github.com/wailsapp/wails/v2 v2.9.2/go.mod h1:uehvlCwJSFcBq7rMCGfk4rxca67QQGsbg5Nm4m9UnBs= github.com/wailsapp/wails/v2 v2.9.2/go.mod h1:uehvlCwJSFcBq7rMCGfk4rxca67QQGsbg5Nm4m9UnBs=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ=
golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo=
golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s=
golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug=
golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

View File

@ -18,8 +18,8 @@ func main() {
// Create application with options // Create application with options
err := wails.Run(&options.App{ err := wails.Run(&options.App{
Title: "ncmdump-gui", Title: "ncmdump-gui",
Width: 600, Width: 750,
Height: 400, Height: 500,
AssetServer: &assetserver.Options{ AssetServer: &assetserver.Options{
Assets: assets, Assets: assets,
}, },