mirror of
https://github.com/atuinsh/atuin.git
synced 2025-06-27 05:11:28 +02:00
fix(gui): double return on mac/linux (#2311)
This commit is contained in:
parent
128891f53e
commit
c408465549
1156
ui/backend/Cargo.lock
generated
1156
ui/backend/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -34,6 +34,7 @@ vt100 = "0.15.2"
|
|||||||
bytes = "1.6.0"
|
bytes = "1.6.0"
|
||||||
nix = "0.29.0"
|
nix = "0.29.0"
|
||||||
lazy_static = "1.5.0"
|
lazy_static = "1.5.0"
|
||||||
|
tauri-plugin-os = "2.0.0-beta.8"
|
||||||
|
|
||||||
[target."cfg(target_os = \"macos\")".dependencies]
|
[target."cfg(target_os = \"macos\")".dependencies]
|
||||||
cocoa = "0.25"
|
cocoa = "0.25"
|
||||||
|
@ -15,11 +15,13 @@
|
|||||||
"sql:allow-load",
|
"sql:allow-load",
|
||||||
"sql:allow-execute",
|
"sql:allow-execute",
|
||||||
"sql:allow-select",
|
"sql:allow-select",
|
||||||
|
"os:allow-platform",
|
||||||
"window:allow-start-dragging",
|
"window:allow-start-dragging",
|
||||||
{
|
{
|
||||||
"identifier": "http:default",
|
"identifier": "http:default",
|
||||||
"allow": ["https://api.atuin.sh/*"]
|
"allow": ["https://api.atuin.sh/*"]
|
||||||
}
|
},
|
||||||
|
"os:default"
|
||||||
],
|
],
|
||||||
"platforms": ["linux", "macOS", "windows"]
|
"platforms": ["linux", "macOS", "windows"]
|
||||||
}
|
}
|
||||||
|
@ -282,6 +282,7 @@ fn show_window(app: &AppHandle) {
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
tauri::Builder::default()
|
tauri::Builder::default()
|
||||||
|
.plugin(tauri_plugin_os::init())
|
||||||
.plugin(tauri_plugin_shell::init())
|
.plugin(tauri_plugin_shell::init())
|
||||||
.invoke_handler(tauri::generate_handler![
|
.invoke_handler(tauri::generate_handler![
|
||||||
list,
|
list,
|
||||||
|
@ -3,7 +3,7 @@ use std::io::BufRead;
|
|||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
use crate::state::AtuinState;
|
use crate::state::AtuinState;
|
||||||
use tauri::{Manager, State};
|
use tauri::{Manager, State, Emitter};
|
||||||
|
|
||||||
use atuin_client::{database::Sqlite, record::sqlite_store::SqliteStore, settings::Settings};
|
use atuin_client::{database::Sqlite, record::sqlite_store::SqliteStore, settings::Settings};
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
"@tanstack/react-virtual": "^3.8.3",
|
"@tanstack/react-virtual": "^3.8.3",
|
||||||
"@tauri-apps/api": "2.0.0-beta.15",
|
"@tauri-apps/api": "2.0.0-beta.15",
|
||||||
"@tauri-apps/plugin-http": "2.0.0-beta.8",
|
"@tauri-apps/plugin-http": "2.0.0-beta.8",
|
||||||
|
"@tauri-apps/plugin-os": "2.0.0-beta.7",
|
||||||
"@tauri-apps/plugin-shell": "2.0.0-beta.8",
|
"@tauri-apps/plugin-shell": "2.0.0-beta.8",
|
||||||
"@tauri-apps/plugin-sql": "2.0.0-beta.5",
|
"@tauri-apps/plugin-sql": "2.0.0-beta.5",
|
||||||
"@types/luxon": "^3.4.2",
|
"@types/luxon": "^3.4.2",
|
||||||
|
9
ui/pnpm-lock.yaml
generated
9
ui/pnpm-lock.yaml
generated
@ -71,6 +71,9 @@ dependencies:
|
|||||||
'@tauri-apps/plugin-http':
|
'@tauri-apps/plugin-http':
|
||||||
specifier: 2.0.0-beta.8
|
specifier: 2.0.0-beta.8
|
||||||
version: 2.0.0-beta.8
|
version: 2.0.0-beta.8
|
||||||
|
'@tauri-apps/plugin-os':
|
||||||
|
specifier: 2.0.0-beta.7
|
||||||
|
version: 2.0.0-beta.7
|
||||||
'@tauri-apps/plugin-shell':
|
'@tauri-apps/plugin-shell':
|
||||||
specifier: 2.0.0-beta.8
|
specifier: 2.0.0-beta.8
|
||||||
version: 2.0.0-beta.8
|
version: 2.0.0-beta.8
|
||||||
@ -5148,6 +5151,12 @@ packages:
|
|||||||
'@tauri-apps/api': 2.0.0-beta.15
|
'@tauri-apps/api': 2.0.0-beta.15
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/@tauri-apps/plugin-os@2.0.0-beta.7:
|
||||||
|
resolution: {integrity: sha512-CHo09ecxUU0NFkAqctXeQzdaXw02EXulqcaZnbjrBfRJ2ulmGq7zaUCsHihfcqWcdnmNwmP9Wh/gyznMc1JF9Q==}
|
||||||
|
dependencies:
|
||||||
|
'@tauri-apps/api': 2.0.0-beta.15
|
||||||
|
dev: false
|
||||||
|
|
||||||
/@tauri-apps/plugin-shell@2.0.0-beta.8:
|
/@tauri-apps/plugin-shell@2.0.0-beta.8:
|
||||||
resolution: {integrity: sha512-rFXI6MvsCdSGbuKbDu/NaOePREb9YTVTdeugHdvvljnKWW3dvmThBb2h/8Hxj+Z7Cd8MUoRxPeJWUZbPbJ2Imw==}
|
resolution: {integrity: sha512-rFXI6MvsCdSGbuKbDu/NaOePREb9YTVTdeugHdvvljnKWW3dvmThBb2h/8Hxj+Z7Cd8MUoRxPeJWUZbPbJ2Imw==}
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -10,6 +10,7 @@ import { Play, Square } from "lucide-react";
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
import { extensions } from "./extensions";
|
import { extensions } from "./extensions";
|
||||||
|
import { platform } from "@tauri-apps/plugin-os";
|
||||||
import { invoke } from "@tauri-apps/api/core";
|
import { invoke } from "@tauri-apps/api/core";
|
||||||
import Terminal from "./terminal.tsx";
|
import Terminal from "./terminal.tsx";
|
||||||
|
|
||||||
@ -72,7 +73,10 @@ const RunBlock = ({
|
|||||||
|
|
||||||
if (currentRunbook) incRunbookPty(currentRunbook);
|
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 });
|
await invoke("pty_write", { pid: pty, data: val });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -98,7 +98,7 @@ export default function Dotfiles() {
|
|||||||
console.log(current);
|
console.log(current);
|
||||||
|
|
||||||
return (
|
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">
|
<div className="p-10">
|
||||||
<Header current={current} setCurrent={setCurrent} />
|
<Header current={current} setCurrent={setCurrent} />
|
||||||
Manage your shell aliases, variables and paths
|
Manage your shell aliases, variables and paths
|
||||||
|
Loading…
x
Reference in New Issue
Block a user