Skip to content

Commit

Permalink
fix #768, show another message when no extensions to open are available
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidBruchmann committed Apr 5, 2024
1 parent 37970c6 commit fcedc2d
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions Build/Sources/components/ActionButtonsComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -308,20 +308,24 @@ export const ActionButtonsComponent = (props) => {
setShow(true);
setModalTitle('Available extensions');
setModalClassname('bg-info text-dark');
let message = 'Currently no extensions are found for editing.';
if (extensions.result.length > 0) {
message = 'Please select an extension to open';
}
setModalBodyJsx(
<>
<p>Please select an extension to open</p>
<p>{message}</p>
<div className="list-group">
{extensions.result.map((extension) => (
<button
type="button"
className="list-group-item list-group-item-action"
key={extension.name}
onClick={() => handleExtensionClick(extension)}
>
{extension.name}
</button>
))}
{extensions.result.map((extension) => (
<button
type="button"
className="list-group-item list-group-item-action"
key={extension.name}
onClick={() => handleExtensionClick(extension)}
>
{extension.name}
</button>
))}
</div>
</>
);
Expand Down

0 comments on commit fcedc2d

Please sign in to comment.