Skip to content

Commit 55cf12e

Browse files
committed
fix: make the settings a global setting
1 parent 578f366 commit 55cf12e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

packages/yasgui/src/PersistentConfig.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export interface PersistedJson {
1616
orientation?: "vertical" | "horizontal";
1717
showSnippetsBar?: boolean;
1818
disabledDevButtons?: string[]; // Endpoints of developer-configured buttons that are disabled by user
19+
pluginOrder?: { select?: string[]; construct?: string[] }; // Global plugin order preference
1920
}
2021
function getDefaults(): PersistedJson {
2122
return {
@@ -268,4 +269,19 @@ export default class PersistentConfig {
268269
}
269270
}
270271
}
272+
273+
/**
274+
* Get global plugin order preference
275+
*/
276+
public getPluginOrder(): { select?: string[]; construct?: string[] } | undefined {
277+
return this.persistedJson.pluginOrder;
278+
}
279+
280+
/**
281+
* Set global plugin order preference
282+
*/
283+
public setPluginOrder(order: { select?: string[]; construct?: string[] }) {
284+
this.persistedJson.pluginOrder = order;
285+
this.toStorage();
286+
}
271287
}

0 commit comments

Comments
 (0)