mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-11-25 18:26:28 -05:00
fix(gui): Button to open data directory (#256)
This commit is contained in:
parent
9e27c6548b
commit
c9d3536f36
11 changed files with 187 additions and 24 deletions
|
|
@ -5,9 +5,10 @@ import PromiseInvokeButton from "renderer/components/PromiseInvokeButton";
|
|||
import { useAppSelector } from "store/hooks";
|
||||
import InfoBox from "../../modal/swap/InfoBox";
|
||||
import CliLogsBox from "../../other/RenderedCliLog";
|
||||
import { initializeContext } from "renderer/rpc";
|
||||
import { getDataDir, initializeContext } from "renderer/rpc";
|
||||
import { relaunch } from "@tauri-apps/plugin-process";
|
||||
import RotateLeftIcon from "@material-ui/icons/RotateLeft";
|
||||
import { revealItemInDir } from "@tauri-apps/plugin-opener";
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
actionsOuter: {
|
||||
|
|
@ -66,11 +67,12 @@ export default function DaemonControlBox() {
|
|||
<PromiseInvokeButton
|
||||
endIcon={<FolderOpenIcon />}
|
||||
isIconButton
|
||||
requiresContext={false}
|
||||
size="small"
|
||||
tooltipTitle="Open the data directory of the Swap Daemon in your file explorer"
|
||||
onInvoke={() => {
|
||||
// TODO: Implement this
|
||||
throw new Error("Not implemented");
|
||||
tooltipTitle="Open the data directory in your file explorer"
|
||||
onInvoke={async () => {
|
||||
const dataDir = await getDataDir();
|
||||
await revealItemInDir(dataDir);
|
||||
}}
|
||||
/>
|
||||
</Box>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue