From 77cdbbe6e8e9512a54d7c2ea8bf7e5c948bd76d0 Mon Sep 17 00:00:00 2001 From: Eric <5089238+emizzle@users.noreply.github.com> Date: Fri, 14 Jun 2024 18:13:35 +1000 Subject: [PATCH] Add all the bells and whistles Add tooltip, relative time, requestedAt However, fetching data is too slow now and there is a lag after render. Can try removing the fetching of slots when getting past StorageRequested events, and only do that fetch on the details page --- codex.sh | 2 +- package.json | 4 +- src/components/RelativeTime.vue | 26 +++++++++++ src/components/ShortenValue.vue | 24 ++++++++++ src/components/Slots.vue | 6 +-- src/components/StorageRequest.vue | 57 +++++++++++++++--------- src/components/StorageRequests.vue | 24 +++++++--- src/components/Tooltip.vue | 28 ++++++++++++ src/main.js | 16 ++++--- src/plugins/UniqueIdPlugin.js | 70 ++++++++++++++++++++++++++++++ src/stores/requests.js | 49 ++++++++++++++++----- src/utils/ids.js | 27 ++---------- src/views/RequestsView.vue | 4 +- yarn.lock | 10 +++++ 14 files changed, 274 insertions(+), 73 deletions(-) create mode 100644 src/components/RelativeTime.vue create mode 100644 src/components/ShortenValue.vue create mode 100644 src/components/Tooltip.vue create mode 100644 src/plugins/UniqueIdPlugin.js diff --git a/codex.sh b/codex.sh index 99d90b3..b21e246 100755 --- a/codex.sh +++ b/codex.sh @@ -9,7 +9,7 @@ ${CODEX_PATH}/build/codex \ --bootstrap-node=spr:CiUIAhIhAgybmRwboqDdUJjeZrzh43sn5mp8jt6ENIb08tLn4x01EgIDARo8CicAJQgCEiECDJuZHBuioN1QmN5mvOHjeyfmanyO3oQ0hvTy0ufjHTUQh4ifsAYaCwoJBI_0zSiRAnVsKkcwRQIhAJCb_z0E3RsnQrEePdJzMSQrmn_ooHv6mbw1DOh5IbVNAiBbBJrWR8eBV6ftzMd6ofa5khNA2h88OBhMqHCIzSjCeA \ --bootstrap-node=spr:CiUIAhIhAntGLadpfuBCD9XXfiN_43-V3L5VWgFCXxg4a8uhDdnYEgIDARo8CicAJQgCEiECe0Ytp2l-4EIP1dd-I3_jf5XcvlVaAUJfGDhry6EN2dgQsIufsAYaCwoJBNEmoCiRAnV2KkYwRAIgXO3bzd5VF8jLZG8r7dcLJ_FnQBYp1BcxrOvovEa40acCIDhQ14eJRoPwJ6GKgqOkXdaFAsoszl-HIRzYcXKeb7D9 \ --data-dir=./codex-data \ - --log-level='INFO;TRACE:marketplace,node,statemachine,erasure' \ + --log-level='INFO;TRACE:marketplace,node,statemachine,erasure,storestream' \ --api-port=8080 \ --api-bindaddr=0.0.0.0 \ --api-cors-origin='*' \ diff --git a/package.json b/package.json index 5eff5c1..9664b84 100644 --- a/package.json +++ b/package.json @@ -11,11 +11,13 @@ "format": "prettier --write src/" }, "dependencies": { + "@feelinglovelynow/get-relative-time": "^1.1.2", "ethers": "^6.12.1", "flowbite": "^2.3.0", "pinia": "^2.1.7", "vue": "^3.4.21", - "vue-router": "^4.3.0" + "vue-router": "^4.3.0", + "vue-unique-id": "^3.2.1" }, "devDependencies": { "@rushstack/eslint-patch": "^1.8.0", diff --git a/src/components/RelativeTime.vue b/src/components/RelativeTime.vue new file mode 100644 index 0000000..69be5ae --- /dev/null +++ b/src/components/RelativeTime.vue @@ -0,0 +1,26 @@ + + diff --git a/src/components/ShortenValue.vue b/src/components/ShortenValue.vue new file mode 100644 index 0000000..f221762 --- /dev/null +++ b/src/components/ShortenValue.vue @@ -0,0 +1,24 @@ + + diff --git a/src/components/Slots.vue b/src/components/Slots.vue index a70f2ce..88ab14b 100644 --- a/src/components/Slots.vue +++ b/src/components/Slots.vue @@ -1,7 +1,7 @@