kaorahi / lizgoban

Leela Zero & KataGo visualizer
GNU General Public License v3.0
169 stars 28 forks source link

When opening SGF files etc, can the file format be restricted for selection? #105

Closed qcgm1978 closed 9 months ago

qcgm1978 commented 9 months ago

This would make it easier to choose the appropriate files. "Open SGF etc" could be changed to "Open SGF, GIB ...". For example, like this:

function select_files(title, dir) {
    const filters = [
        {
          name: 'Go Game Files',
          extensions: ['sgf', 'gib', 'ngf', 'ugf', 'ugi']
        }
      ]
    return dialog.showOpenDialogSync(null, {
        properties: ['openFile'], title: title,
        defaultPath: dir,filters
    }) || []
}
截屏2023-12-11 21 07 39
kaorahi commented 9 months ago

implemented (30cc6baa1). thx for the suggestion!

qcgm1978 commented 9 months ago

It works well