mirror of
https://github.com/atuinsh/atuin.git
synced 2025-02-19 20:01:08 +01:00
feat(gui): toast with prompt for cli install, rather than auto (#2173)
This commit is contained in:
parent
9b82bba53f
commit
12738895ff
@ -4,6 +4,7 @@ import { Tooltip as ReactTooltip } from "react-tooltip";
|
|||||||
|
|
||||||
import { useStore } from "@/state/store";
|
import { useStore } from "@/state/store";
|
||||||
import { useToast } from "@/components/ui/use-toast";
|
import { useToast } from "@/components/ui/use-toast";
|
||||||
|
import { ToastAction } from "@/components/ui/toast";
|
||||||
import { invoke } from "@tauri-apps/api/core";
|
import { invoke } from "@tauri-apps/api/core";
|
||||||
|
|
||||||
import ActivityCalendar from "react-activity-calendar";
|
import ActivityCalendar from "react-activity-calendar";
|
||||||
@ -76,7 +77,15 @@ export default function Home() {
|
|||||||
if (!installed) {
|
if (!installed) {
|
||||||
toast({
|
toast({
|
||||||
title: "Atuin CLI",
|
title: "Atuin CLI",
|
||||||
description: "Started CLI setup and installation...",
|
description: "CLI not detected - install?",
|
||||||
|
action: (
|
||||||
|
<ToastAction
|
||||||
|
altText="Install"
|
||||||
|
onClick={() => {
|
||||||
|
let install = async () => {
|
||||||
|
toast({
|
||||||
|
title: "Atuin CLI",
|
||||||
|
description: "Install in progress...",
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log("Installing CLI...");
|
console.log("Installing CLI...");
|
||||||
@ -89,6 +98,14 @@ export default function Home() {
|
|||||||
title: "Atuin CLI",
|
title: "Atuin CLI",
|
||||||
description: "Installation complete",
|
description: "Installation complete",
|
||||||
});
|
});
|
||||||
|
};
|
||||||
|
install();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Install
|
||||||
|
</ToastAction>
|
||||||
|
),
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user