Skip to content

Commit a2cd865

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/add-sleep-option-to-queue-config
2 parents 3f355a8 + 949c1ac commit a2cd865

File tree

6 files changed

+29
-1
lines changed

6 files changed

+29
-1
lines changed

.github/workflows/fix-php-code-style-issues.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Checkout code
2323
uses: actions/checkout@v4
2424
with:
25-
ref: ${{ github.head_ref }}
25+
ref: ${{ github.head_ref || github.sha }}
2626

2727
- name: Check PHP code style issues
2828
if: github.event_name == 'push'

config/nativephp.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@
3636
*/
3737
'copyright' => env('NATIVEPHP_APP_COPYRIGHT'),
3838

39+
/**
40+
* The description of your application.
41+
*/
42+
'description' => env('NATIVEPHP_APP_DESCRIPTION', 'An awesome app built with NativePHP'),
43+
44+
/**
45+
* The Website of your application.
46+
*/
47+
'website' => env('NATIVEPHP_APP_WEBSITE', 'https://nativephp.com'),
48+
3949
/**
4050
* The default service provider for your application. This provider
4151
* takes care of bootstrapping your application and configuring

src/App.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ public function quit(): void
1414
$this->client->post('app/quit');
1515
}
1616

17+
public function relaunch(): void
18+
{
19+
$this->client->post('app/relaunch');
20+
}
21+
1722
public function focus(): void
1823
{
1924
$this->client->post('app/focus');

src/Facades/App.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
/**
88
* @method static void quit()
9+
* @method static void relaunch()
910
* @method static void focus()
1011
* @method static void hide()
1112
* @method static bool isHidden()

src/MenuBar/MenuBar.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ class MenuBar
3232

3333
protected bool $showDockIcon = false;
3434

35+
protected bool $showOnAllWorkspaces = false;
36+
3537
protected Client $client;
3638

3739
public function __construct()
@@ -95,6 +97,13 @@ public function alwaysOnTop($alwaysOnTop = true): self
9597
return $this;
9698
}
9799

100+
public function showOnAllWorkspaces($showOnAllWorkspaces = true): self
101+
{
102+
$this->showOnAllWorkspaces = $showOnAllWorkspaces;
103+
104+
return $this;
105+
}
106+
98107
public function withContextMenu(Menu $menu): self
99108
{
100109
$this->contextMenu = $menu;
@@ -122,6 +131,7 @@ public function toArray(): array
122131
'onlyShowContextMenu' => $this->onlyShowContextMenu,
123132
'contextMenu' => ! is_null($this->contextMenu) ? $this->contextMenu->toArray()['submenu'] : null,
124133
'alwaysOnTop' => $this->alwaysOnTop,
134+
'showOnAllWorkspaces' => $this->showOnAllWorkspaces,
125135
];
126136
}
127137
}

tests/MenuBar/MenuBarTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
$menuBar = MenuBar::create()
1010
->showDockIcon()
1111
->alwaysOnTop()
12+
->showOnAllWorkspaces()
1213
->label('milwad')
1314
->icon('nativephp.png')
1415
->url('https://github.com/milwad-dev')
@@ -22,6 +23,7 @@
2223

2324
$this->assertTrue($menuBarArray['showDockIcon']);
2425
$this->assertTrue($menuBarArray['alwaysOnTop']);
26+
$this->assertTrue($menuBarArray['showOnAllWorkspaces']);
2527
$this->assertEquals('milwad', $menuBarArray['label']);
2628
$this->assertEquals('https://github.com/milwad-dev', $menuBarArray['url']);
2729
$this->assertEquals('nativephp.png', $menuBarArray['icon']);

0 commit comments

Comments
 (0)