mirror of
https://github.com/status-im/consul.git
synced 2025-01-12 06:44:41 +00:00
e4e85a8f83
* Add before and after skip links portals * Move EmptyState and ErrorState to use a @login action/function * Move page title setting to the Route component * Add Routes and Outlets everywhere, and use those to access login modal * Add some aria-labels to the modals * Docs * Remove the label/input now we no longer need it, fixup pageobject * Add basic modal docs * Switch out old toggle names for ids * Wrap nspace Route template in a Route component * type > class
25 lines
501 B
JavaScript
25 lines
501 B
JavaScript
import Component from '@glimmer/component';
|
|
import { inject as service } from '@ember/service';
|
|
import { action } from '@ember/object';
|
|
import { tracked } from '@glimmer/tracking';
|
|
|
|
export default class RouteComponent extends Component {
|
|
@service('routlet') routlet;
|
|
|
|
@tracked model;
|
|
|
|
get title() {
|
|
return this.args.title;
|
|
}
|
|
|
|
@action
|
|
connect() {
|
|
this.routlet.addRoute(this.args.name, this);
|
|
}
|
|
|
|
@action
|
|
disconnect() {
|
|
this.routlet.removeRoute(this.args.name, this);
|
|
}
|
|
}
|