Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ function projectListEntryMenu(props) {
</>
)}

<Divider />

<MenuItem
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not happen as often, but it is possible for a project to be in the project list and to be unavailable. This can happen if you add a project from a shared network folder, or if you have a local folder that gets deleted. StatWrap detects that and will show an icon showing the project is "offline":

Image

If the project is offline, we should disable this menu item (or remove it) since nothing happens when you click it otherwise.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks you for this info. I fixed this in the latest commit.

c

onClick={() =>
props.onMenuClick(Messages.SHOW_ITEM_IN_FOLDER, props.project.path)
}
disabled={props.project.loadError}
>
Show in Folder
</MenuItem>

<Divider />

{/* Remove option */}
Expand Down
3 changes: 3 additions & 0 deletions app/containers/ProjectPage/ProjectPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,9 @@ class ProjectPage extends Component {
case Messages.REMOVE_PROJECT_LIST_ENTRY_REQUEST:
ipcRenderer.send(Messages.REMOVE_PROJECT_LIST_ENTRY_REQUEST, projectId);
break;
case Messages.SHOW_ITEM_IN_FOLDER:
ipcRenderer.send(Messages.SHOW_ITEM_IN_FOLDER, projectId);
break;
default:
console.warn(`Unknown project list entry menu event: ${event}`);
}
Expand Down