MCPcopy Create free account
hub / github.com/FlashpointProject/launcher / openEditor

Function openEditor

src/renderer/components/GameConfigDialog.tsx:40–57  ·  view source on GitHub ↗
(config: GameConfig, idx: number)

Source from the content-addressed store, hash-verified

38 }, []);
39
40 const openEditor = async (config: GameConfig, idx: number) => {
41 // Populate config schemas
42 const pairs = config.middleware.map(m => {
43 const pair: MiddlewareVersionPair = {
44 id: m.middlewareId,
45 version: m.version
46 };
47 return pair;
48 });
49 const schemas = await window.Shared.back.request(BackIn.GET_MIDDLEWARE_CONFIG_SCHEMAS, pairs);
50 const copy: GameConfigEdit = {
51 ...deepCopy(config),
52 schemas,
53 };
54 setConfigCopy(copy);
55 setCopyIdx(idx);
56 setEditorOpen(true);
57 };
58
59 const saveConfigCopy = async () => {
60 if (configCopy) {

Callers 1

GameConfigDialogFunction · 0.85

Calls 3

deepCopyFunction · 0.90
mapMethod · 0.65
requestMethod · 0.45

Tested by

no test coverage detected