Browse Source

Added some elementary Vue constructs

simple-signer
Matthew Aaron Raymer 2 years ago
parent
commit
f5a2d71ed3
  1. 4
      src/views/AccountViewView.vue
  2. 2
      src/views/ImportAccountView.vue
  3. 101
      src/views/NewEditProjectView.vue

4
src/views/AccountViewView.vue

@ -222,9 +222,6 @@ export default class AccountViewView extends Vue {
}); });
} }
useAppStore().setCondition("registered"); useAppStore().setCondition("registered");
//appStore.dispatch(appSlice.actions.addLog({log: false, msg: "... created new ID..."}))
//appStore.dispatch(appSlice.actions.addLog({log: false, msg: "... stored new ID..."}))
} catch (err) { } catch (err) {
console.log("Error!"); console.log("Error!");
console.log(err); console.log(err);
@ -236,7 +233,6 @@ export default class AccountViewView extends Vue {
console.log("Problem! Should have a profile!"); console.log("Problem! Should have a profile!");
} else { } else {
const accounts = await db.accounts.toArray(); const accounts = await db.accounts.toArray();
console.log(accounts[0]);
const identity = JSON.parse(accounts[0].identity); const identity = JSON.parse(accounts[0].identity);
this.address = identity.did; this.address = identity.did;
this.publicHex = identity.keys[0].publicKeyHex; this.publicHex = identity.keys[0].publicKeyHex;

2
src/views/ImportAccountView.vue

@ -79,8 +79,6 @@ export default class ImportAccountView extends Vue {
this.UPORT_ROOT_DERIVATION_PATH this.UPORT_ROOT_DERIVATION_PATH
); );
console.log(newId);
try { try {
await db.open(); await db.open();
const num_accounts = await db.accounts.count(); const num_accounts = await db.accounts.count();

101
src/views/NewEditProjectView.vue

@ -16,55 +16,57 @@
</div> </div>
<!-- Project Details --> <!-- Project Details -->
<form> <!-- Image - (see design model) Empty -->
<!-- Image - (see design model) Empty -->
<!-- Image - Populated --> <!-- Image - Populated -->
<div class="relative mb-4 rounded-md overflow-hidden"> <div class="relative mb-4 rounded-md overflow-hidden">
<div class="absolute top-3 right-3 flex gap-2"> <div class="absolute top-3 right-3 flex gap-2">
<button <button
class="text-md font-bold uppercase bg-blue-600 text-white px-3 py-2 rounded" class="text-md font-bold uppercase bg-blue-600 text-white px-3 py-2 rounded"
> >
<fa icon="pen" class="fa-fw"></fa> <fa icon="pen" class="fa-fw"></fa>
</button> </button>
<button
class="text-md font-bold uppercase bg-red-600 text-white px-3 py-2 rounded"
>
<fa icon="trash-can" class="fa-fw"></fa>
</button>
</div>
<img src="https://picsum.photos/800/400" class="w-full" />
</div>
<input
type="text"
placeholder="Project Name"
class="block w-full rounded border border-slate-400 mb-4 px-3 py-2"
/>
<textarea
placeholder="Description"
class="block w-full rounded border border-slate-400 mb-4 px-3 py-2"
rows="5"
></textarea>
<div class="text-xs text-slate-500 italic -mt-3 mb-4">
88/500 max. characters
</div>
<div class="mt-8">
<input
type="submit"
class="block w-full text-center text-lg font-bold uppercase bg-blue-600 text-white px-2 py-3 rounded-md mb-2"
value="Save Project"
/>
<button <button
type="button" class="text-md font-bold uppercase bg-red-600 text-white px-3 py-2 rounded"
class="block w-full text-center text-md uppercase bg-slate-500 text-white px-1.5 py-2 rounded-md"
> >
Cancel <fa icon="trash-can" class="fa-fw"></fa>
</button> </button>
</div> </div>
</form> <img src="https://picsum.photos/800/400" class="w-full" />
</div>
<input
type="text"
placeholder="Project Name"
class="block w-full rounded border border-slate-400 mb-4 px-3 py-2"
v-modal="projectName"
/>
<textarea
placeholder="Description"
class="block w-full rounded border border-slate-400 mb-4 px-3 py-2"
rows="5"
v-model="description"
></textarea>
<div class="text-xs text-slate-500 italic -mt-3 mb-4">
88/500 max. characters
</div>
<div class="mt-8">
<button
class="block w-full text-center text-lg font-bold uppercase bg-blue-600 text-white px-2 py-3 rounded-md mb-2"
@click="onSaveProjectClick()"
>
Save Project
</button>
<button
type="button"
class="block w-full text-center text-md uppercase bg-slate-500 text-white px-1.5 py-2 rounded-md"
@click="onCancelClick()"
>
Cancel
</button>
</div>
</section> </section>
</template> </template>
@ -74,5 +76,14 @@ import { Options, Vue } from "vue-class-component";
@Options({ @Options({
components: {}, components: {},
}) })
export default class NewEditProjectView extends Vue {} export default class NewEditProjectView extends Vue {
projectName = "";
description = "";
public async onSaveProjectClick() {
console.log("Placeholder");
}
public onCancelClick() {
this.$router.back();
}
}
</script> </script>

Loading…
Cancel
Save