From 67f01b31572a2206013ef71b4f605844cba1215a Mon Sep 17 00:00:00 2001 From: WINBIGFOX Date: Mon, 17 Mar 2025 23:33:39 +0100 Subject: [PATCH 1/2] feat: add openAtLogin method to manage app startup behavior --- src/App.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/App.php b/src/App.php index 81f1a26c..1acedad3 100644 --- a/src/App.php +++ b/src/App.php @@ -57,4 +57,17 @@ public function clearRecentDocuments(): void { $this->client->delete('app/recent-documents'); } + + public function openAtLogin(?bool $open = null): bool + { + if ($open === null) { + return (bool) $this->client->get('app/open-at-login')->json('open'); + } + + $this->client->post('app/open-at-login', [ + 'open' => $open, + ]); + + return $open; + } } From 5d80f9b6e72a050b4a8d197b2190295e46f554de Mon Sep 17 00:00:00 2001 From: WINBIGFOX Date: Tue, 18 Mar 2025 10:01:42 +0100 Subject: [PATCH 2/2] Method for facade added --- src/Facades/App.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Facades/App.php b/src/Facades/App.php index 6f3d99a6..0c9a34d3 100644 --- a/src/Facades/App.php +++ b/src/Facades/App.php @@ -13,6 +13,7 @@ * @method static void addRecentDocument(string $path) * @method static array recentDocuments() * @method static void clearRecentDocuments() + * @method static bool openAtLogin(?bool $open = null) */ class App extends Facade {