diff --git a/atom/browser/api/atom_api_notification.cc b/atom/browser/api/atom_api_notification.cc index fa7d86d1e7af..7119df3767dd 100644 --- a/atom/browser/api/atom_api_notification.cc +++ b/atom/browser/api/atom_api_notification.cc @@ -29,14 +29,14 @@ struct Converter { if (!dict.Get("type", &(out->type))) { return false; } - dict.Get("label", &(out->label)); + dict.Get("text", &(out->text)); return true; } static v8::Local ToV8(v8::Isolate* isolate, brightray::NotificationAction val) { mate::Dictionary dict = mate::Dictionary::CreateEmpty(isolate); - dict.Set("label", val.label); + dict.Set("text", val.text); dict.Set("type", val.type); return dict.GetHandle(); } diff --git a/brightray/browser/mac/cocoa_notification.mm b/brightray/browser/mac/cocoa_notification.mm index 8e0d176caece..dda650079d25 100644 --- a/brightray/browser/mac/cocoa_notification.mm +++ b/brightray/browser/mac/cocoa_notification.mm @@ -57,7 +57,7 @@ void CocoaNotification::Show(const base::string16& title, if (action.type == base::UTF8ToUTF16("button")) { [notification_ setHasActionButton:true]; - [notification_ setActionButtonTitle:base::SysUTF16ToNSString(action.label)]; + [notification_ setActionButtonTitle:base::SysUTF16ToNSString(action.text)]; actionIndex_ = i; } } diff --git a/brightray/browser/notification.h b/brightray/browser/notification.h index 6af0f907cc9f..1cf57db9d679 100644 --- a/brightray/browser/notification.h +++ b/brightray/browser/notification.h @@ -21,7 +21,7 @@ class NotificationPresenter; struct NotificationAction { base::string16 type; - base::string16 label; + base::string16 text; }; class Notification { diff --git a/docs/api/structures/notification-action.md b/docs/api/structures/notification-action.md index d39a97da24a8..397e66d4103c 100644 --- a/docs/api/structures/notification-action.md +++ b/docs/api/structures/notification-action.md @@ -1,13 +1,13 @@ # NotificationAction Object * `type` String - The type of action, can be `button`. -* `label` String - The label for the given action. +* `text` String - (optional) The label for the given action. ## Platform / Action Support -| Action Type | Platform Support | Limitations | -|-------------|------------------|-------------| -| `button` | macOS | Maximum of one button, if multiple are provided only the last is used. This action is also incomptible with `hasReply` and will be ignored if `hasReply` is `true`. | +| Action Type | Platform Support | Usage of `text` | Default `text` | Limitations | +|-------------|------------------|------------------|-------------| +| `button` | macOS | Used as the label for the button | "Show" | Maximum of one button, if multiple are provided only the last is used. This action is also incomptible with `hasReply` and will be ignored if `hasReply` is `true`. | ### Button support on macOS