-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ratchet
committed
Apr 17, 2023
1 parent
70be0ed
commit 986caf3
Showing
6 changed files
with
53 additions
and
90 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
import React from "react"; | ||
import { TextField } from "@mui/material"; | ||
|
||
export function NameProperty({ value }) { | ||
function NameProperty({ value }) { | ||
return <TextField label="name" variant="standard" value={value} disabled={true} /> | ||
} | ||
} | ||
|
||
export default NameProperty; | ||
export { NameProperty }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React from "react"; | ||
import { Button, TextField } from "@mui/material"; | ||
import IPCClient from "../../../electron-app/events/ipc-client"; | ||
|
||
function ObjectProperty({ history: [activeHistory, setHistory], value, index, names, pkgName, pkgExt }) { | ||
async function onClick() { | ||
const object = await IPCClient.send("user-interaction", { | ||
type: "fetch-export", | ||
payload: { | ||
ext: pkgExt, | ||
name: pkgName, | ||
index: value | ||
} | ||
}); | ||
|
||
setHistory([...activeHistory, { | ||
type: "object", | ||
name: object.name, | ||
value: object | ||
}]); | ||
} | ||
|
||
return ( | ||
<Button variant="standard" disabled={value === 0} onClick={onClick}> | ||
{names[index] || "None"} | ||
</Button> | ||
); | ||
} | ||
|
||
export default ObjectProperty; | ||
export { ObjectProperty }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters