File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33class {{ className }} {
44 {{> route-class-methods }}
5+
6+ {{ #each subroutes }}
7+ {{> route-class-subroute }}
8+ {{ /each }}
9+
10+ {{ #each endpoints }}
11+ {{> route-class-endpoint }}
12+ {{ /each }}
513}
Original file line number Diff line number Diff line change @@ -39,11 +39,22 @@ export const connect = (
3939
4040interface RouteLayoutContext {
4141 className : string
42+ endpoints : EndpointLayoutContext [ ]
43+ subroutes : SubrouteLayoutContext [ ]
4244 isClientSessionRoute : boolean
4345 isActionAttemptsRoute : boolean
4446 needsActionAttempts : boolean
4547}
4648
49+ interface EndpointLayoutContext {
50+ routeName : string
51+ }
52+
53+ interface SubrouteLayoutContext {
54+ methodName : string
55+ className : string
56+ }
57+
4758const setRootRouteLayoutContext = (
4859 file : Partial < RouteLayoutContext > ,
4960 _blueprint : Blueprint ,
@@ -52,6 +63,8 @@ const setRootRouteLayoutContext = (
5263 file . needsActionAttempts = false
5364 file . isClientSessionRoute = false
5465 file . isActionAttemptsRoute = false
66+ file . endpoints = [ ]
67+ file . subroutes = [ ]
5568}
5669
5770const setRouteLayoutContext = (
@@ -63,4 +76,6 @@ const setRouteLayoutContext = (
6376 file . needsActionAttempts = false
6477 file . isClientSessionRoute = route . name === '/client_sessions'
6578 file . isActionAttemptsRoute = route . name === '/action_attempts'
79+ file . endpoints = [ ]
80+ file . subroutes = [ ]
6681}
You can’t perform that action at this time.
0 commit comments