Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS dialog API #16

Closed
ccorcos opened this issue Oct 12, 2022 · 8 comments
Closed

OS dialog API #16

ccorcos opened this issue Oct 12, 2022 · 8 comments
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@ccorcos
Copy link

ccorcos commented Oct 12, 2022

Things like the native open file dialog would be great.

@heapwolf
Copy link
Member

heapwolf commented Oct 12, 2022

it works. Maybe not documented?

    const filePaths = await window.parent.dialog({
      type: 'open', // or 'save'
      defaultPath: defaultPathFromSettings,
      allowFiles: true,
      title: 'Choose a file'
    })

    if (!filePaths || filePaths.length === 0 || filePaths[0] === '') return

    const file = filePaths[0]

@heapwolf heapwolf added documentation Improvements or additions to documentation question Further information is requested labels Oct 12, 2022
@ccorcos
Copy link
Author

ccorcos commented Oct 12, 2022

Oh sweet.

@heapwolf
Copy link
Member

Oh, I think the reason why it's not documented is because I wanted to make the javascript part of the API conform to the api on MDN

@ccorcos
Copy link
Author

ccorcos commented Oct 12, 2022

Ah, thats cool. I'm trying to hunt around for where this code is, but I'm not seeing a dialog property on the system object: https://github.com/socketsupply/ssc-node/blob/master/index.js

@jwerle
Copy link
Member

jwerle commented Oct 12, 2022

@trevnorris
Copy link
Contributor

@jwerle Has this API been documented?

@jwerle
Copy link
Member

jwerle commented Jan 17, 2023

@jwerle Has this API been documented?

not yet!

@chicoxyzzy
Copy link
Member

The API has changed and is documented now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants