Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for browser extensions #62

Merged
merged 19 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions helpers/eventBus.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import mitt from "mitt";

const eventBus = mitt();

export { eventBus };
9 changes: 7 additions & 2 deletions layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
<header class="header">
<div class="header-content">
<Incognitee class="logo" />
<p class="address">{{ accountStore.getShortAddress }}</p>
<p class="address" @click="emitAddressClicked">
{{ accountStore.getShortAddress }}
</p>
</div>
</header>
<footer class="footer">
Expand Down Expand Up @@ -90,8 +92,11 @@
<script setup lang="ts">
import Incognitee from "@/assets/img/incognitee-mask.svg";
import { useAccount } from "@/store/account.ts";

import { eventBus } from "@/helpers/eventBus";
const accountStore = useAccount();
const emitAddressClicked = () => {
eventBus.emit("addressClicked");
};
</script>

<style scoped>
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"vue-router": "^4.3.2"
},
"dependencies": {
"@encointer/worker-api": "^0.14.2",
"@encointer/util": "^0.15.0",
"@encointer/worker-api": "^0.15.0",
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
"@headlessui/vue": "^1.7.22",
"@heroicons/vue": "^2.1.3",
Expand All @@ -48,7 +49,7 @@
"@nuxt/ui": "^2.15.2",
"@pinia/nuxt": "^0.5.1",
"@polkadot/api": "^11.2.1",
"@polkadot/extension-dapp": "^0.51.1",
"@polkadot/extension-dapp": "^0.47.6",
brenzi marked this conversation as resolved.
Show resolved Hide resolved
"@polkadot/keyring": "^12.6.2",
"@polkadot/util": "^12.6.2",
"@polkadot/util-crypto": "^12.6.2",
Expand Down
Loading
Loading