Repository: DestinyItemManager/DIM (ts)

Issue:
add `is:currentclass` filter
add filter for finding items equippable on the current class only


Pull request description:
currentClass filter
Closes #6986

Patch:
diff --git a/config/i18n.json b/config/i18n.json
index dc64a0419..1c8bd039f 100644
--- a/config/i18n.json
+++ b/config/i18n.json
@@ -147,6 +147,7 @@
     "Combine": "Filters can be combined or grouped with parentheses, \"or\" and \"and\" to narrow down your search, for example \"{{example}}\".",
     "ContributePower": "Shows items that have power and can contribute to your power level.",
     "Curated": "Shows items that are a curated roll.",
+    "CurrentClass": "Shows items that are equippable on the currently logged in guardian.",
     "DamageType": "Shows items based on their damage type.",
     "Description": "Description",
     "Dupe": "Shows duplicate items, including reissues",
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index 915ff07dc..14319d471 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -3,6 +3,7 @@
 * Fixed wonky rank display in the phone portrait layout.
 * Removed the Infusion Finder tool - the rules for infusion are simple enough now that this doesn't offer any real help.
 * Elemental Capacitor stats are no longer added to weapons with the perk enabled.
+* Added `is:currentclass` filter, which selects items currently equippable on the logged in guardian.
 
 ## 6.80.0 <span class="changelog-date">(2021-08-29)</span>
 
diff --git a/src/app/search/search-filters/stores.tsx b/src/app/search/search-filters/stores.tsx
index 0e518252c..218c1a19b 100644
--- a/src/app/search/search-filters/stores.tsx
+++ b/src/app/search/search-filters/stores.tsx
@@ -68,6 +68,14 @@ const locationFilters: FilterDefinition[] = [
       (item) =>
         currentStore ? item.owner === currentStore.id : false,
   },
+  {
+    keywords: 'currentclass',
+    description: tl('Filter.CurrentClass'),
+    filter:
+      ({ currentStore }) =>
+      (item) =>
+        currentStore ? item.classType === currentStore.classType : false,
+  },
 ];
 
 export default locationFilters;
diff --git a/src/locale/dim.json b/src/locale/dim.json
index 95b2047d6..20a23d1d4 100644
--- a/src/locale/dim.json
+++ b/src/locale/dim.json
@@ -157,6 +157,7 @@
     "ContributePower": "Shows items that have power and can contribute to your power level.",
     "Cosmetic": "Shows items that are flair or cosmetic.",
     "Curated": "Shows items that are a curated roll.",
+    "CurrentClass": "Shows items that are equippable on the currently logged in guardian.",
     "DamageType": "Shows items based on their damage type.",
     "Description": "Description",
     "Dupe": "Shows duplicate items, including reissues",
@@ -303,16 +304,6 @@
     "Tab": "TAB",
     "Vault": "Send item to vault"
   },
-  "Infusion": {
-    "Filter": "Filter items",
-    "InfuseSource": "Select item to infuse {{name}} into",
-    "InfuseTarget": "Select item to infuse into {{name}}",
-    "InfusionMaterials": "Infusion Materials",
-    "NoItems": "No infusable items available.",
-    "NoTransfer": "Transfer infusion material\n {{target}} cannot be moved.",
-    "SwitchDirection": "Switch",
-    "TransferItems": "Transfer"
-  },
   "ItemMove": {
     "Consolidate": "Consolidated {{name}}",
     "Distributed": "Distributed {{name}}\n {{name}} is now equally divided between characters.",
@@ -580,7 +571,6 @@
     "DistributeEvenly": "Distribute Evenly",
     "Equip": "Equip",
     "EquipWithName": "Equip to {{character}}",
-    "Infuse": "Infuse",
     "LockUnlock": {
       "Lock": "Lock {{itemType}}",
       "Locked": "Locked",


Test patch:
diff --git a/src/app/search/__snapshots__/search-config.test.ts.snap b/src/app/search/__snapshots__/search-config.test.ts.snap
index 48d44af05..77ff129cd 100644
--- a/src/app/search/__snapshots__/search-config.test.ts.snap
+++ b/src/app/search/__snapshots__/search-config.test.ts.snap
@@ -20,6 +20,7 @@ Array [
   "cosmetic",
   "count",
   "curated",
+  "currentclass",
   "description",
   "dupe",
   "dupelower",