mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
[BEEEP] [PM-565] Implement clipboard logic in rust (#4516)
Implement the Desktop clipboard logic natively using rust. This uses the arboard crate for clipboard functionality. This change consists of 3 portions: * Rust component. * Updating renderer to call main using electron ipc. * Update main to listen to renderer ipc and forward calls to the native clipboard module.
This commit is contained in:
@@ -4,6 +4,13 @@ interface ToastOptions {
|
||||
timeout?: number;
|
||||
}
|
||||
|
||||
export type ClipboardOptions = {
|
||||
allowHistory?: boolean;
|
||||
clearing?: boolean;
|
||||
clearMs?: number;
|
||||
window?: Window;
|
||||
};
|
||||
|
||||
export abstract class PlatformUtilsService {
|
||||
getDevice: () => DeviceType;
|
||||
getDeviceString: () => string;
|
||||
@@ -29,8 +36,8 @@ export abstract class PlatformUtilsService {
|
||||
) => void;
|
||||
isDev: () => boolean;
|
||||
isSelfHost: () => boolean;
|
||||
copyToClipboard: (text: string, options?: any) => void | boolean;
|
||||
readFromClipboard: (options?: any) => Promise<string>;
|
||||
copyToClipboard: (text: string, options?: ClipboardOptions) => void | boolean;
|
||||
readFromClipboard: () => Promise<string>;
|
||||
supportsBiometric: () => Promise<boolean>;
|
||||
authenticateBiometric: () => Promise<boolean>;
|
||||
supportsSecureStorage: () => boolean;
|
||||
|
||||
Reference in New Issue
Block a user