mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Use electron.clipboard for all clipboard uses (#4535)
This commit is contained in:
1 parent
41e7664fe2
commit
1d1a85f9ea
7 files changed
+7
-201
No files matched your search
@@ -24,10 +24,10 @@ import "./logs-dialog.scss";
|
||||
import React from "react";
|
||||
import { Dialog, DialogProps } from "../dialog";
|
||||
import { Wizard, WizardStep } from "../wizard";
|
||||
import { copyToClipboard } from "../../utils";
|
||||
import { Notifications } from "../notifications";
|
||||
import { Button } from "../button";
|
||||
import { Icon } from "../icon";
|
||||
import { clipboard } from "electron";
|
||||
|
||||
// todo: make as external BrowserWindow (?)
|
||||
|
||||
@@ -40,9 +40,8 @@ export class LogsDialog extends React.Component<Props> {
|
||||
public logsElem: HTMLElement;
|
||||
|
||||
copyToClipboard = () => {
|
||||
if (copyToClipboard(this.logsElem)) {
|
||||
Notifications.ok(`Logs copied to clipboard.`);
|
||||
}
|
||||
clipboard.writeText(this.props.logs);
|
||||
Notifications.ok(`Logs copied to clipboard.`);
|
||||
};
|
||||
|
||||
render() {
|
||||
|
||||
Reference in new issue
Block a user