Browse Source

refactor: fix the 'back' links to work consistently, so contact pages can be included in other flows

pull/218/head
Trent Larson 2 days ago
parent
commit
73806e78bc
  1. 4
      src/views/ContactEditView.vue
  2. 14
      src/views/DIDView.vue

4
src/views/ContactEditView.vue

@ -346,9 +346,7 @@ export default class ContactEditView extends Vue {
// Notify success and redirect
this.notify.success(NOTIFY_CONTACT_SAVED.message, TIMEOUTS.STANDARD);
(this.$router as Router).push({
path: "/did/" + encodeURIComponent(this.contact?.did || ""),
});
this.$router.back();
}
}
</script>

14
src/views/DIDView.vue

@ -12,20 +12,20 @@
</h1>
<!-- Back -->
<router-link
<button
class="order-first text-lg text-center leading-none p-1"
:to="{ name: 'contacts' }"
@click="goBack()"
>
<font-awesome icon="chevron-left" class="block text-center w-[1em]" />
</router-link>
</button>
<!-- Help button -->
<router-link
:to="{ name: 'help' }"
<button
class="block ms-auto text-sm text-center text-white bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] p-1.5 rounded-full"
@click="goToHelp()"
>
<font-awesome icon="question" class="block text-center w-[1em]" />
</router-link>
</button>
</div>
<!-- Identity Details -->
@ -476,7 +476,7 @@ export default class DIDView extends Vue {
* Navigation helper methods
*/
goBack() {
this.$router.go(-1);
this.$router.back();
}
/**

Loading…
Cancel
Save