From 34a50d75b36fa1d87e31af8cd470461b8f92f39d Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sun, 19 Mar 2023 17:33:18 -0600 Subject: [PATCH] remove the handle for test-user registration, and add easier instructions --- README.md | 9 +++++---- src/views/AccountViewView.vue | 11 +++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 79bbd90bf..72965aa2a 100644 --- a/README.md +++ b/README.md @@ -44,13 +44,14 @@ New users require registration. This can be done with a claim payload like this On the test server, User #0 has rights to register others, so you can start playing one of two ways: -- Import the keys for that test User `did:ethr:0x000Ee5654b9742f6Fe18ea970e32b97ee2247B51` by importing this seed phrase: `seminar accuse mystery assist delay law thing deal image undo guard initial shallow wrestle list fragile borrow velvet tomorrow awake explain test offer control` +- Import the keys for the test User `did:ethr:0x000Ee5654b9742f6Fe18ea970e32b97ee2247B51` by importing this seed phrase: + `seminar accuse mystery assist delay law thing deal image undo guard initial shallow wrestle list fragile borrow velvet tomorrow awake explain test offer control` -- Register someone else under User #0 on the `/account` page: +- Alternatively, register someone else under User #0 on the `/account` page: - * Edit the `src/views/AccountViewView.vue` file and uncomment the lines referring to "testServerRegisterUser". + * In the `src/views/AccountViewView.vue` file, uncomment the lines referring to "testServerRegisterUser". - * Visit the `/account` page, open the [Vue Devtools browser extension](https://devtools.vuejs.org/), select a component, then type this into the console: `$vm.ctx.testRegisterUser()` + * Visit the `/account` page. diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue index 3a3a514d0..3a8781dc4 100644 --- a/src/views/AccountViewView.vue +++ b/src/views/AccountViewView.vue @@ -203,15 +203,12 @@ import { useClipboard } from "@vueuse/core"; import { db, accountsDB } from "@/db"; import { MASTER_SETTINGS_KEY } from "@/db/tables/settings"; import { deriveAddress, generateSeed, newIdentifier } from "@/libs/crypto"; -import { testServerRegisterUser } from "../test"; +//import { testServerRegisterUser } from "../test"; @Options({ components: {}, }) export default class AccountViewView extends Vue { - // This registers current user in vue plugin with: $vm.ctx.testRegisterUser() - testRegisterUser = testServerRegisterUser; - address = ""; firstName = ""; lastName = ""; @@ -224,6 +221,12 @@ export default class AccountViewView extends Vue { // 'created' hook runs when the Vue instance is first created async created() { + // Uncomment to register this user on the test server. + // To manage within the vue devtools browser extension https://devtools.vuejs.org/ + // assign this to a class variable, eg. "registerThisUser = testServerRegisterUser", + // select a component in the extension, and enter in the console: $vm.ctx.registerThisUser() + //testServerRegisterUser(); + try { await db.open(); const settings = await db.settings.get(MASTER_SETTINGS_KEY);