mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
Use Signal inputs and make files ts-strict compliant (#16778)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
da8a0104ea
commit
0df7215d6e
@@ -1,5 +1,3 @@
|
||||
// FIXME: Update this file to be type safe and remove this and next line
|
||||
// @ts-strict-ignore
|
||||
import { CommonModule } from "@angular/common";
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
|
||||
@@ -15,10 +13,10 @@ import { FilePopoutUtilsService } from "../services/file-popout-utils.service";
|
||||
imports: [CommonModule, JslibModule, CalloutModule],
|
||||
})
|
||||
export class FilePopoutCalloutComponent implements OnInit {
|
||||
protected showFilePopoutMessage: boolean;
|
||||
protected showFirefoxFileWarning: boolean;
|
||||
protected showSafariFileWarning: boolean;
|
||||
protected showChromiumFileWarning: boolean;
|
||||
protected showFilePopoutMessage: boolean = false;
|
||||
protected showFirefoxFileWarning: boolean = false;
|
||||
protected showSafariFileWarning: boolean = false;
|
||||
protected showChromiumFileWarning: boolean = false;
|
||||
|
||||
constructor(private filePopoutUtilsService: FilePopoutUtilsService) {}
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// FIXME: Update this file to be type safe and remove this and next line
|
||||
// @ts-strict-ignore
|
||||
import { CommonModule } from "@angular/common";
|
||||
import { Component, Input, OnInit } from "@angular/core";
|
||||
import { Component, input, OnInit } from "@angular/core";
|
||||
|
||||
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||
import { SendType } from "@bitwarden/common/tools/send/enums/send-type";
|
||||
@@ -18,7 +16,7 @@ import { SendFilePopoutDialogComponent } from "./send-file-popout-dialog.compone
|
||||
imports: [JslibModule, CommonModule],
|
||||
})
|
||||
export class SendFilePopoutDialogContainerComponent implements OnInit {
|
||||
@Input() config: SendFormConfig;
|
||||
config = input.required<SendFormConfig>();
|
||||
|
||||
constructor(
|
||||
private dialogService: DialogService,
|
||||
@@ -27,8 +25,8 @@ export class SendFilePopoutDialogContainerComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
if (
|
||||
this.config?.sendType === SendType.File &&
|
||||
this.config?.mode === "add" &&
|
||||
this.config().sendType === SendType.File &&
|
||||
this.config().mode === "add" &&
|
||||
this.filePopoutUtilsService.showFilePopoutMessage(window)
|
||||
) {
|
||||
this.dialogService.open(SendFilePopoutDialogComponent);
|
||||
|
||||
Reference in New Issue
Block a user