mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 13:23:34 +00:00
Remove all TypeScript region use as it is now against the Bitwarden code style guide. (#5356)
This commit is contained in:
@@ -124,7 +124,7 @@ document.addEventListener("DOMContentLoaded", (event) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//#region Message Processing
|
// Message Processing
|
||||||
|
|
||||||
// Listen for messages from the background script
|
// Listen for messages from the background script
|
||||||
// Note: onMessage events are fired when a message is sent from either an extension process
|
// Note: onMessage events are fired when a message is sent from either an extension process
|
||||||
@@ -182,7 +182,7 @@ document.addEventListener("DOMContentLoaded", (event) => {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//#endregion Message Processing
|
// End Message Processing
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Observe the DOM for changes and collect page details if forms are added to the page
|
* Observe the DOM for changes and collect page details if forms are added to the page
|
||||||
@@ -367,9 +367,9 @@ document.addEventListener("DOMContentLoaded", (event) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//#endregion Page Detail Collection Methods
|
// End Page Detail Collection Methods
|
||||||
|
|
||||||
// #region Form Detection and Submission Handling
|
// Form Detection and Submission Handling
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Iterates through the given array of forms and adds an event listener to each form.
|
* Iterates through the given array of forms and adds an event listener to each form.
|
||||||
@@ -825,9 +825,9 @@ document.addEventListener("DOMContentLoaded", (event) => {
|
|||||||
}, 500);
|
}, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
//#endregion Form Detection and Submission Handling
|
// End Form Detection and Submission Handling
|
||||||
|
|
||||||
//#region Notification Bar Functions (open, close, height adjustment, etc.)
|
// Notification Bar Functions (open, close, height adjustment, etc.)
|
||||||
function closeExistingAndOpenBar(type: string, typeData: any) {
|
function closeExistingAndOpenBar(type: string, typeData: any) {
|
||||||
const barQueryParams = {
|
const barQueryParams = {
|
||||||
type,
|
type,
|
||||||
@@ -924,9 +924,9 @@ document.addEventListener("DOMContentLoaded", (event) => {
|
|||||||
el.style.height = heightStyle;
|
el.style.height = heightStyle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//#endregion Notification Bar Functions (open, close, height adjustment, etc.)
|
// End Notification Bar Functions (open, close, height adjustment, etc.)
|
||||||
|
|
||||||
//#region Helper Functions
|
// Helper Functions
|
||||||
function sendPlatformMessage(msg: any) {
|
function sendPlatformMessage(msg: any) {
|
||||||
chrome.runtime.sendMessage(msg);
|
chrome.runtime.sendMessage(msg);
|
||||||
}
|
}
|
||||||
@@ -992,5 +992,5 @@ document.addEventListener("DOMContentLoaded", (event) => {
|
|||||||
return theEl === document;
|
return theEl === document;
|
||||||
}
|
}
|
||||||
|
|
||||||
//#endregion Helper Functions
|
// End Helper Functions
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ export class DomainAddEditDialogComponent implements OnInit, OnDestroy {
|
|||||||
private dialogService: DialogServiceAbstraction
|
private dialogService: DialogServiceAbstraction
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
//#region Angular Method Implementations
|
// Angular Method Implementations
|
||||||
|
|
||||||
async ngOnInit(): Promise<void> {
|
async ngOnInit(): Promise<void> {
|
||||||
// If we have data.orgDomain, then editing, otherwise creating new domain
|
// If we have data.orgDomain, then editing, otherwise creating new domain
|
||||||
@@ -81,9 +81,9 @@ export class DomainAddEditDialogComponent implements OnInit, OnDestroy {
|
|||||||
this.componentDestroyed$.complete();
|
this.componentDestroyed$.complete();
|
||||||
}
|
}
|
||||||
|
|
||||||
//#endregion
|
// End Angular Method Implementations
|
||||||
|
|
||||||
//#region Form methods
|
// Form methods
|
||||||
|
|
||||||
async populateForm(): Promise<void> {
|
async populateForm(): Promise<void> {
|
||||||
if (this.data.orgDomain) {
|
if (this.data.orgDomain) {
|
||||||
@@ -118,9 +118,9 @@ export class DomainAddEditDialogComponent implements OnInit, OnDestroy {
|
|||||||
this.orgDomainService.copyDnsTxt(this.txtCtrl.value);
|
this.orgDomainService.copyDnsTxt(this.txtCtrl.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
//#endregion
|
// End Form methods
|
||||||
|
|
||||||
//#region Async Form Actions
|
// Async Form Actions
|
||||||
saveDomain = async (): Promise<void> => {
|
saveDomain = async (): Promise<void> => {
|
||||||
if (this.domainForm.invalid) {
|
if (this.domainForm.invalid) {
|
||||||
this.platformUtilsService.showToast("error", null, this.i18nService.t("domainFormInvalid"));
|
this.platformUtilsService.showToast("error", null, this.i18nService.t("domainFormInvalid"));
|
||||||
@@ -266,5 +266,5 @@ export class DomainAddEditDialogComponent implements OnInit, OnDestroy {
|
|||||||
this.dialogRef.close();
|
this.dialogRef.close();
|
||||||
};
|
};
|
||||||
|
|
||||||
//#endregion
|
// End Async Form Actions
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ export class DomainVerificationComponent implements OnInit, OnDestroy {
|
|||||||
return existingDomainNames;
|
return existingDomainNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
//#region Options
|
// Options
|
||||||
|
|
||||||
copyDnsTxt(dnsTxt: string): void {
|
copyDnsTxt(dnsTxt: string): void {
|
||||||
this.orgDomainService.copyDnsTxt(dnsTxt);
|
this.orgDomainService.copyDnsTxt(dnsTxt);
|
||||||
@@ -169,8 +169,6 @@ export class DomainVerificationComponent implements OnInit, OnDestroy {
|
|||||||
this.platformUtilsService.showToast("success", null, this.i18nService.t("domainRemoved"));
|
this.platformUtilsService.showToast("success", null, this.i18nService.t("domainRemoved"));
|
||||||
}
|
}
|
||||||
|
|
||||||
//#endregion
|
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
this.componentDestroyed$.next();
|
this.componentDestroyed$.next();
|
||||||
this.componentDestroyed$.complete();
|
this.componentDestroyed$.complete();
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export enum HttpStatusCode {
|
|||||||
Processing = 102,
|
Processing = 102,
|
||||||
|
|
||||||
// **********************************************************************************************************
|
// **********************************************************************************************************
|
||||||
//#region 200s - SUCCESS
|
// 200s - SUCCESS
|
||||||
// **********************************************************************************************************
|
// **********************************************************************************************************
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -92,10 +92,8 @@ export enum HttpStatusCode {
|
|||||||
*/
|
*/
|
||||||
ImUsed = 226,
|
ImUsed = 226,
|
||||||
|
|
||||||
// #endregion
|
|
||||||
|
|
||||||
// **********************************************************************************************************
|
// **********************************************************************************************************
|
||||||
//#region 300s - Redirections
|
// 300s - Redirections
|
||||||
// **********************************************************************************************************
|
// **********************************************************************************************************
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -161,10 +159,8 @@ export enum HttpStatusCode {
|
|||||||
*/
|
*/
|
||||||
PermanentRedirect = 308,
|
PermanentRedirect = 308,
|
||||||
|
|
||||||
// #endregion
|
|
||||||
|
|
||||||
// **********************************************************************************************************
|
// **********************************************************************************************************
|
||||||
// #region - 400s - Client / User messed up
|
// 400s - Client / User messed up
|
||||||
// **********************************************************************************************************
|
// **********************************************************************************************************
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -335,10 +331,8 @@ export enum HttpStatusCode {
|
|||||||
*/
|
*/
|
||||||
UnavailableForLegalReasons = 451,
|
UnavailableForLegalReasons = 451,
|
||||||
|
|
||||||
// #endregion
|
|
||||||
|
|
||||||
// **********************************************************************************************************
|
// **********************************************************************************************************
|
||||||
// #region - 500s - Serve messed up
|
// 500s - Server messed up
|
||||||
// **********************************************************************************************************
|
// **********************************************************************************************************
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -399,5 +393,4 @@ export enum HttpStatusCode {
|
|||||||
* to require agreement to Terms of Service before granting full Internet access via a Wi-Fi hotspot).
|
* to require agreement to Terms of Service before granting full Internet access via a Wi-Fi hotspot).
|
||||||
*/
|
*/
|
||||||
NetworkAuthenticationRequired = 511,
|
NetworkAuthenticationRequired = 511,
|
||||||
// #endregion
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user