Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Commit

Permalink
fixed navigation after delete did/key
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedsmiai committed Sep 28, 2023
1 parent 67461e8 commit d105151
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 9 deletions.
14 changes: 8 additions & 6 deletions web/src/pages/settings/dids/[didId].vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,18 @@ const {
} = await useLazyFetch(`/r/wallet/dids/${didId}`);
refreshNuxtData();
useHead({
title: "View DID - walt.id",
});
async function deleteDid() {
navigateTo("/settings/dids");
await $fetch(`/r/wallet/dids/${didId}`, {
method: "DELETE",
});
}).finally(()=> {navigateTo("/settings/dids")})
}
useHead({
title: "View DID - walt.id",
});
</script>

<style scoped></style>
3 changes: 1 addition & 2 deletions web/src/pages/settings/keys/[keyId].vue
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,7 @@ function exportKey() {
async function deleteKey() {
await $fetch(`/r/wallet/keys/${keyId}`, {
method: "DELETE",
});
navigateTo("/settings/keys");
}).finally(()=>{ navigateTo("/settings/keys")} )
}
useHead({
Expand Down
29 changes: 28 additions & 1 deletion web/src/pages/settings/keys/generate.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,36 @@
<template>
This backend (Wallet Kit) currently does not support this functionality for this tenant.
<CenterMain>
<ol class="divide-y divide-gray-100 list-decimal border rounded-2xl mt-2 px-3" role="list">
<li v-for="method in methods" :key="method[0]" class="flex items-center justify-between gap-x-6 py-4">
<div class="min-w-0">
<div class="flex items-start gap-x-3">
<p class="text-base font-semibold leading-6 text-gray-900">
{{ method[0] }}
</p>
</div>
</div>
<div class="flex flex-none items-center gap-x-4">
<button class="w-32 text-center rounded-md bg-white px-2.5 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:block">
Generate {{ method[0]}}
</button>
</div>
</li>
</ol>
</CenterMain>
</template>

<script setup lang="ts">
import CenterMain from "~/components/CenterMain.vue";
const methods = new Map([
["EdDSA_Ed25519", []],
["ECDSA_Secp256k1", []]
])
useHead({
title: "Generate key - walt.id"
})
</script>

<style scoped>
Expand Down

0 comments on commit d105151

Please sign in to comment.