mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 05:43:41 +00:00
[PM-2415] migrate AboutComponent to CL (#6301)
* migrate AboutComponent to CL
This commit is contained in:
@@ -61,7 +61,6 @@ import { PrivateModeWarningComponent } from "./components/private-mode-warning.c
|
|||||||
import { SetPinComponent } from "./components/set-pin.component";
|
import { SetPinComponent } from "./components/set-pin.component";
|
||||||
import { UserVerificationComponent } from "./components/user-verification.component";
|
import { UserVerificationComponent } from "./components/user-verification.component";
|
||||||
import { ServicesModule } from "./services/services.module";
|
import { ServicesModule } from "./services/services.module";
|
||||||
import { AboutComponent } from "./settings/about.component";
|
|
||||||
import { AutofillComponent } from "./settings/autofill.component";
|
import { AutofillComponent } from "./settings/autofill.component";
|
||||||
import { ExcludedDomainsComponent } from "./settings/excluded-domains.component";
|
import { ExcludedDomainsComponent } from "./settings/excluded-domains.component";
|
||||||
import { FoldersComponent } from "./settings/folders.component";
|
import { FoldersComponent } from "./settings/folders.component";
|
||||||
@@ -151,7 +150,6 @@ import "../platform/popup/locales";
|
|||||||
ViewCustomFieldsComponent,
|
ViewCustomFieldsComponent,
|
||||||
RemovePasswordComponent,
|
RemovePasswordComponent,
|
||||||
VaultSelectComponent,
|
VaultSelectComponent,
|
||||||
AboutComponent,
|
|
||||||
HelpAndFeedbackComponent,
|
HelpAndFeedbackComponent,
|
||||||
AutofillComponent,
|
AutofillComponent,
|
||||||
EnvironmentSelectorComponent,
|
EnvironmentSelectorComponent,
|
||||||
|
|||||||
@@ -1,52 +1,46 @@
|
|||||||
<div class="modal fade" role="dialog" aria-modal="true">
|
<bit-simple-dialog>
|
||||||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable" role="document">
|
<div bitDialogIcon>
|
||||||
<div class="modal-content">
|
<i class="bwi bwi-shield bwi-3x" aria-hidden="true"></i>
|
||||||
<div class="modal-body">
|
</div>
|
||||||
<p class="text-center">
|
<div bitDialogTitle>Bitwarden</div>
|
||||||
<i class="bwi bwi-shield bwi-3x" aria-hidden="true"></i>
|
<div bitDialogContent>
|
||||||
</p>
|
<p>© Bitwarden Inc. 2015-{{ year }}</p>
|
||||||
<p class="text-center">
|
<p>{{ "version" | i18n }}: {{ version }}</p>
|
||||||
<b>Bitwarden</b>
|
<ng-container *ngIf="serverConfig$ | async as serverConfig">
|
||||||
</p>
|
<p *ngIf="isCloud">
|
||||||
<p class="text-center">© Bitwarden Inc. 2015-{{ year }}</p>
|
{{ "serverVersion" | i18n }}: {{ this.serverConfig?.version }}
|
||||||
<p class="text-center">{{ "version" | i18n }}: {{ version }}</p>
|
<span *ngIf="!serverConfig.isValid()">
|
||||||
<ng-container *ngIf="serverConfig$ | async as serverConfig">
|
({{ "lastSeenOn" | i18n : (serverConfig.utcDate | date : "mediumDate") }})
|
||||||
<p class="text-center" *ngIf="isCloud">
|
</span>
|
||||||
{{ "serverVersion" | i18n }}: {{ this.serverConfig?.version }}
|
</p>
|
||||||
|
|
||||||
|
<ng-container *ngIf="!isCloud">
|
||||||
|
<ng-container *ngIf="serverConfig.server">
|
||||||
|
<p>
|
||||||
|
{{ "serverVersion" | i18n }} <small>({{ "thirdParty" | i18n }})</small>:
|
||||||
|
{{ this.serverConfig?.version }}
|
||||||
<span *ngIf="!serverConfig.isValid()">
|
<span *ngIf="!serverConfig.isValid()">
|
||||||
({{ "lastSeenOn" | i18n : (serverConfig.utcDate | date : "mediumDate") }})
|
({{ "lastSeenOn" | i18n : (serverConfig.utcDate | date : "mediumDate") }})
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
|
<div>
|
||||||
<ng-container *ngIf="!isCloud">
|
<small>{{ "thirdPartyServerMessage" | i18n : serverConfig.server?.name }}</small>
|
||||||
<ng-container *ngIf="serverConfig.server">
|
</div>
|
||||||
<p class="text-center">
|
|
||||||
{{ "serverVersion" | i18n }} <small>({{ "thirdParty" | i18n }})</small>:
|
|
||||||
{{ this.serverConfig?.version }}
|
|
||||||
<span *ngIf="!serverConfig.isValid()">
|
|
||||||
({{ "lastSeenOn" | i18n : (serverConfig.utcDate | date : "mediumDate") }})
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
<div class="text-center">
|
|
||||||
<small>{{ "thirdPartyServerMessage" | i18n : serverConfig.server?.name }}</small>
|
|
||||||
</div>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<p class="text-center" *ngIf="!serverConfig.server">
|
|
||||||
{{ "serverVersion" | i18n }} <small>({{ "selfHostedServer" | i18n }})</small>:
|
|
||||||
{{ this.serverConfig?.version }}
|
|
||||||
<span *ngIf="!serverConfig.isValid()">
|
|
||||||
({{ "lastSeenOn" | i18n : (serverConfig.utcDate | date : "mediumDate") }})
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
</ng-container>
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
<p *ngIf="!serverConfig.server">
|
||||||
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">
|
{{ "serverVersion" | i18n }} <small>({{ "selfHostedServer" | i18n }})</small>:
|
||||||
{{ "close" | i18n }}
|
{{ this.serverConfig?.version }}
|
||||||
</button>
|
<span *ngIf="!serverConfig.isValid()">
|
||||||
</div>
|
({{ "lastSeenOn" | i18n : (serverConfig.utcDate | date : "mediumDate") }})
|
||||||
</div>
|
</span>
|
||||||
|
</p>
|
||||||
|
</ng-container>
|
||||||
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div bitDialogFooter>
|
||||||
|
<button bitButton bitDialogClose buttonType="primary" type="button">
|
||||||
|
{{ "close" | i18n }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</bit-simple-dialog>
|
||||||
|
|||||||
@@ -1,25 +1,29 @@
|
|||||||
|
import { CommonModule } from "@angular/common";
|
||||||
import { Component } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
import { Observable } from "rxjs";
|
import { Observable } from "rxjs";
|
||||||
|
|
||||||
|
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||||
import { ConfigServiceAbstraction } from "@bitwarden/common/platform/abstractions/config/config.service.abstraction";
|
import { ConfigServiceAbstraction } from "@bitwarden/common/platform/abstractions/config/config.service.abstraction";
|
||||||
import { ServerConfig } from "@bitwarden/common/platform/abstractions/config/server-config";
|
import { ServerConfig } from "@bitwarden/common/platform/abstractions/config/server-config";
|
||||||
import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service";
|
import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service";
|
||||||
|
import { ButtonModule, DialogModule } from "@bitwarden/components";
|
||||||
|
|
||||||
import { BrowserApi } from "../../platform/browser/browser-api";
|
import { BrowserApi } from "../../platform/browser/browser-api";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-about",
|
|
||||||
templateUrl: "about.component.html",
|
templateUrl: "about.component.html",
|
||||||
|
standalone: true,
|
||||||
|
imports: [CommonModule, JslibModule, DialogModule, ButtonModule],
|
||||||
})
|
})
|
||||||
export class AboutComponent {
|
export class AboutComponent {
|
||||||
serverConfig$: Observable<ServerConfig>;
|
protected serverConfig$: Observable<ServerConfig> = this.configService.serverConfig$;
|
||||||
|
|
||||||
year = new Date().getFullYear();
|
protected year = new Date().getFullYear();
|
||||||
version = BrowserApi.getApplicationVersion();
|
protected version = BrowserApi.getApplicationVersion();
|
||||||
isCloud: boolean;
|
protected isCloud = this.environmentService.isCloud();
|
||||||
|
|
||||||
constructor(configService: ConfigServiceAbstraction, environmentService: EnvironmentService) {
|
constructor(
|
||||||
this.serverConfig$ = configService.serverConfig$;
|
private configService: ConfigServiceAbstraction,
|
||||||
this.isCloud = environmentService.isCloud();
|
private environmentService: EnvironmentService
|
||||||
}
|
) {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -482,7 +482,7 @@ export class SettingsComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
about() {
|
about() {
|
||||||
this.modalService.open(AboutComponent);
|
this.dialogService.open(AboutComponent);
|
||||||
}
|
}
|
||||||
|
|
||||||
async fingerprint() {
|
async fingerprint() {
|
||||||
|
|||||||
Reference in New Issue
Block a user