mirror of
https://github.com/bitwarden/jslib
synced 2025-12-21 18:53:32 +00:00
Revert "Add minimizeIfNeeded method to view component"
This reverts commit 7a5f2a3aa3d418ead5c03ce4c3f0ba00ffd34bb2.
This commit is contained in:
@@ -17,9 +17,7 @@ import { CipherService } from '../../abstractions/cipher.service';
|
||||
import { CryptoService } from '../../abstractions/crypto.service';
|
||||
import { EventService } from '../../abstractions/event.service';
|
||||
import { I18nService } from '../../abstractions/i18n.service';
|
||||
import { MessagingService } from '../../abstractions/messaging.service';
|
||||
import { PlatformUtilsService } from '../../abstractions/platformUtils.service';
|
||||
import { StorageService } from '../../abstractions/storage.service';
|
||||
import { TokenService } from '../../abstractions/token.service';
|
||||
import { TotpService } from '../../abstractions/totp.service';
|
||||
import { UserService } from '../../abstractions/user.service';
|
||||
@@ -30,8 +28,6 @@ import { FieldView } from '../../models/view/fieldView';
|
||||
import { LoginUriView } from '../../models/view/loginUriView';
|
||||
import { BroadcasterService } from '../services/broadcaster.service';
|
||||
|
||||
import { ElectronConstants } from '../../electron/electronConstants';
|
||||
|
||||
const BroadcasterSubscriptionId = 'ViewComponent';
|
||||
|
||||
export class ViewComponent implements OnDestroy, OnInit {
|
||||
@@ -60,8 +56,7 @@ export class ViewComponent implements OnDestroy, OnInit {
|
||||
protected auditService: AuditService, protected win: Window,
|
||||
protected broadcasterService: BroadcasterService, protected ngZone: NgZone,
|
||||
protected changeDetectorRef: ChangeDetectorRef, protected userService: UserService,
|
||||
protected eventService: EventService, protected messagingService: MessagingService,
|
||||
protected storageService: StorageService) { }
|
||||
protected eventService: EventService) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.broadcasterService.subscribe(BroadcasterSubscriptionId, (message: any) => {
|
||||
@@ -175,7 +170,6 @@ export class ViewComponent implements OnDestroy, OnInit {
|
||||
this.platformUtilsService.copyToClipboard(value, copyOptions);
|
||||
this.platformUtilsService.showToast('info', null,
|
||||
this.i18nService.t('valueCopied', this.i18nService.t(typeI18nKey)));
|
||||
this.minimizeIfNeeded();
|
||||
|
||||
if (typeI18nKey === 'password') {
|
||||
this.eventService.collect(EventType.Cipher_ClientToggledHiddenFieldVisible, this.cipherId);
|
||||
@@ -190,14 +184,6 @@ export class ViewComponent implements OnDestroy, OnInit {
|
||||
event.dataTransfer.setData('text', data);
|
||||
}
|
||||
|
||||
public async minimizeIfNeeded(): Promise<void> {
|
||||
const shouldMinimize =
|
||||
await this.storageService.get<boolean>(ElectronConstants.minimizeOnCopyToClipboardKey);
|
||||
if (shouldMinimize) {
|
||||
this.messagingService.send('minimize');
|
||||
}
|
||||
}
|
||||
|
||||
async downloadAttachment(attachment: AttachmentView) {
|
||||
const a = (attachment as any);
|
||||
if (a.downloading) {
|
||||
|
||||
Reference in New Issue
Block a user