Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions app/controllers/catch-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ import Controller from '@ember/controller';
import { action } from '@ember/object';

export default class CatchAllController extends Controller {
@action reload(event) {
event.preventDefault();
@action reload() {
this.model.transition.retry();
}

@action back() {
history.back();
}
}
3 changes: 2 additions & 1 deletion app/styles/application.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ h1 {
}
}

a {
a, .link {
color: var(--link-color);
text-decoration: none;
cursor: pointer;

&:hover {
color: var(--link-hover-color);
Expand Down
2 changes: 2 additions & 0 deletions app/styles/catch-all.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@
}

.link {
composes: button-reset from '../styles/shared/buttons.module.css';
composes: link from '../styles/application.module.css';
font-weight: 500;
}
4 changes: 2 additions & 2 deletions app/templates/catch-all.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<h1 local-class="title" data-test-title>{{or @model.title "Page not found"}}</h1>

{{#if @model.tryAgain}}
<a href="javascript:location.reload()" local-class="link" data-test-try-again {{on "click" this.reload}}>Try Again</a>
<button type="button" local-class="link" data-test-try-again {{on "click" this.reload}}>Try Again</button>
{{else}}
<a href="javascript:history.back()" local-class="link" data-test-go-back>Go Back</a>
<button type="button" local-class="link" data-test-go-back {{on "click" this.back}}>Go Back</button>
{{/if}}
</div>
</div>