Skip to content

Commit bfd0bee

Browse files
committed
fix: menu facade + better default for quit
1 parent c1f334d commit bfd0bee

File tree

2 files changed

+23
-18
lines changed

2 files changed

+23
-18
lines changed

src/Facades/Menu.php

+19-18
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,26 @@
1919
* @method static Link route(string $url, string $label = null, ?string $hotkey = null)
2020
* @method static Radio radio(string $label, bool $checked = false, ?string $hotkey = null)
2121
* @method static Role app()
22-
* @method static Role file()
23-
* @method static Role edit()
24-
* @method static Role view()
25-
* @method static Role window()
26-
* @method static Role help()
27-
* @method static Role fullscreen()
22+
* @method static Role about(string $label = null)
23+
* @method static Role file(string $label = null)
24+
* @method static Role edit(string $label = null)
25+
* @method static Role view(string $label = null)
26+
* @method static Role window(string $label = null)
27+
* @method static Role help(string $label = null)
28+
* @method static Role fullscreen(string $label = null)
2829
* @method static Role separator()
29-
* @method static Role devTools()
30-
* @method static Role undo()
31-
* @method static Role redo()
32-
* @method static Role cut()
33-
* @method static Role copy()
34-
* @method static Role paste()
35-
* @method static Role pasteAndMatchStyle()
36-
* @method static Role reload()
37-
* @method static Role minimize()
38-
* @method static Role close()
39-
* @method static Role quit()
40-
* @method static Role hide()
30+
* @method static Role devTools(string $label = null)
31+
* @method static Role undo(string $label = null)
32+
* @method static Role redo(string $label = null)
33+
* @method static Role cut(string $label = null)
34+
* @method static Role copy(string $label = null)
35+
* @method static Role paste(string $label = null)
36+
* @method static Role pasteAndMatchStyle(string $label = null)
37+
* @method static Role reload(string $label = null)
38+
* @method static Role minimize(string $label = null)
39+
* @method static Role close(string $label = null)
40+
* @method static Role quit(string $label = null)
41+
* @method static Role hide(string $label = null)
4142
* @method static void create(MenuItem ...$items)
4243
* @method static void default()
4344
*/

src/Menu/MenuBuilder.php

+4
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ public function close(?string $label = null): Items\Role
150150

151151
public function quit(?string $label = null): Items\Role
152152
{
153+
if (is_null($label)) {
154+
$label = config('app.name');
155+
}
156+
153157
return new Items\Role(RolesEnum::QUIT, $label);
154158
}
155159

0 commit comments

Comments
 (0)