Skip to content

Commit a97fc06

Browse files
committed
feat(settings): mirror restrictedShapeFamilies in magneticBuilderSettings
Mirrors the MagneticBuilder-side addition so host apps using the OMWebFrontend settings store (e.g. el-choker, where main.js wires $settingsStore to this definition rather than MagneticBuilder's) can pin the whitelist on boot. taskQueue.js consumes the field with optional chaining; this commit just adds it to the default + reset shape so persisted settings include the field consistently.
1 parent cedf928 commit a97fc06

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎src/stores/settings.js‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ export const useSettingsStore = defineStore("settings", () => {
4545
enableSimulation: true,
4646
enableAutoSimulation: true,
4747
enableDebugConsole: false,
48+
// Optional whitelist of core shape families (case-insensitive codes
49+
// like "t", "e", "etd"). When null (default) all families MKF reports
50+
// are shown. When set to an array, both Basic and Advanced core
51+
// selectors only list families whose lowercase code is in the array.
52+
// Used by host apps (e.g. el-choker which only supports toroidal
53+
// cores) to restrict the catalog without forking MagneticBuilder.
54+
restrictedShapeFamilies: null,
4855
})
4956

5057
const magneticAdviserSettings = ref({
@@ -84,6 +91,7 @@ export const useSettingsStore = defineStore("settings", () => {
8491
enableSimulation: true,
8592
enableAutoSimulation: true,
8693
enableDebugConsole: false,
94+
restrictedShapeFamilies: null,
8795
};
8896
this.coreAdviserSettings ={
8997
weights: null,

0 commit comments

Comments
 (0)