Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
79da4105fc
1 changed files with 12 additions and 11 deletions
|
|
@ -13,7 +13,7 @@
|
|||
<!-- password -->
|
||||
<input class="input" type="password" v-model="password" placeholder="Password" />
|
||||
|
||||
<!-- firstName -->
|
||||
<!-- re-enter passoword -->
|
||||
<input class="input" type="text" v-model="password2" placeholder="Re-enter password" />
|
||||
</div>
|
||||
|
||||
|
|
@ -39,9 +39,9 @@ import { useIpc } from "@/modules/ipc";
|
|||
import { useAuth } from "@/modules/auth";
|
||||
|
||||
interface RegisterPayload {
|
||||
request?: string;
|
||||
email?: string;
|
||||
password?: string;
|
||||
request: string;
|
||||
email: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
export default defineComponent({
|
||||
|
|
@ -49,19 +49,20 @@ export default defineComponent({
|
|||
setup() {
|
||||
const email = ref("");
|
||||
const password = ref("");
|
||||
const rememberMe = ref("");
|
||||
const password2 = ref("");
|
||||
|
||||
const { invoke, data,} = useIpc("auth-user");
|
||||
const { setToken } = useAuth();
|
||||
const router = useRouter();
|
||||
|
||||
const payload: RegisterPayload = {
|
||||
request: "register",
|
||||
email: email.value,
|
||||
password: password.value,
|
||||
};
|
||||
|
||||
const submit = async () => {
|
||||
|
||||
const payload: RegisterPayload = {
|
||||
request: "register",
|
||||
email: email.value,
|
||||
password: password.value,
|
||||
};
|
||||
|
||||
try {
|
||||
await invoke(payload);
|
||||
setToken(data.value, true);
|
||||
|
|
|
|||
Loading…
Reference in a new issue