Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Commit

Permalink
Implement /resume_historical_location to perform no action (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
joemasilotti authored Aug 31, 2023
1 parent c3f3d90 commit da79201
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Demo/Server/app/controllers/configurations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ def show
},
{
patterns: [
"/refresh_historical_location"
"/resume_historical_location"
],
properties: {
presentation: "refresh"
presentation: "none"
},
comment: "Dismiss a modal or pop a controller then refresh with `refresh_or_redirect_to` via turbo-rails."
comment: "Skip navigation with `resume_or_redirect_to` via turbo-rails."
},
{
patterns: [
Expand Down
6 changes: 6 additions & 0 deletions Demo/Server/app/views/navigations/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
name: "Recede navigation",
description: "Pop this screen off the stack." %>

<%= render "navigations/item",
path: turbo_resume_historical_location_path,
icon: "bi-sign-stop",
name: "Resume navigation",
description: "Do nothing." %>

<%= render "navigations/item",
path: "/not_found",
icon: "bi-bug",
Expand Down
1 change: 1 addition & 0 deletions Sources/Navigation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ public enum Navigation {
case refresh
case clearAll = "clear_all"
case replaceRoot = "replace_root"
case none
}
}
2 changes: 2 additions & 0 deletions Sources/TurboNavigator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ public class TurboNavigator {
clearAll()
case .replaceRoot:
replaceRoot(with: controller)
case .none:
break // Do nothing.
}
}
}
Expand Down

0 comments on commit da79201

Please sign in to comment.