diff --git a/apps/browser/src/_locales/en/messages.json b/apps/browser/src/_locales/en/messages.json index 8211f8eeb6..4592e295b8 100644 --- a/apps/browser/src/_locales/en/messages.json +++ b/apps/browser/src/_locales/en/messages.json @@ -1973,5 +1973,8 @@ }, "disabledOrganizationFilterError" : { "message" : "Items in disabled Organizations cannot be accessed. Contact your Organization owner for assistance." + }, + "cardBrandMir": { + "message": "Mir" } } diff --git a/apps/desktop/src/locales/en/messages.json b/apps/desktop/src/locales/en/messages.json index 7d12b136e6..c86c37522e 100644 --- a/apps/desktop/src/locales/en/messages.json +++ b/apps/desktop/src/locales/en/messages.json @@ -1972,5 +1972,8 @@ }, "neverLockWarning": { "message": "Are you sure you want to use the \"Never\" option? Setting your lock options to \"Never\" stores your vault's encryption key on your device. If you use this option you should ensure that you keep your device properly protected." - } + }, + "cardBrandMir": { + "message": "Mir" + } } diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json index 48d6f7fdf3..3a44482eb1 100644 --- a/apps/web/src/locales/en/messages.json +++ b/apps/web/src/locales/en/messages.json @@ -5267,5 +5267,8 @@ }, "on": { "message": "On" + }, + "cardBrandMir": { + "message": "Mir" } } diff --git a/libs/angular/src/components/add-edit.component.ts b/libs/angular/src/components/add-edit.component.ts index bac45023a9..da7862cc01 100644 --- a/libs/angular/src/components/add-edit.component.ts +++ b/libs/angular/src/components/add-edit.component.ts @@ -110,6 +110,7 @@ export class AddEditComponent implements OnInit { { name: "Maestro", value: "Maestro" }, { name: "UnionPay", value: "UnionPay" }, { name: "RuPay", value: "RuPay" }, + { name: i18nService.t("cardBrandMir"), value: "Mir" }, { name: i18nService.t("other"), value: "Other" }, ]; this.cardExpMonthOptions = [ diff --git a/libs/angular/src/components/icon.component.ts b/libs/angular/src/components/icon.component.ts index e715c57ec8..0696649e1f 100644 --- a/libs/angular/src/components/icon.component.ts +++ b/libs/angular/src/components/icon.component.ts @@ -20,6 +20,7 @@ const cardIcons: Record = { Maestro: "card-maestro", UnionPay: "card-union-pay", RuPay: "card-ru-pay", + Mir: "card-mir", }; @Component({ diff --git a/libs/angular/src/images/cards/mir-dark.png b/libs/angular/src/images/cards/mir-dark.png new file mode 100644 index 0000000000..e158470db0 Binary files /dev/null and b/libs/angular/src/images/cards/mir-dark.png differ diff --git a/libs/angular/src/images/cards/mir-light.png b/libs/angular/src/images/cards/mir-light.png new file mode 100644 index 0000000000..e499741520 Binary files /dev/null and b/libs/angular/src/images/cards/mir-light.png differ diff --git a/libs/angular/src/pipes/credit-card-number.pipe.ts b/libs/angular/src/pipes/credit-card-number.pipe.ts index 11500ef951..a90ae9724d 100644 --- a/libs/angular/src/pipes/credit-card-number.pipe.ts +++ b/libs/angular/src/pipes/credit-card-number.pipe.ts @@ -25,6 +25,12 @@ const numberFormats: Record = { { cardLength: 19, blocks: [6, 13] }, ], Amex: [{ cardLength: 15, blocks: [4, 6, 5] }], + Mir: [ + { cardLength: 16, blocks: [4, 4, 4, 4] }, + { cardLength: 17, blocks: [5, 4, 4, 4] }, + { cardLength: 18, blocks: [6, 4, 4, 4] }, + { cardLength: 19, blocks: [7, 4, 4, 4] }, + ], Other: [{ cardLength: 16, blocks: [4, 4, 4, 4] }], }; diff --git a/libs/angular/src/scss/icons.scss b/libs/angular/src/scss/icons.scss index 58c860ff7e..eaf061912d 100644 --- a/libs/angular/src/scss/icons.scss +++ b/libs/angular/src/scss/icons.scss @@ -9,6 +9,7 @@ $card-icons: ( "mastercard": $card-icons-base + "mastercard-light.png", "union-pay": $card-icons-base + "union_pay-light.png", "ru-pay": $card-icons-base + "ru_pay-light.png", + "mir": $card-icons-base + "mir-light.png", ); $card-icons-dark: ( @@ -21,6 +22,7 @@ $card-icons-dark: ( "mastercard": $card-icons-base + "mastercard-dark.png", "union-pay": $card-icons-base + "union_pay-dark.png", "ru-pay": $card-icons-base + "ru_pay-dark.png", + "mir": $card-icons-base + "mir-dark.png", ); .credit-card-icon { diff --git a/libs/common/src/importers/baseImporter.ts b/libs/common/src/importers/baseImporter.ts index 122b34724d..0e1192a652 100644 --- a/libs/common/src/importers/baseImporter.ts +++ b/libs/common/src/importers/baseImporter.ts @@ -301,6 +301,12 @@ export abstract class BaseImporter { return "Visa"; } + // Mir + re = new RegExp("^220[0-4]"); + if (cardNum.match(re) != null) { + return "Mir"; + } + return null; }