1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-27 04:03:00 +02:00

Remove all TypeScript region use as it is now against the Bitwarden code style guide. (#5356)

This commit is contained in:
Jared Snider 2023-05-04 10:48:01 -04:00 committed by GitHub
parent f06c017e42
commit 120fd14213
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 29 deletions

View File

@ -124,7 +124,7 @@ document.addEventListener("DOMContentLoaded", (event) => {
}
});
//#region Message Processing
// Message Processing
// Listen for messages from the background script
// 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;
}
}
//#endregion Message Processing
// End Message Processing
/**
* 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.
@ -825,9 +825,9 @@ document.addEventListener("DOMContentLoaded", (event) => {
}, 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) {
const barQueryParams = {
type,
@ -924,9 +924,9 @@ document.addEventListener("DOMContentLoaded", (event) => {
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) {
chrome.runtime.sendMessage(msg);
}
@ -992,5 +992,5 @@ document.addEventListener("DOMContentLoaded", (event) => {
return theEl === document;
}
//#endregion Helper Functions
// End Helper Functions
});

View File

@ -69,7 +69,7 @@ export class DomainAddEditDialogComponent implements OnInit, OnDestroy {
private dialogService: DialogServiceAbstraction
) {}
//#region Angular Method Implementations
// Angular Method Implementations
async ngOnInit(): Promise<void> {
// If we have data.orgDomain, then editing, otherwise creating new domain
@ -81,9 +81,9 @@ export class DomainAddEditDialogComponent implements OnInit, OnDestroy {
this.componentDestroyed$.complete();
}
//#endregion
// End Angular Method Implementations
//#region Form methods
// Form methods
async populateForm(): Promise<void> {
if (this.data.orgDomain) {
@ -118,9 +118,9 @@ export class DomainAddEditDialogComponent implements OnInit, OnDestroy {
this.orgDomainService.copyDnsTxt(this.txtCtrl.value);
}
//#endregion
// End Form methods
//#region Async Form Actions
// Async Form Actions
saveDomain = async (): Promise<void> => {
if (this.domainForm.invalid) {
this.platformUtilsService.showToast("error", null, this.i18nService.t("domainFormInvalid"));
@ -266,5 +266,5 @@ export class DomainAddEditDialogComponent implements OnInit, OnDestroy {
this.dialogRef.close();
};
//#endregion
// End Async Form Actions
}

View File

@ -96,7 +96,7 @@ export class DomainVerificationComponent implements OnInit, OnDestroy {
return existingDomainNames;
}
//#region Options
// Options
copyDnsTxt(dnsTxt: string): void {
this.orgDomainService.copyDnsTxt(dnsTxt);
@ -169,8 +169,6 @@ export class DomainVerificationComponent implements OnInit, OnDestroy {
this.platformUtilsService.showToast("success", null, this.i18nService.t("domainRemoved"));
}
//#endregion
ngOnDestroy(): void {
this.componentDestroyed$.next();
this.componentDestroyed$.complete();

View File

@ -27,7 +27,7 @@ export enum HttpStatusCode {
Processing = 102,
// **********************************************************************************************************
//#region 200s - SUCCESS
// 200s - SUCCESS
// **********************************************************************************************************
/**
@ -92,10 +92,8 @@ export enum HttpStatusCode {
*/
ImUsed = 226,
// #endregion
// **********************************************************************************************************
//#region 300s - Redirections
// 300s - Redirections
// **********************************************************************************************************
/**
@ -161,10 +159,8 @@ export enum HttpStatusCode {
*/
PermanentRedirect = 308,
// #endregion
// **********************************************************************************************************
// #region - 400s - Client / User messed up
// 400s - Client / User messed up
// **********************************************************************************************************
/**
@ -335,10 +331,8 @@ export enum HttpStatusCode {
*/
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).
*/
NetworkAuthenticationRequired = 511,
// #endregion
}