Skip to content

Commit

Permalink
fix: fix read text from clipboard no permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
vicanso committed May 30, 2024
1 parent 087e482 commit 2a16245
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 21 deletions.
41 changes: 24 additions & 17 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ serde = { version = "1.0.195", features = ["derive"] }
serde_json = "1.0.111"
strum = "0.25.0"
strum_macros = "0.25.1"
tauri = { version = "1.6.1", features = [
tauri = { version = "1.6.7", features = [
"app-hide",
"clipboard-all",
"dialog-all",
Expand Down
8 changes: 5 additions & 3 deletions src/components/APISettingTree/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,17 @@ export default defineComponent({
};

const handleImport = async () => {
let data = "";
try {
const data = (await readTextFromClipboard()) || "";
data = (await readTextFromClipboard()) || "";
} catch (err) {
showError(message, err);
} finally {
newImportDialog({
dialog,
collection,
data,
});
} catch (err) {
showError(message, err);
}
};

Expand Down

0 comments on commit 2a16245

Please sign in to comment.