mirror of
https://github.com/kemko/nomad.git
synced 2026-01-03 08:55:43 +03:00
24 lines
604 B
JavaScript
24 lines
604 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import { action } from '@ember/object';
|
|
import Component from '@glimmer/component';
|
|
import KeyboardShortcutModifier from 'nomad-ui/modifiers/keyboard-shortcut';
|
|
import { inject as service } from '@ember/service';
|
|
|
|
export default class BreadcrumbsTemplate extends Component {
|
|
@service router;
|
|
|
|
@action
|
|
traverseUpALevel(args) {
|
|
const [path, ...rest] = args;
|
|
this.router.transitionTo(path, ...rest);
|
|
}
|
|
|
|
get maybeKeyboardShortcut() {
|
|
return this.args.isOneCrumbUp() ? KeyboardShortcutModifier : null;
|
|
}
|
|
}
|