Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added 'Return' button in Diagram Mode to navigate to the home screen #1134

Closed
wants to merge 1 commit into from

Conversation

satwiksps
Copy link

Pull Request - Add "Return" Button for Diagram Mode

Description

This PR implements a "Return" button on the home screen when in Diagram Mode, allowing users to easily navigate back to the main screen. The button is styled and positioned at the top-left corner of the screen.

Files Modified:

  • GraphButtons.vue:
  1. Added a new button component with a text "Return to Home".
  2. Created the goToHome method to trigger the navigation to the home route (/).
  • en.js:
  1. Added the new translation key for the return button text: "return": "Return to Home".

Screenshot

RETURN_BUTTON_PREVIEW

Motivation and Context

This feature was requested to improve navigation in the application. It provides a convenient way for users to return to the home screen while working in Diagram Mode.

How Has This Been Tested?

  • Tested in the browser to ensure the button appears in the correct position.
  • Verified that the button correctly navigates back to the home screen when clicked.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist:

  • I have performed a self-review of my code
  • I have run the application locally to verify that my changes work as expected

Related Issues

Copy link
Collaborator

@jgadsden jgadsden left a comment

Choose a reason for hiding this comment

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

Many thanks for this pull request @satwiksps
it may be that this issue and pull request has been raised on an old version of Threat Dragon (version 1.6.x)
Waiting confirmation, putting into draft in the meantime

@@ -123,6 +129,9 @@ export default {
this.graph.showGrid();
this.gridShowing = true;
}
},
goToHome() {
this.$router.push('/'); // Navigate to the home route
Copy link
Collaborator

Choose a reason for hiding this comment

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

we would need to check for modification of the diagram before exiting to the landing page

@jgadsden jgadsden removed the request for review from lreading December 3, 2024 10:21
@jgadsden jgadsden marked this pull request as draft December 3, 2024 10:22
@tom-seward
Copy link

Hi all, I can confirm that version 2.3.0 has the functionality I had in mind. Many thanks.

@jgadsden
Copy link
Collaborator

jgadsden commented Dec 4, 2024

Many thanks for the confirmation, this can now be resolved

@jgadsden jgadsden closed this Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request for a 'Return' button for home screen when in the Diagram Mode
3 participants