Skip to content

Commit bb27728

Browse files
committed
wip
1 parent 34e5c07 commit bb27728

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

src/Dialog.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,22 @@ public function withHiddenFiles()
7070
return $this;
7171
}
7272

73-
public function singleFile()
73+
public function files()
7474
{
75+
$this->properties = array_diff($this->properties, ['openDirectory']);
7576
$this->properties = ['openFile'];
7677

7778
return $this;
7879
}
7980

81+
public function folders()
82+
{
83+
$this->properties = array_diff($this->properties, ['openFile']);
84+
$this->properties[] = 'openDirectory';
85+
86+
return $this;
87+
}
88+
8089
public function dontResolveSymlinks(): self
8190
{
8291
$this->properties[] = 'noResolveAliases';

src/Windows/Window.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class Window
1717

1818
protected bool $alwaysOnTop = false;
1919

20+
protected bool $showDevTools = false;
21+
2022
protected bool $resizable = true;
2123

2224
protected bool $movable = true;
@@ -46,6 +48,7 @@ public function __construct(string $id)
4648
$this->id = $id;
4749
$this->title = config('app.name');
4850
$this->url = url('/');
51+
$this->showDevTools = config('app.debug');
4952
}
5053

5154
public function id(string $id = 'main'): self
@@ -126,6 +129,13 @@ public function alwaysOnTop($alwaysOnTop = true): self
126129
return $this;
127130
}
128131

132+
public function showDevTools($showDevTools = true): self
133+
{
134+
$this->showDevTools = $showDevTools;
135+
136+
return $this;
137+
}
138+
129139
public function resizable($resizable = true): static
130140
{
131141
$this->resizable = $resizable;
@@ -188,6 +198,7 @@ public function toArray()
188198
'hasShadow' => $this->hasShadow,
189199
'frame' => $this->frame,
190200
'titleBarStyle' => $this->titleBarStyle,
201+
'showDevTools' => $this->showDevTools,
191202
'vibrancy' => $this->vibrancy,
192203
'transparency' => $this->transparent,
193204
'backgroundColor' => $this->backgroundColor,

0 commit comments

Comments
 (0)