mirror of
https://github.com/status-im/consul.git
synced 2025-01-10 05:45:46 +00:00
e5948e8eb4
* Initial work for sidenav * Use HDS::Text * Add resolution for ember-element-helper * WIP dc selector * Update HCP Home link * DC selector * Hook up remaining selectors * Fix settings and tutorial links * Remove comments * Remove skip-links * Replace auth with new dropdown * Use href-to helper for sidenav links * Changelog * Add description to NavSelector * Wrap version in footer and role * Fix login tests * Add data-test selectors for namespaces * Fix datacenter disclosure menu test * Stop rendering auth dialog if acls are disabled * Update disabled selector state and token selector * Fix logic in ACL selector * Fix HCP Home integration test * Remove toggling the sidenav in tests * Add sidenav to eng docs * Re-add debug navigation for eng docs * Remove ember-in-viewport * Remove unused styles * Upgrade @hashicorp/design-system-componentseee * Add translations for side-nav * Only show back to hcp link if url is present * Disable responsive due to a11y-dialog issue
30 lines
651 B
JavaScript
30 lines
651 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import Component from '@glimmer/component';
|
|
import { action } from '@ember/object';
|
|
import { tracked } from '@glimmer/tracking';
|
|
|
|
export default class NavSelectorComponent extends Component {
|
|
@tracked search = '';
|
|
|
|
get filteredItems() {
|
|
const lowerCaseSearch = this.search.toLowerCase();
|
|
|
|
if (lowerCaseSearch) {
|
|
return this.args.items.filter((item) =>
|
|
item[this.args.key].toLowerCase().includes(lowerCaseSearch)
|
|
);
|
|
} else {
|
|
return this.args.items;
|
|
}
|
|
}
|
|
|
|
@action
|
|
onSearchInput(e) {
|
|
this.search = e.target.value;
|
|
}
|
|
}
|