message: Support tagging hotkeys
diff: @@ -5,6 +5,8 @@ import { connect } from 'react-redux';
  import { DimItem } from '../inventory/item-types';
  import { RootState } from '../store/reducers';
  import './item-tag.scss';
  +import { $rootScope } from 'ngimport';
  +import { hotkeys } from '../ngimport-more';
  interface ProvidedProps {
  item: DimItem;
  @@ -21,13 +23,42 @@ function mapStateToProps(state: RootState, props: ProvidedProps): StoreProps {
  type Props = ProvidedProps & StoreProps;
  class ItemTagSelector extends React.Component<Props> {
  + private $scope = $rootScope.$new(true);
  +
  + componentDidMount() {
  + const hot = hotkeys.bindTo(this.$scope);
  + itemTags.forEach((tag) => {
  + if (tag.hotkey) {
  + hot.add({
  + combo: [tag.hotkey],
  + description: t('Hotkey.MarkItemAs', {
  + tag: t(tag.label)
  + }),
  + callback: () => {
  + if (this.props.item.dimInfo && this.props.item.dimInfo.tag === tag.type) {
  + this.setTag('none');
  + } else {
  + this.setTag(tag.type!);
  + }
  + }
  + });
  + }
  + });
  + }
  +
  + componentWillUnmount() {
  + this.$scope.$destroy();
  + }
  +
  render() {
  const { tag } = this.props;
  + console.log({ tag });
  +
  return (
  - <select className="item-tag-selector" onChange={this.onTagUpdated} value={tag}>
  + <select className="item-tag-selector" onChange={this.onTagUpdated} value={tag || 'none'}>
  {itemTags.map((tagOption) => (
  - <option key={tagOption.type || 'reset'} value={tagOption.type}>
  + <option key={tagOption.type || 'reset'} value={tagOption.type || 'none'}>
  {t(tagOption.label)}
  </option>
  ))}
  @@ -37,9 +68,13 @@ class ItemTagSelector extends React.Component<Props> {
  private onTagUpdated = (e) => {
  const tag = e.currentTarget.value as TagValue;
  + this.setTag(tag);
  + };
  +
  + private setTag = (tag?: TagValue | 'none') => {
  const info = this.props.item.dimInfo;
  if (info) {
  - if (tag) {
  + if (tag && tag !== 'none') {
  info.tag = tag;
  } else {
  delete info.tag;
  