mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 22:33:35 +00:00
Revert "[PS-1465] Fix #2806 - The "Import Data" page's file selector button cannot be translated (#3502)" (#3900)
This reverts commit 768de03269.
This commit is contained in:
committed by
GitHub
parent
534e1c804b
commit
6cad253442
@@ -291,25 +291,12 @@
|
|||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="file">2. {{ "selectImportFile" | i18n }}</label>
|
<label for="file">2. {{ "selectImportFile" | i18n }}</label>
|
||||||
<br />
|
|
||||||
<div class="file-selector">
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="btn btn-outline-primary"
|
|
||||||
onclick="document.getElementById('file').click()"
|
|
||||||
>
|
|
||||||
{{ "chooseFile" | i18n }}
|
|
||||||
</button>
|
|
||||||
{{ this.fileSelected ? this.fileSelected.name : ("noFileChosen" | i18n) }}
|
|
||||||
</div>
|
|
||||||
<input
|
<input
|
||||||
type="file"
|
type="file"
|
||||||
id="file"
|
id="file"
|
||||||
class="form-control-file"
|
class="form-control-file"
|
||||||
name="file"
|
name="file"
|
||||||
style="display: none"
|
|
||||||
[disabled]="importBlockedByPolicy$ | async"
|
[disabled]="importBlockedByPolicy$ | async"
|
||||||
(change)="setSelectedFile($event)"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ export class ImportComponent implements OnInit, OnDestroy {
|
|||||||
importOptions: ImportOption[];
|
importOptions: ImportOption[];
|
||||||
format: ImportType = null;
|
format: ImportType = null;
|
||||||
fileContents: string;
|
fileContents: string;
|
||||||
fileSelected: File;
|
|
||||||
formPromise: Promise<ImportError>;
|
formPromise: Promise<ImportError>;
|
||||||
loading = false;
|
loading = false;
|
||||||
importBlockedByPolicy$ = this.policyService.policyAppliesToActiveUser$(
|
importBlockedByPolicy$ = this.policyService.policyAppliesToActiveUser$(
|
||||||
@@ -185,11 +184,6 @@ export class ImportComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
setSelectedFile(event: Event) {
|
|
||||||
const fileInputEl = <HTMLInputElement>event.target;
|
|
||||||
this.fileSelected = fileInputEl.files.length > 0 ? fileInputEl.files[0] : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private async error(error: Error) {
|
private async error(error: Error) {
|
||||||
await Swal.fire({
|
await Swal.fire({
|
||||||
heightAuto: false,
|
heightAuto: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user