From abe6d6a6bad09536ebeedf976eb4b480b37a4db2 Mon Sep 17 00:00:00 2001 From: Evan Simkowitz Date: Wed, 27 Mar 2024 15:35:14 -0700 Subject: [PATCH] Add esc keybinding to all modals, add update button in About modal (#514) * Add esc keybinding to all modals, add update button in About modal * move import --- src/app/common/elements/modal.tsx | 21 +++++++---- src/app/common/modals/about.less | 12 ------ src/app/common/modals/about.tsx | 63 +++++++++++-------------------- 3 files changed, 37 insertions(+), 59 deletions(-) diff --git a/src/app/common/elements/modal.tsx b/src/app/common/elements/modal.tsx index a8bfec5fe..d114e475e 100644 --- a/src/app/common/elements/modal.tsx +++ b/src/app/common/elements/modal.tsx @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 import * as React from "react"; -import * as mobx from "mobx"; import { If } from "tsx-control-statements/components"; import ReactDOM from "react-dom"; import { Button } from "./button"; @@ -14,11 +13,15 @@ import { boundMethod } from "autobind-decorator"; interface ModalHeaderProps { onClose?: () => void; + keybindings?: boolean; title: string; } -const ModalHeader: React.FC = ({ onClose, title }) => ( +const ModalHeader: React.FC = ({ onClose, keybindings = true, title }) => (
+ + + {
{title}
} -
+ +
+ +
+
); } @@ -93,7 +76,7 @@ class AboutModal extends React.Component<{}, {}> { -
{this.getStatus(this.isUpToDate())}
+
{this.getClientVersion()}