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

client: Reload entries by clicking on active menu item #1300

Merged
merged 6 commits into from
Jan 5, 2022
Merged

Commits on Jan 5, 2022

  1. client: Reload entries by clicking on active menu item

    This is quite hacky – router does not re-render the route when clicking
    on an already active link because its data is based on the document.location.
    To bypass this, we need to pass an extra value in the location’s state object
    that will let us know we should reload. And for similar reasons, it cannot
    just be a boolean (or we would have to clear the state each time to be able
    to tell when the value changes again) so we are back at increasing counters.
    
    Unfortunately, that is not end of it since any navigation would clear
    the state, triggering another reload so we also need to use another
    counter that only increases when the counter in location state increases.
    
    Fixes: #1287
    jtojnar committed Jan 5, 2022
    Configuration menu
    Copy the full SHA
    3e1104d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    238a055 View commit details
    Browse the repository at this point in the history
  3. client: Warn about unsaved sources changes on leaving settings

    And also on cancelling editing.
    jtojnar committed Jan 5, 2022
    Configuration menu
    Copy the full SHA
    3eaf1f5 View commit details
    Browse the repository at this point in the history
  4. client: Hide edit button when editing a source

    It would clear the changes, potentially leading to data loss.
    
    One can still reset the changes by cancelling the editing and clicking edit again.
    jtojnar committed Jan 5, 2022
    Configuration menu
    Copy the full SHA
    2403301 View commit details
    Browse the repository at this point in the history
  5. client: Turn toolbar buttons to links

    when they have a route associated.
    jtojnar committed Jan 5, 2022
    Configuration menu
    Copy the full SHA
    7e18294 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    54f1530 View commit details
    Browse the repository at this point in the history