Apply Prettier formatting
This commit is contained in:
parent
2a88176a8e
commit
0687f95d3d
1 changed files with 24 additions and 22 deletions
|
|
@ -24,7 +24,7 @@ import IconComponent from "../../../genericIconComponent";
|
||||||
import ShadTooltip from "../../../shadTooltipComponent";
|
import ShadTooltip from "../../../shadTooltipComponent";
|
||||||
import { Button } from "../../../ui/button";
|
import { Button } from "../../../ui/button";
|
||||||
|
|
||||||
export const MenuBar = ({ }: {}): JSX.Element => {
|
export const MenuBar = ({}: {}): JSX.Element => {
|
||||||
const shortcuts = useShortcutsStore((state) => state.shortcuts);
|
const shortcuts = useShortcutsStore((state) => state.shortcuts);
|
||||||
const addFlow = useFlowsManagerStore((state) => state.addFlow);
|
const addFlow = useFlowsManagerStore((state) => state.addFlow);
|
||||||
const currentFlow = useFlowsManagerStore((state) => state.currentFlow);
|
const currentFlow = useFlowsManagerStore((state) => state.currentFlow);
|
||||||
|
|
@ -32,7 +32,9 @@ export const MenuBar = ({ }: {}): JSX.Element => {
|
||||||
const setSuccessData = useAlertStore((state) => state.setSuccessData);
|
const setSuccessData = useAlertStore((state) => state.setSuccessData);
|
||||||
const setLockChat = useFlowStore((state) => state.setLockChat);
|
const setLockChat = useFlowStore((state) => state.setLockChat);
|
||||||
const setIsBuilding = useFlowStore((state) => state.setIsBuilding);
|
const setIsBuilding = useFlowStore((state) => state.setIsBuilding);
|
||||||
const revertBuiltStatusFromBuilding = useFlowStore((state) => state.revertBuiltStatusFromBuilding);
|
const revertBuiltStatusFromBuilding = useFlowStore(
|
||||||
|
(state) => state.revertBuiltStatusFromBuilding,
|
||||||
|
);
|
||||||
const undo = useFlowsManagerStore((state) => state.undo);
|
const undo = useFlowsManagerStore((state) => state.undo);
|
||||||
const redo = useFlowsManagerStore((state) => state.redo);
|
const redo = useFlowsManagerStore((state) => state.redo);
|
||||||
const saveLoading = useFlowsManagerStore((state) => state.saveLoading);
|
const saveLoading = useFlowsManagerStore((state) => state.saveLoading);
|
||||||
|
|
@ -205,8 +207,8 @@ export const MenuBar = ({ }: {}): JSX.Element => {
|
||||||
side="bottom"
|
side="bottom"
|
||||||
styleClasses="cursor-default"
|
styleClasses="cursor-default"
|
||||||
>
|
>
|
||||||
<div className="flex transition-all cursor-default items-center gap-2 text-sm text-muted-foreground">
|
<div className="flex cursor-default items-center gap-2 text-sm text-muted-foreground transition-all">
|
||||||
<div className="flex transition-all cursor-default items-center gap-1.5 text-sm text-muted-foreground">
|
<div className="flex cursor-default items-center gap-1.5 text-sm text-muted-foreground transition-all">
|
||||||
<IconComponent
|
<IconComponent
|
||||||
name={isBuilding || saveLoading ? "Loader2" : "CheckCircle2"}
|
name={isBuilding || saveLoading ? "Loader2" : "CheckCircle2"}
|
||||||
className={cn(
|
className={cn(
|
||||||
|
|
@ -214,26 +216,26 @@ export const MenuBar = ({ }: {}): JSX.Element => {
|
||||||
isBuilding || saveLoading ? "animate-spin" : "animate-wiggle",
|
isBuilding || saveLoading ? "animate-spin" : "animate-wiggle",
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<div>
|
<div>{printByBuildStatus()}</div>
|
||||||
{printByBuildStatus()}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<button
|
||||||
<button disabled={!isBuilding} onClick={_ => {
|
disabled={!isBuilding}
|
||||||
|
onClick={(_) => {
|
||||||
if (isBuilding) {
|
if (isBuilding) {
|
||||||
setIsBuilding(false);
|
setIsBuilding(false);
|
||||||
revertBuiltStatusFromBuilding();
|
revertBuiltStatusFromBuilding();
|
||||||
setLockChat(false);
|
setLockChat(false);
|
||||||
window.stop();
|
window.stop();
|
||||||
}
|
}
|
||||||
|
}}
|
||||||
|
className={
|
||||||
|
isBuilding
|
||||||
|
? "flex items-center gap-1.5 text-status-red opacity-100 transition-all"
|
||||||
|
: "opacity-0"
|
||||||
}
|
}
|
||||||
} className={isBuilding ? "opacity-100 text-status-red flex gap-1.5 items-center transition-all " : "opacity-0"}>
|
>
|
||||||
<IconComponent
|
<IconComponent name="Square" className="h-4 w-4" />
|
||||||
name="Square"
|
<span>Stop</span>
|
||||||
className="h-4 w-4"
|
|
||||||
/>
|
|
||||||
<span>
|
|
||||||
Stop
|
|
||||||
</span>
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</ShadTooltip>
|
</ShadTooltip>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue