Skip to content

Commit

Permalink
Enable testing viewing of v3 (breaks v2 for now!)
Browse files Browse the repository at this point in the history
Signed-off-by: itowlson <[email protected]>
  • Loading branch information
itowlson committed Oct 8, 2024
1 parent 6a52c81 commit 8dd50f8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
5 changes: 5 additions & 0 deletions spin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ id = "trigger-bartholomew-spin-v2"
component = "bartholomew-spin-v2"
route = "/spin/v2/..."

[[trigger.http]]
id = "trigger-bartholomew-spin-v3"
component = "bartholomew-spin-v2"
route = "/spin/v3/..."

[[trigger.http]]
id = "trigger-redirect-wasm-langs-root"
component = "redirect-wasm-langs-root"
Expand Down
5 changes: 3 additions & 2 deletions templates/page_lang.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
<option value="/spin/v1/index" {{#if (active_project request.spin-full-url "/spin/v1/" )}} selected
{{/if}}>Spin v1.x</option>
</select>
{{#if (active_project request.spin-full-url "/spin/v2/" )}}
{{> spin_sidebar_v2 }}
{{! TODO: How to do an if-elseif-else }}
{{#if (active_project request.spin-full-url "/spin/v3/" )}}
{{> spin_sidebar_v3 }}
{{else}}
{{> spin_sidebar }}
{{/if}}
Expand Down
5 changes: 3 additions & 2 deletions templates/spin_main.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
<option value="/spin/v1/index" {{#if (active_project request.spin-full-url "/spin/v1/" )}} selected
{{/if}}>Spin v1.x</option>
</select>
{{#if (active_project request.spin-full-url "/spin/v2/" )}}
{{> spin_sidebar_v2 }}
{{! TODO: How to do an if-elseif-else }}
{{#if (active_project request.spin-full-url "/spin/v3/" )}}
{{> spin_sidebar_v3 }}
{{else}}
{{> spin_sidebar }}
{{/if}}
Expand Down

0 comments on commit 8dd50f8

Please sign in to comment.