diff --git a/.gitignore b/.gitignore index 4a7f73a..da0a37b 100755 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,5 @@ logs .env .env.* !.env.example + +pnpm-lock.yaml \ No newline at end of file diff --git a/README.md b/README.md index d3ccf2a..4b62795 100755 --- a/README.md +++ b/README.md @@ -1,31 +1,7 @@ -# AnyOne Relay Dashboard (WIP) +# AnyOne Relay Dashboard This repo houses the code to display the user specific information pertaining to ANON Relays. -## To Do - -Since this is in progress, there is still work to be done. -While this list seems long much of the boilerplate exists. - -- Get claimable rewards total -- Get previously claimed to date -- Get reward history per user and plot a graph (empty array now) -- We need to implement signing for the functions - see below. -- Register, Claim and Renounce functions need to be tested (need mock data) -- We need decent mock data to test properly - -## Background - -This is actually the third iteration of this code: - -1. ANON built: https://github.com/ATOR-Development/ator-dashboard/ -2. Brewlabs built: https://github.com/brewlabs-code/ator/ -3. Brewlabs built stripped down: https://github.com/brewlabs-code/ator-relay-dashboard - -For reasons not worth getting into now ANON changed directions technically. As such the 2nd build was halted. -Now, the underlying tech has changed somewhat and we are developing an MVP version focussing on the user account section. -Much of the code has been migrated but also some updates where necessary. - ## Tech used While there is a bunch of other packages installed some worth pointing out are: @@ -82,26 +58,5 @@ Data is stored on chain using Arweave - this means it's permanent. Locally or in the app, the data is stored using Pinia. -### Getting data - -For the most part data is fetched using Nuxt's `useAsyncData`. -See https://nuxt.com/docs/getting-started/data-fetching - -Often, but not always, the results are stored in a Pinia state store. -Alongside the store there are actions to retrieve the data, these actions or functions are called by `useAsyncData`, this means we can easily refresh, cache and manage the data. - -#### To get relay data per user we do something like this: - -- Using the Warp SDK we can get the contracts state. -- Namely we want to get `verified` and `claimable` data. -- This returns a list of relay fingerprints and associated addresses, stored in Pinia as a Getter. -- The data is fetched here, `components\DataTableMyRelays.vue`, but stored in Pinia. -- Since this only gives us relay fingerprints, we make an additional request to Arweave (using ARDB) `stores\useMetricsStore.ts`. -- That gives use transaction data, namely the latest transaction ID. -- We use that to retrieve relay meta in JSON format for ALL relays. -- Then we need to map it to the existing fingerprints we retrieved earlier and display in the table. - ## Resources - - https://cookbook.g8way.io/concepts/index.html -- http://arweave.net/bKdUd6vonjrZS4-FUGMPr5ecOeF405pR2DdO_at1D9I (example of Arweave JSON data) diff --git a/components/DashboardHeader.vue b/components/DashboardHeader.vue index 9f4ee84..1c2919c 100755 --- a/components/DashboardHeader.vue +++ b/components/DashboardHeader.vue @@ -5,6 +5,7 @@ import ButtonConnect from './ui-kit/ButtonConnect.vue'; import ButtonMobileMenu from './ui-kit/ButtonMobileMenu.vue'; import ButtonThemeToggle from './ui-kit/ButtonThemeToggle.vue'; import TitleAndLogo from './ui-kit/TitleAndLogo.vue'; +import ReportIssueButton from '@/components/ui-kit/ReportIssueButton.vue'; const menuStore = useMenuStore(); @@ -22,7 +23,6 @@ const menuStore = useMenuStore(); >
-

ANyONe