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

Bitz Bounties STG -> MAIN #409

Merged
merged 47 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
556879f
feature: wip #358 basic ui scaffolds done
newbreedofgeek Apr 8, 2024
ea284a4
Merge branch 'test' into feature-givebits-358
newbreedofgeek Apr 11, 2024
daedb08
feature: wip. bitz app, give bits working but needs refactor
newbreedofgeek Apr 11, 2024
0668589
feature: local upgrades for bits app with latest api updates and crea…
newbreedofgeek Apr 12, 2024
f2bd2c4
feature: WIP bit app give support
newbreedofgeek Apr 14, 2024
6ab8ee4
feature: biz xp, give bits logic mostly done
newbreedofgeek Apr 16, 2024
8cec83f
feature: bits app give bits and refferals work. ready for UI sugar
newbreedofgeek Apr 18, 2024
1b1e0af
feature: bits app working with latest data nft sdk and also merged in…
newbreedofgeek Apr 18, 2024
93a8911
chore: build failed, try and refresh
newbreedofgeek Apr 18, 2024
8df8399
chore: build failed, try and refresh by clearing pack.lock from cache
newbreedofgeek Apr 18, 2024
8017c30
feat: add vortex animation
911-Benedek-RobertGeorge Apr 21, 2024
6301cf6
Merge branch 'feature-givebits-358' into d-robert-feature-givebitz
911-Benedek-RobertGeorge Apr 21, 2024
56f0ff0
feat: bounty cards and leaderboard animation
911-Benedek-RobertGeorge Apr 23, 2024
c987565
feat: add tracing beam animation and bitz logo
911-Benedek-RobertGeorge Apr 24, 2024
ee763ee
feat: make the bounties mobile responsive and light mode
911-Benedek-RobertGeorge Apr 24, 2024
10d9a82
Merge pull request #399 from Itheum/d-robert-feature-givebitz
damienen Apr 24, 2024
52a1680
fix: leaderboard alignment and bitz fetching
911-Benedek-RobertGeorge Apr 25, 2024
392975d
fix: display and bitz issues
911-Benedek-RobertGeorge Apr 25, 2024
eb2b874
feat: add confetti when sending bitz
911-Benedek-RobertGeorge Apr 25, 2024
ba5d541
refactor: remove comments and unused code
911-Benedek-RobertGeorge Apr 25, 2024
16f5f41
fix: confetti animation delay
911-Benedek-RobertGeorge Apr 25, 2024
dcf0aa5
fix: image fix display
911-Benedek-RobertGeorge Apr 25, 2024
dcddc1d
Merge pull request #401 from Itheum/d-robert-feature-givebitz
damienen Apr 25, 2024
6c72349
fix: tweet url
911-Benedek-RobertGeorge Apr 26, 2024
1fb5e6d
Merge pull request #402 from Itheum/d-robert-feature-givebitz
damienen Apr 26, 2024
2e40bf6
chore: change the links to the google forms
911-Benedek-RobertGeorge Apr 26, 2024
39b2e95
fix: balances bugs when changing the address
911-Benedek-RobertGeorge Apr 26, 2024
f92b110
Merge pull request #403 from Itheum/d-robert-feature-givebitz
damienen Apr 26, 2024
6bd50bd
fix: bitzGame image overlapping on different devices
911-Benedek-RobertGeorge Apr 26, 2024
cf96c45
fix: bounty leaderboard animation when closing
911-Benedek-RobertGeorge Apr 26, 2024
0584632
Merge pull request #404 from Itheum/d-robert-feature-givebitz
damienen Apr 26, 2024
962e20c
feat: add button to take user to the bounties
911-Benedek-RobertGeorge Apr 26, 2024
e4c7f5d
Merge pull request #405 from Itheum/d-robert-feature-givebitz
damienen Apr 26, 2024
0163585
Merge pull request #406 from Itheum/test
damienen Apr 26, 2024
9a4dafd
feat: give bitz bounty added to mainnet, fix on style
Enciusan Apr 26, 2024
b22d1ec
bump -v
Enciusan Apr 26, 2024
ee57b3e
Merge pull request #407 from Itheum/d-enciu-fix
Enciusan Apr 26, 2024
daf0f8a
Merge pull request #408 from Itheum/test
Enciusan Apr 26, 2024
dfdc32b
fix: make CTA creator accessible rename bounty to data bounty
911-Benedek-RobertGeorge Apr 27, 2024
feae78e
Merge branch 'test' into d-robert-feature-givebitz
911-Benedek-RobertGeorge Apr 27, 2024
27fa3ec
fix: leaderboard animation and stg testing improvements
911-Benedek-RobertGeorge Apr 27, 2024
7750846
chore: remove extra images
911-Benedek-RobertGeorge Apr 27, 2024
b9b5e96
chore: add DATANFTFT-e0b917-010a data nft
911-Benedek-RobertGeorge Apr 28, 2024
3f10526
Merge pull request #410 from Itheum/d-robert-feature-givebitz
damienen Apr 29, 2024
486f5dc
Merge pull request #411 from Itheum/test
damienen Apr 29, 2024
fde85df
chore: delete use client
damienen Apr 29, 2024
c9dd5eb
Merge branch 'test' into stg
damienen Apr 29, 2024
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 README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# @itheum/explorer-dapp

Itheum Explorer the public explore the Itheum protocol components.

Build using the **MultiversX dApp Template**, built using [React.js](https://reactjs.org/) and [Typescript](https://www.typescriptlang.org/).
Expand Down Expand Up @@ -71,3 +72,7 @@ One can contribute by creating _pull requests_, or by opening _issues_ for disco
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

## Known Issues

If you see some build error in docket or other CICD services related to vite and `@rollup/rollup-linux-x64-gnu`... you will need to `git rm -r --cached ./package-lock.json` locally and make sure you dont commit `package-lock.json`
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "explorer-dapp",
"description": "Itheum Explorer is a DApp for the public to explore and visualize data within the Itheum protocol",
"version": "1.14.5",
"version": "1.14.6",
"author": "Itheum",
"license": "GPL-3.0-or-later",
"dependencies": {
"@fortawesome/fontawesome-svg-core": "6.5.1",
"@fortawesome/free-solid-svg-icons": "6.5.1",
"@fortawesome/react-fontawesome": "0.2.0",
"@itheum/sdk-mx-data-nft": "3.2.0-alpha.2",
"@itheum/sdk-mx-data-nft": "3.2.1",
"@multiversx/sdk-core": "12.19.0",
"@multiversx/sdk-dapp": "2.28.7",
"@multiversx/sdk-network-providers": "2.3.0",
Expand Down Expand Up @@ -41,6 +41,7 @@
"react-vertical-timeline-component": "3.6.0",
"react-zoom-pan-pinch": "3.4.3",
"slick-carousel": "1.8.1",
"simplex-noise": "4.0.1",
damienen marked this conversation as resolved.
Show resolved Hide resolved
"tailwind-merge": "2.2.1",
"tailwindcss-animate": "1.0.7",
"web-vitals": "3.5.2",
Expand Down
6 changes: 5 additions & 1 deletion src/appsConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export type app_token = {
export const TRAILBLAZER_TOKENS: app_token[] = IS_DEVNET
? [
{ tokenIdentifier: "DATANFTFT-e0b917", nonce: 1 },
{ tokenIdentifier: "DATANFTFT-e0b917", nonce: 266 },
// { tokenIdentifier: "DATANFTFT-e0b917", nonce: 423 },
// { tokenIdentifier: "DATANFTFT-e0b917", nonce: 453 },
]
Expand Down Expand Up @@ -57,7 +58,10 @@ export const ESDT_BUBBLE_TOKENS: app_token[] = [
// { tokenIdentifier: "DATANFTFT-e0b917", nonce: 417 }
];
export const TIMECAPSULE_TOKENS: app_token[] = IS_DEVNET
? [{ tokenIdentifier: "DATANFTFT-e0b917", nonce: 57 }]
? [
{ tokenIdentifier: "DATANFTFT-e0b917", nonce: 57 },
{ tokenIdentifier: "DATANFTFT-e0b917", nonce: 266 },
]
: [{ tokenIdentifier: "DATANFTFT-e936d4", nonce: 5 }];

export const BOBER_GAME_ROOM_TOKENS: app_token[] = IS_DEVNET
Expand Down
Binary file added src/assets/img/getbitz/givebitz/bountyMain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/getbitz/givebitz/flaskBottle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/components/CopyAddress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { CopyPlusIcon } from "lucide-react";
export function CopyAddress({ address, precision = 6 }: { address: string; precision?: number }) {
return (
<a
className="line-clamp-2 text-sm leading-snug !text-sky-300 flex gap-2"
className="line-clamp-2 text-sm leading-snug !text-[#35d9fa] flex gap-2"
style={{
cursor: "pointer",
}}
Expand All @@ -14,7 +14,7 @@ export function CopyAddress({ address, precision = 6 }: { address: string; preci
toastSuccess("Address is copied to clipboard");
}}>
{precision > 0 ? address.slice(0, precision) + " ... " + address.slice(-precision) : address}
<CopyPlusIcon className="text-sky-300 w-4 h-4" />
<CopyPlusIcon className="text-[#35d9fa] w-4 h-4" />
</a>
);
}
6 changes: 4 additions & 2 deletions src/components/MXAddressLink.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import React, { FC } from "react";
import { ExternalLink } from "lucide-react";
import { cn } from "libs/utils";

interface MXAddressLinkPropsType {
explorerAddress: string;
address: string;
textStyle?: string;
precision?: number;
}

export const MXAddressLink: FC<MXAddressLinkPropsType> = ({ explorerAddress, address, precision = 6 }) => {
export const MXAddressLink: FC<MXAddressLinkPropsType> = ({ explorerAddress, address, textStyle, precision = 6 }) => {
return (
<a
className="text-decoration-none flex flex-row items-center !text-blue-500 hover:!text-blue-500/80"
className={cn("text-decoration-none flex flex-row items-center !text-blue-500 hover:!text-blue-500/80", textStyle)}
href={`${explorerAddress}/accounts/${address}`}
target="_blank">
{precision > 0 ? address.slice(0, precision) + " ... " + address.slice(-precision) : address}
Expand Down
5 changes: 5 additions & 0 deletions src/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ export const MARKETPLACE_DETAILS_PAGE =
? "https://test.datadex.itheum.io/datanfts/marketplace/"
: "https://datadex.itheum.io/datanfts/marketplace/";

export const CREATOR_PROFILE_PAGE =
import.meta.env.VITE_ENV_NETWORK && import.meta.env.VITE_ENV_NETWORK === EnvironmentsEnum.devnet
? "https://test.datadex.itheum.io/profile/"
: "https://datadex.itheum.io/profile/";

export const MAINNET_EXPLORER_ADDRESS = "https://explorer.multiversx.com";

export const SUPPORTED_COLLECTIONS =
Expand Down
24 changes: 24 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -202,3 +202,27 @@ h6 {
.animate-ping-slow {
animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.before\:translate-x-\[var\(--mouse-x\)\]::before {
content: var(--tw-content);
--tw-translate-x: var(--mouse-x);
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y))
scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.before\:translate-y-\[var\(--mouse-y\)\]::before {
content: var(--tw-content);
--tw-translate-y: var(--mouse-y);
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y))
scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.after\:\[background\:_radial-gradient\(250px_circle_at_var\(--mouse-x\)_var\(--mouse-y\)\2c theme\(colors\.slate\.400\)\2c transparent\)\]::after {
content: var(--tw-content);
background: radial-gradient(250px circle at var(--mouse-x) var(--mouse-y), #94a3b8, transparent);
}

.after\:\[background\:_radial-gradient\(250px_circle_at_var\(--mouse-x\)_var\(--mouse-y\)\2c theme\(colors\.slate\.400\)\2c transparent\)\]::after {
content: var(--tw-content);
background: radial-gradient(250px circle at var(--mouse-x) var(--mouse-y), #94a3b8, transparent);
}
64 changes: 64 additions & 0 deletions src/libComponents/animated/HighlightHoverEffect.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
export class Highlighter {
container: Element;
boxes: unknown[];
mouse: { x: number; y: number };
containerSize: { w: number; h: number };
constructor(containerElement: Element) {
this.container = containerElement;
this.boxes = Array.from(this.container.children);
this.mouse = {
x: 0,
y: 0,
};
this.containerSize = {
w: 0,
h: 0,
};
this.initContainer = this.initContainer.bind(this);
this.onMouseMove = this.onMouseMove.bind(this);
this.init();
}

initContainer() {
const containerElement = this.container as HTMLElement;
this.containerSize.w = containerElement.offsetWidth;
this.containerSize.h = containerElement.offsetHeight;
}

onMouseMove(event: { clientX: any; clientY: any }) {
const { clientX, clientY } = event;
const rect = this.container.getBoundingClientRect();
const { w, h } = this.containerSize;
const x = clientX - rect.left;
const y = clientY - rect.top;
const inside = x < w && x > 0 && y < h && y > 0;
if (inside) {
this.mouse.x = x;
this.mouse.y = y;
this.boxes.forEach((box: unknown) => {
if (typeof box === "object" && box !== null) {
const typedBox = box as {
getBoundingClientRect: () => { (): any; new (): any; left: number; top: number };
style: { setProperty: (arg0: string, arg1: string) => void };
};
const boxX = -(typedBox.getBoundingClientRect().left - rect.left) + this.mouse.x;
const boxY = -(typedBox.getBoundingClientRect().top - rect.top) + this.mouse.y;
typedBox.style.setProperty("--mouse-x", `${boxX}px`);
typedBox.style.setProperty("--mouse-y", `${boxY}px`);
}
});
}
}

init() {
this.initContainer();
window.addEventListener("resize", this.initContainer);
window.addEventListener("mousemove", this.onMouseMove);
}
}

// Init Highlighter
const highlighters = document.querySelectorAll("[data-highlighter]");
highlighters.forEach((highlighter) => {
new Highlighter(highlighter);
});
97 changes: 97 additions & 0 deletions src/libComponents/animated/TracyBeam.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
import React, { useEffect, useRef, useState } from "react";
import { motion, useTransform, useScroll, useSpring } from "framer-motion";
import { cn } from "libs/utils";

export const TracingBeam = ({ children, className }: { children: React.ReactNode; className?: string }) => {
const ref = useRef<HTMLDivElement>(null);
const { scrollYProgress } = useScroll({
target: ref,
offset: ["start start", "end start"],
});

const contentRef = useRef<HTMLDivElement>(null);
const [svgHeight, setSvgHeight] = useState(0);

useEffect(() => {
if (contentRef.current) {
setSvgHeight(contentRef.current.offsetHeight);
}
}, []);

const y1 = useSpring(useTransform(scrollYProgress, [0, 0.8], [50, svgHeight]), {
stiffness: 500,
damping: 90,
});
const y2 = useSpring(useTransform(scrollYProgress, [0, 1], [50, svgHeight - 200]), {
stiffness: 500,
damping: 90,
});

return (
<motion.div ref={ref} className={cn("relative w-full max-w-4xl mx-auto h-full", className)}>
<div className="absolute -left-8 md:-left-8 top-3">
<motion.div
transition={{
duration: 0.2,
delay: 0.5,
}}
animate={{
boxShadow: scrollYProgress.get() > 0 ? "none" : "rgba(0, 0, 0, 0.24) 0px 3px 8px",
}}
className="ml-[27px] h-4 w-4 rounded-full border border-netural-200 shadow-sm flex items-center justify-center">
<motion.div
transition={{
duration: 0.2,
delay: 0.25,
}}
animate={{
backgroundColor: scrollYProgress.get() > 0 ? "white" : "var(--emerald-500)",
borderColor: scrollYProgress.get() > 0 ? "white" : "var(--emerald-600)",
}}
className="h-2 w-2 rounded-full border border-neutral-300 bg-white"
/>
</motion.div>
<svg
viewBox={`0 0 20 ${svgHeight}`}
width="20"
height={svgHeight} // Set the SVG height
className=" ml-4 block"
aria-hidden="true">
<motion.path
d={`M 1 0V -36 l 18 24 V ${svgHeight * 0.8} l -18 24V ${svgHeight}`}
fill="none"
stroke="#9091A0"
strokeOpacity="0.16"
transition={{
duration: 10,
}}></motion.path>
<motion.path
d={`M 1 0V -36 l 18 24 V ${svgHeight * 0.8} l -18 24V ${svgHeight}`}
fill="none"
stroke="url(#gradient)"
strokeWidth="1.25"
className="motion-reduce:hidden"
transition={{
duration: 10,
}}></motion.path>
<defs>
<motion.linearGradient
id="gradient"
gradientUnits="userSpaceOnUse"
x1="0"
x2="0"
y1={y1} // set y1 for gradient
y2={y2} // set y2 for gradient
>
<stop stopColor="#35d9fa" stopOpacity="0"></stop>
<stop stopColor="#35d9fa"></stop>
<stop offset="0.325" stopColor="#18f495"></stop>
<stop offset="1" stopColor="#022629" stopOpacity="0"></stop>
</motion.linearGradient>
</defs>
</svg>
</div>
<div ref={contentRef}>{children}</div>
</motion.div>
);
};
Loading