diff options
Diffstat (limited to 'ui/src')
| -rw-r--r-- | ui/src/components/runbooks/editor/blocks/RunBlock/index.tsx | 6 | ||||
| -rw-r--r-- | ui/src/pages/Dotfiles.tsx | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/ui/src/components/runbooks/editor/blocks/RunBlock/index.tsx b/ui/src/components/runbooks/editor/blocks/RunBlock/index.tsx index b3a96166..25faa211 100644 --- a/ui/src/components/runbooks/editor/blocks/RunBlock/index.tsx +++ b/ui/src/components/runbooks/editor/blocks/RunBlock/index.tsx @@ -10,6 +10,7 @@ import { Play, Square } from "lucide-react"; import { useState } from "react"; import { extensions } from "./extensions"; +import { platform } from "@tauri-apps/plugin-os"; import { invoke } from "@tauri-apps/api/core"; import Terminal from "./terminal.tsx"; @@ -72,7 +73,10 @@ const RunBlock = ({ if (currentRunbook) incRunbookPty(currentRunbook); - let val = !value.endsWith("\n") ? value + "\r\n" : value; + let isWindows = platform() == "windows"; + let cmdEnd = isWindows ? "\r\n" : "\n"; + + let val = !value.endsWith("\n") ? value + cmdEnd : value; await invoke("pty_write", { pid: pty, data: val }); } }; diff --git a/ui/src/pages/Dotfiles.tsx b/ui/src/pages/Dotfiles.tsx index 56f570be..85f5b0e0 100644 --- a/ui/src/pages/Dotfiles.tsx +++ b/ui/src/pages/Dotfiles.tsx @@ -98,7 +98,7 @@ export default function Dotfiles() { console.log(current); return ( - <div className="w-full flex-1 flex-col p-4"> + <div className="w-full flex-1 flex-col p-4 overflow-y-auto"> <div className="p-10"> <Header current={current} setCurrent={setCurrent} /> Manage your shell aliases, variables and paths |
