Refactor account type names
This commit is contained in:
@@ -41,8 +41,8 @@
|
||||
<button class="btn btn-link p-0 text-start" type="button" (click)="editMailAccount(account)" [disabled]="!permissionsService.currentUserCan(PermissionAction.Change, PermissionType.MailAccount)">
|
||||
{{account.name}}@switch (account.account_type) {
|
||||
@case (MailAccountType.IMAP) {<i-bs name="envelope-at-fill" class="ms-2"></i-bs>}
|
||||
@case (MailAccountType.Gmail) {<i-bs name="google" class="ms-2"></i-bs>}
|
||||
@case (MailAccountType.Outlook) {<i-bs name="microsoft" class="ms-2"></i-bs>}
|
||||
@case (MailAccountType.Gmail_OAuth) {<i-bs name="google" class="ms-2"></i-bs>}
|
||||
@case (MailAccountType.Outlook_OAuth) {<i-bs name="microsoft" class="ms-2"></i-bs>}
|
||||
}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -50,7 +50,7 @@ import { SettingsService } from 'src/app/services/settings.service'
|
||||
const mailAccounts = [
|
||||
{ id: 1, name: 'account1', account_type: MailAccountType.IMAP },
|
||||
{ id: 2, name: 'account2', account_type: MailAccountType.IMAP },
|
||||
{ id: 3, name: 'account3', accout_type: MailAccountType.Gmail },
|
||||
{ id: 3, name: 'account3', accout_type: MailAccountType.Gmail_OAuth },
|
||||
]
|
||||
const mailRules = [
|
||||
{ id: 1, name: 'rule1', owner: 1, account: 1, enabled: true },
|
||||
|
||||
@@ -8,8 +8,8 @@ export enum IMAPSecurity {
|
||||
|
||||
export enum MailAccountType {
|
||||
IMAP = 1,
|
||||
Gmail = 2,
|
||||
Outlook = 3,
|
||||
Gmail_OAuth = 2,
|
||||
Outlook_OAuth = 3,
|
||||
}
|
||||
|
||||
export interface MailAccount extends ObjectWithPermissions {
|
||||
|
||||
Reference in New Issue
Block a user