mirror of
https://github.com/bitwarden/browser
synced 2025-01-06 15:38:42 +01:00
implement copyToClipboard device utils
This commit is contained in:
parent
b7fb8c43b9
commit
7724fe6815
@ -6,6 +6,8 @@ import { DeviceType } from 'jslib/enums';
|
|||||||
|
|
||||||
import { PlatformUtilsService } from 'jslib/abstractions';
|
import { PlatformUtilsService } from 'jslib/abstractions';
|
||||||
|
|
||||||
|
import { UtilsService } from 'jslib/services';
|
||||||
|
|
||||||
const AnalyticsIds = {
|
const AnalyticsIds = {
|
||||||
[DeviceType.Chrome]: 'UA-81915606-6',
|
[DeviceType.Chrome]: 'UA-81915606-6',
|
||||||
[DeviceType.Firefox]: 'UA-81915606-7',
|
[DeviceType.Firefox]: 'UA-81915606-7',
|
||||||
@ -170,6 +172,11 @@ export default class BrowserPlatformUtilsService implements PlatformUtilsService
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
copyToClipboard(text: string, options?: any): void {
|
||||||
|
const doc = options ? options.doc : null;
|
||||||
|
UtilsService.copyToClipboard(text, doc);
|
||||||
|
}
|
||||||
|
|
||||||
private sidebarViewName(): string {
|
private sidebarViewName(): string {
|
||||||
if ((window as any).chrome.sidebarAction && this.isFirefox()) {
|
if ((window as any).chrome.sidebarAction && this.isFirefox()) {
|
||||||
return 'sidebar';
|
return 'sidebar';
|
||||||
|
Loading…
Reference in New Issue
Block a user