Browse Source

remove the handle for test-user registration, and add easier instructions

kb/add-usage-guide
Trent Larson 2 years ago
parent
commit
34a50d75b3
  1. 9
      README.md
  2. 11
      src/views/AccountViewView.vue

9
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: 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.

11
src/views/AccountViewView.vue

@ -203,15 +203,12 @@ import { useClipboard } from "@vueuse/core";
import { db, accountsDB } from "@/db"; import { db, accountsDB } from "@/db";
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings"; import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
import { deriveAddress, generateSeed, newIdentifier } from "@/libs/crypto"; import { deriveAddress, generateSeed, newIdentifier } from "@/libs/crypto";
import { testServerRegisterUser } from "../test"; //import { testServerRegisterUser } from "../test";
@Options({ @Options({
components: {}, components: {},
}) })
export default class AccountViewView extends Vue { export default class AccountViewView extends Vue {
// This registers current user in vue plugin with: $vm.ctx.testRegisterUser()
testRegisterUser = testServerRegisterUser;
address = ""; address = "";
firstName = ""; firstName = "";
lastName = ""; lastName = "";
@ -224,6 +221,12 @@ export default class AccountViewView extends Vue {
// 'created' hook runs when the Vue instance is first created // 'created' hook runs when the Vue instance is first created
async 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 { try {
await db.open(); await db.open();
const settings = await db.settings.get(MASTER_SETTINGS_KEY); const settings = await db.settings.get(MASTER_SETTINGS_KEY);

Loading…
Cancel
Save