From b516fd9c33d376e490f09a7bfa044fea3ada87ab Mon Sep 17 00:00:00 2001 From: Bubka <858858+Bubka@users.noreply.github.com> Date: Tue, 31 Oct 2023 11:41:24 +0100 Subject: [PATCH] Set up the Import view --- .../js_vue3/services/twofaccountService.js | 6 +- .../js_vue3/views/twofaccounts/Import.vue | 398 ++++++++++++++++++ resources/lang/en/twofaccounts.php | 2 +- 3 files changed, 404 insertions(+), 2 deletions(-) create mode 100644 resources/js_vue3/views/twofaccounts/Import.vue diff --git a/resources/js_vue3/services/twofaccountService.js b/resources/js_vue3/services/twofaccountService.js index 70261ea2..5d291085 100644 --- a/resources/js_vue3/services/twofaccountService.js +++ b/resources/js_vue3/services/twofaccountService.js @@ -57,6 +57,10 @@ export default { getQrcode(id, config = {}) { return apiClient.get('/twofaccounts/' + id + '/qrcode', { ...config }) - } + }, + + migrate(payload, config = {}) { + return apiClient.post('/twofaccounts/migration', { payload: payload, withSecret: true }, { ...config }) + }, } \ No newline at end of file diff --git a/resources/js_vue3/views/twofaccounts/Import.vue b/resources/js_vue3/views/twofaccounts/Import.vue new file mode 100644 index 00000000..9131314e --- /dev/null +++ b/resources/js_vue3/views/twofaccounts/Import.vue @@ -0,0 +1,398 @@ + + + diff --git a/resources/lang/en/twofaccounts.php b/resources/lang/en/twofaccounts.php index a9630fd0..864f8187 100644 --- a/resources/lang/en/twofaccounts.php +++ b/resources/lang/en/twofaccounts.php @@ -146,7 +146,7 @@ 'issuer' => 'Issuer', 'imported' => 'Imported', 'failure' => 'Failure', - 'x_valid_accounts_found' => '{count} valid accounts found', + 'x_valid_accounts_found' => ':count valid accounts found', 'import_all' => 'Import all', 'import_this_account' => 'Import this account', 'discard_all' => 'Discard all',