mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-22 16:29:09 +01:00
* Revert "[PM-4290] Add pop out warning on import page (#6645)"
This reverts commit 8dc81b603d
.
* Change icon on `Import items` in browser-settings
Replace the bwi-angle-right icon with the bwi-external-link and rotate it
Box with arrow pointing to the top right indicates external linkg
Box with arrow pointing to the top left indicates popout window
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
parent
c1494b8494
commit
3e495ab082
@ -183,7 +183,10 @@
|
|||||||
(click)="import()"
|
(click)="import()"
|
||||||
>
|
>
|
||||||
<div class="row-main">{{ "importItems" | i18n }}</div>
|
<div class="row-main">{{ "importItems" | i18n }}</div>
|
||||||
<i class="bwi bwi-angle-right bwi-lg row-sub-icon" aria-hidden="true"></i>
|
<i
|
||||||
|
class="bwi bwi-external-link bwi-lg row-sub-icon bwi-rotate-270 bwi-fw"
|
||||||
|
aria-hidden="true"
|
||||||
|
></i>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
@ -474,7 +474,10 @@ export class SettingsComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async import() {
|
async import() {
|
||||||
this.router.navigate(["/import"]);
|
await this.router.navigate(["/import"]);
|
||||||
|
if (await BrowserApi.isPopupOpen()) {
|
||||||
|
this.popupUtilsService.popOut(window);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export() {
|
export() {
|
||||||
|
@ -16,11 +16,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div tabindex="-1" class="tw-p-4">
|
<div tabindex="-1" class="tw-p-4">
|
||||||
<tools-file-popout-callout />
|
|
||||||
<tools-import
|
<tools-import
|
||||||
(formDisabled)="this.disabled = $event"
|
(formDisabled)="this.disabled = $event"
|
||||||
(formLoading)="this.loading = $event"
|
(formLoading)="this.loading = $event"
|
||||||
(onSuccessfulImport)="this.onSuccessfulImport($event)"
|
(onSuccessfulImport)="this.onSuccessfulImport($event)"
|
||||||
[hideFileSelector]="this.hideFileSelector"
|
|
||||||
></tools-import>
|
></tools-import>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,14 +1,11 @@
|
|||||||
import { CommonModule } from "@angular/common";
|
import { CommonModule } from "@angular/common";
|
||||||
import { Component, OnInit } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
import { Router, RouterLink } from "@angular/router";
|
import { Router, RouterLink } from "@angular/router";
|
||||||
|
|
||||||
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||||
import { AsyncActionsModule, ButtonModule, DialogModule } from "@bitwarden/components";
|
import { AsyncActionsModule, ButtonModule, DialogModule } from "@bitwarden/components";
|
||||||
import { ImportComponent } from "@bitwarden/importer/ui";
|
import { ImportComponent } from "@bitwarden/importer/ui";
|
||||||
|
|
||||||
import { FilePopoutCalloutComponent } from "../../components/file-popout-callout.component";
|
|
||||||
import { FilePopoutUtilsService } from "../../services/file-popout-utils.service";
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: "import-browser.component.html",
|
templateUrl: "import-browser.component.html",
|
||||||
standalone: true,
|
standalone: true,
|
||||||
@ -20,20 +17,13 @@ import { FilePopoutUtilsService } from "../../services/file-popout-utils.service
|
|||||||
AsyncActionsModule,
|
AsyncActionsModule,
|
||||||
ButtonModule,
|
ButtonModule,
|
||||||
ImportComponent,
|
ImportComponent,
|
||||||
FilePopoutCalloutComponent,
|
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
export class ImportBrowserComponent implements OnInit {
|
export class ImportBrowserComponent {
|
||||||
protected disabled = false;
|
protected disabled = false;
|
||||||
protected loading = false;
|
protected loading = false;
|
||||||
|
|
||||||
protected hideFileSelector = false;
|
constructor(private router: Router) {}
|
||||||
|
|
||||||
constructor(private router: Router, private filePopoutUtilsService: FilePopoutUtilsService) {}
|
|
||||||
|
|
||||||
ngOnInit(): void {
|
|
||||||
this.hideFileSelector = this.filePopoutUtilsService.showFilePopoutMessage(window);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected async onSuccessfulImport(organizationId: string): Promise<void> {
|
protected async onSuccessfulImport(organizationId: string): Promise<void> {
|
||||||
this.router.navigate(["/tabs/settings"]);
|
this.router.navigate(["/tabs/settings"]);
|
||||||
|
@ -344,7 +344,7 @@
|
|||||||
and save the zip file.
|
and save the zip file.
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</bit-callout>
|
</bit-callout>
|
||||||
<bit-form-field *ngIf="!hideFileSelector">
|
<bit-form-field>
|
||||||
<bit-label>{{ "selectImportFile" | i18n }}</bit-label>
|
<bit-label>{{ "selectImportFile" | i18n }}</bit-label>
|
||||||
<div class="file-selector">
|
<div class="file-selector">
|
||||||
<button bitButton type="button" buttonType="secondary" (click)="fileSelector.click()">
|
<button bitButton type="button" buttonType="secondary" (click)="fileSelector.click()">
|
||||||
|
@ -120,8 +120,6 @@ export class ImportComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Input() hideFileSelector: boolean;
|
|
||||||
|
|
||||||
protected organization: Organization;
|
protected organization: Organization;
|
||||||
protected destroy$ = new Subject<void>();
|
protected destroy$ = new Subject<void>();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user