From 4cdea77c1ffc7c2b5d96cbfb41a9cc6370be4f1b Mon Sep 17 00:00:00 2001 From: John Date: Mon, 22 Jan 2024 11:31:55 +0000 Subject: [PATCH] Update dock example The new buttons resulted in window scroll bars so the window size was increased. The enable disable buttons did not take into account whether or not a dock was registered. --- how-to/register-with-dock-basic/client/src/provider.ts | 4 ++++ how-to/register-with-dock-basic/public/manifest.fin.json | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/how-to/register-with-dock-basic/client/src/provider.ts b/how-to/register-with-dock-basic/client/src/provider.ts index dff767ab78..922fe80c20 100644 --- a/how-to/register-with-dock-basic/client/src/provider.ts +++ b/how-to/register-with-dock-basic/client/src/provider.ts @@ -190,6 +190,8 @@ function setStates(isRegistered: boolean | null): void { deregisterButton && showButton && minimizeButton && + enableButton && + disableButton && showHomeButton && showNotificationButton && showStorefrontButton && @@ -202,6 +204,8 @@ function setStates(isRegistered: boolean | null): void { deregisterButton.disabled = isRegistered === null || !isRegistered; showButton.disabled = isRegistered === null || !isRegistered; minimizeButton.disabled = isRegistered === null || !isRegistered; + enableButton.disabled = isRegistered === null || !isRegistered; + disableButton.disabled = isRegistered === null || !isRegistered; showHomeButton.disabled = isRegistered === null || isRegistered; showNotificationButton.disabled = isRegistered === null || isRegistered; showStorefrontButton.disabled = isRegistered === null || isRegistered; diff --git a/how-to/register-with-dock-basic/public/manifest.fin.json b/how-to/register-with-dock-basic/public/manifest.fin.json index bec40d69d3..cba3a4fb93 100644 --- a/how-to/register-with-dock-basic/public/manifest.fin.json +++ b/how-to/register-with-dock-basic/public/manifest.fin.json @@ -10,7 +10,9 @@ "icon": "http://localhost:8080/favicon.ico", "autoShow": true, "providerUrl": "http://localhost:8080/platform/provider.html", - "preventQuitOnLastWindowClosed": true + "preventQuitOnLastWindowClosed": true, + "minWidth": 750, + "defaultWidth": 750 }, "shortcut": { "company": "OpenFin",