You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.7 KiB

<template>
<section id="Content" class="p-6 pb-24">
<!-- Breadcrumb -->
<div id="ViewBreadcrumb" class="mb-8">
<h1 class="text-lg text-center font-light relative px-7">
<!-- Cancel -->
<button
@click="$router.go(-1)"
2 years ago
class="text-lg text-center px-2 py-1 absolute -left-2 -top-1"
>
<fa icon="chevron-left"></fa>
</button>
Import Existing Identity
</h1>
</div>
<!-- Import Account Form -->
<form>
2 years ago
<p class="text-center text-xl mb-4 font-light">
Enter your seed phrase below to import your identity on this device.
</p>
<input
type="text"
placeholder="Seed Phrase"
class="block w-full rounded border border-slate-400 mb-4 px-3 py-2"
value="{{ mnemonic }}"
2 years ago
/>
<div class="mt-8">
<button`
@click="import(mnemonic)"
2 years ago
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="Import Identity"
/>
<button
@click="onCancelClick()"
2 years ago
type="button"
class="block w-full text-center text-md uppercase bg-slate-500 text-white px-1.5 py-2 rounded-md"
>
Cancel
</button>
</div>
</form>
</section>
</template>
<script lang="ts">
import { Options, Vue } from "vue-class-component";
@Options({
2 years ago
components: {},
})
export default class ImportAccountView extends Vue {
mnemonic = "";
public onCancelClick() {
this.$router.back();
}
public import() {
// just to get rid of variability that might cause an error
if (this.mnemonic.trim().length > 0) {
this.mnemonic = this.mnemonic.trim().toLowerCase();
}
}
}
</script>