Browse Source

feat: expose showAboutPanel for MacOS (#15680)

trop[bot] 6 years ago
parent
commit
7be10d50f4
2 changed files with 7 additions and 0 deletions
  1. 2 0
      atom/browser/api/atom_api_app.cc
  2. 5 0
      docs/api/app.md

+ 2 - 0
atom/browser/api/atom_api_app.cc

@@ -1284,6 +1284,8 @@ void App::BuildPrototype(v8::Isolate* isolate,
                  base::Bind(&Browser::UpdateCurrentActivity, browser))
       .SetMethod("setAboutPanelOptions",
                  base::Bind(&Browser::SetAboutPanelOptions, browser))
+      .SetMethod("showAboutPanel",
+                 base::Bind(&Browser::ShowAboutPanel, browser))
 #endif
 #if defined(OS_WIN)
       .SetMethod("setUserTasks", base::Bind(&Browser::SetUserTasks, browser))

+ 5 - 0
docs/api/app.md

@@ -1064,6 +1064,11 @@ details. Disabled by default.
 
 **Note:** Rendering accessibility tree can significantly affect the performance of your app. It should not be enabled by default.
 
+### `app.showAboutPanel()` _macOS_
+
+Show the about panel with the values defined in the app's
+`.plist` file or with the options set via `app.setAboutPanelOptions(options)`.
+
 ### `app.setAboutPanelOptions(options)` _macOS_
 
 * `options` Object