Skip to content

Commit

Permalink
Merge pull request #42 from Lilypad-Tech/nadiem/feat-expand-leaderboard
Browse files Browse the repository at this point in the history
Nadiem/feat expand leaderboard
  • Loading branch information
benjaminpreiss authored Jun 25, 2024
2 parents 320a956 + 45bdb85 commit 34f7889
Show file tree
Hide file tree
Showing 47 changed files with 6,445 additions and 621 deletions.
93 changes: 73 additions & 20 deletions apps/info-dashboard/messages/en.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,74 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"leaderboard_heading_title": "Lilypad Leaderboard",
"leaderboard_heading_subtitle": "Compete and Compare: Showcase Your Node's Performance. ",
"leaderboard_node_provider_table_cardHeader_headerTitle": "Node Provider Leaderbord",
"leaderboard_node_provider_table_cardHeader_subtitle": "Enter your wallet address to see where you rank among the top Node providers.",
"leaderboard_node_provider_table_inputField_placeholder": "Enter wallet address",
"leaderboard_node_provider_table_loadingState_loadingText": "Loading entries ...",
"leaderboard_node_provider_table_loadingState_loadingHint": "This might take a moment!",
"leaderboard_node_provider_table_share_x_tweet_shareText": "I'm running a node on the Lilypad network, check out my rank on the leaderboard!",
"leaderboard_node_provider_table_errorState_errorText": "404 Error",
"leaderboard_node_provider_table_errorState_errorHint": "Something went wrong - try reloading the page!",
"leaderboard_node_provider_table_emptyState_emptyHint": "You can either come back later, reload the page or clear your searchbar.",
"leaderboard_node_provider_table_emptyState_emptyText": "No entries found",
"leaderboard_node_provider_table_first_status": "Lily Titan",
"leaderboard_node_provider_table_second_status": "Lily Legend",
"leaderboard_node_provider_table_third_status": "Lily Wizard",
"leaderboard_node_provider_table_last_status": "Lily Machine",
"not_found_message": "Oops, something went wrong! return",
"not_found_home": "home"
}
"$schema": "https://inlang.com/schema/inlang-message-format",
"leaderboard_heading_title": "Lilypad Leaderboard",
"leaderboard_heading_subtitle": "Compete and Compare: Showcase Your Node's Performance. ",
"leaderboard_node_provider_table_cardHeader_headerTitle": "Node Provider Leaderboard",
"leaderboard_node_provider_table_cardHeader_subtitle": "Enter your wallet address to see where you rank among the top Node providers.",
"leaderboard_node_provider_table_inputField_placeholder": "Enter wallet address",
"leaderboard_node_provider_table_loadingState_loadingText": "Loading entries ...",
"leaderboard_node_provider_table_loadingState_loadingHint": "This might take a moment!",
"leaderboard_node_provider_table_share_x_tweet_shareText": "I'm running a node on the Lilypad network, check out my rank on the leaderboard!",
"leaderboard_node_provider_table_errorState_errorText": "404 Error",
"leaderboard_node_provider_table_errorState_errorHint": "Something went wrong - try reloading the page!",
"leaderboard_node_provider_table_emptyState_emptyHint": "You can either come back later, reload the page or clear your searchbar.",
"leaderboard_node_provider_table_emptyState_emptyText": "No entries found",
"leaderboard_node_provider_table_first_status": "Lily Titan",
"leaderboard_node_provider_table_second_status": "Lily Legend",
"leaderboard_node_provider_table_third_status": "Lily Wizard",
"leaderboard_node_provider_table_last_status": "Lily Machine",

"metrics_heading_title": "Metrics Dashboard",
"metrics_heading_subtitle": "Decentralized Computing: Performance Insights.",
"metrics_card_1_title": "Total jobs completed",
"metrics_card_2_title": "Active nodes",
"metrics_card_3_title": "Total Hash-rate",
"metrics_total_jobs_completed_chart_title": "Total jobs completed",
"metrics_active_nodes_chart_title": "Active nodes",
"metrics_dashboard_month_time_axis_label": "Month",
"not_found_message": "Oops, something went wrong! return",
"not_found_home": "home",
"metrics_nav_item_home": "Home",
"metrics_nav_item_home_link": "https://lilypad.tech",
"metrics_nav_item_metrics": "Metrics",
"metrics_nav_item_leaderboard": "Leaderboard",
"footer_lilypad_logo_alt": "Lilypad logo",
"metrics_footer_social_link_twitter": "https://twitter.com/lilypad_tech",
"metrics_footer_social_link_discord": "https://discord.gg/zWYTNZqB",
"metrics_footer_social_link_telegram": "https://t.me/lilypadnetwork",
"metrics_footer_social_link_github": "https://github.com/Lilypad-Tech",
"metrics_footer_social_link_linkedin": "https://www.linkedin.com/company/lilypad-network/",
"metrics_footer_social_link_youtube": "https://www.youtube.com/@LilypadNetwork/featured",
"metrics_navbar_lilypad_logo_alt": "Lilypad logo",
"info_dashboard_page_meta_title": "Lilypad Network",
"info_dashboard_page_meta_description": "Track your progress and strive for the top spot on the Lilypad Network Leaderboard. ",
"incentivenet_banner_text": "IncentiveNet",
"incentivenet_banner_dismiss_text": "Dismiss",
"incentivenet_banner_learn_more_text": "Learn more",
"incentivenet_banner_learn_more_link": "https://blog.lilypad.tech/incentivenet",
"incentivenet_launch_timestamptz": "2024-06-26T00:00:00.000Z",
"incentivenet_launch_countdown_before_launch": "Lilypad Incentivised Testnet Program launches in {time}!",
"incentivenet_launch_countdown_at_launch": "Join us on today's launch of Lilypad Incentivised Testnet Program!",
"incentivenet_launch_countdown_after_launch": "Lilypad Incentivised Testnet Program is live!",
"metrics_active_nodes_world_map_title": "Active nodes world distribution",
"leaderboard_node_provider_table_first_level": "Lily Titan",
"leaderboard_node_provider_table_second_level": "Lily Legend",
"leaderboard_node_provider_table_third_level": "Lily Wizard",
"leaderboard_node_provider_table_last_level": "Lily Machine",
"leaderboard_node_provider_table_online_status": "Online",
"leaderboard_node_provider_table_offline_status": "Offline",
"leaderboard_header_titles_rank": "Rank",
"leaderboard_header_titles_level": "Level",
"leaderboard_header_titles_energy_provided": "Energy Provided (TFLOPS*s)",
"leaderboard_header_titles_reward_points": "Lilybit_rewards",
"leaderboard_header_titles_status": "Status",
"leaderboard_header_titles_share": "Share",
"leaderboard_header_titles_wallet": "Wallet ID",
"leaderboard_header_tooltip_description_level": "The leaderboard is categorized into the following levels, based on the node rank:\n\n1 to 5 - Lily Titan\n6 to 15 - Lily Legend\n16 to 35 - Lily Wizard\n36 and higher - Lily Machine",
"leaderboard_header_tooltip_description_energy_provided": "Measured in TeraFLOPS seconds.",
"leaderboard_header_tooltip_description_reward_points": "Measured as Lilybit_rewards earned. Start early to earn more.",
"leaderboard_header_tooltip_title_level": "Level",
"leaderboard_header_tooltip_title_energy_provided": "Accumulative energy provided",
"leaderboard_header_tooltip_title_reward_points": "Accumulative reward points earned",
"leaderboard_node_provider_table_share_x_tweet_shareText2": "– I'm a ",
"leaderboard_node_provider_table_no_data_status": "No data"
}
23 changes: 20 additions & 3 deletions apps/info-dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,44 @@
"dev": "doppler run --preserve-env -- next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "next lint",
"test": "vitest",
"preview": "pnpm dlx http-server out"
},
"dependencies": {
"@floating-ui/react": "^0.26.17",
"@frontline-hq/untitledui-icons": "^0.0.4",
"@inlang/paraglide-js-adapter-next": "3.3.0",
"@tanstack/react-query": "^5.40.1",
"d3": "^7.9.0",
"luxon": "^3.4.4",
"maplibre-gl": "^4.4.1",
"next": "14.2.3",
"react": "^18",
"react-dom": "^18"
"react-dom": "^18",
"react-map-gl": "^7.1.7",
"recharts": "2.13.0-alpha.4",
"tailwind-merge": "^2.3.0"
},
"devDependencies": {
"@inlang/paraglide-js": "1.7.0",
"@lilypad/uui-tailwind-styles": "workspace:~",
"@testing-library/react": "^16.0.0",
"@types/d3": "^7.4.3",
"@types/geojson": "^7946.0.14",
"@types/luxon": "^3.4.2",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/react-helmet": "^6.1.11",
"@vitejs/plugin-react": "^4.3.1",
"eslint": "^8",
"eslint-config-next": "14.2.3",
"geojson": "^0.5.0",
"jsdom": "^24.1.0",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"typescript": "^5"
"typescript": "^5",
"vitest": "^1.6.0"
}
}
1 change: 1 addition & 0 deletions apps/info-dashboard/project.inlang/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cache
32 changes: 24 additions & 8 deletions apps/info-dashboard/src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,31 @@
@tailwind utilities;

@layer components {
.no-scrollbar {
-ms-overflow-style: none;
scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
display: none;
}
.no-scrollbar {
-ms-overflow-style: none;
scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
display: none;
}
}

html {
scroll-behavior: smooth;
scroll-behavior: smooth;
}

.recharts-cartesian-axis-tick-value {
@apply uui-text-xs font-regular fill-uui-text-tertiary-600;
}
.recharts-cartesian-axis-line {
@apply stroke-none;
}
.recharts-cartesian-axis-tick-line {
@apply stroke-none;
}
.recharts-cartesian-grid-horizontal line {
@apply stroke-uui-border-secondary stroke-1;
}
.recharts-curve.recharts-area-curve {
@apply stroke-2 stroke-uui-utility-brand-600;
}
184 changes: 139 additions & 45 deletions apps/info-dashboard/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,66 +1,160 @@
"use client";
import { languageTag } from "@/paraglide/runtime.js";
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
import NavBar from "@/components/NavBar";
import NavBarUntitled from "@/components/NavBar";
import Footer from "@/components/Footer";
import ReactQueryProvider from "@/components/ReactQueryProvider";
import _NavItemBase from "@/components/_NavItemBase/_NavItemBase";
import { usePathname } from "next/navigation";
import Link from "next/link";
import Image from "next/image";
import _ApplicationNavMenuButton from "@/components/_ApplicationNavMenuButton/_ApplicationNavMenuButton";
import { useState } from "react";
import * as m from "@/paraglide/messages.js";
import CustomAlert from "@/components/Alert/CustomAlert";
import dynamic from "next/dynamic";

const INTER = Inter({ subsets: ["latin"] });

export const METADATA: Metadata = {
title: "Lilypad Network ",
description:
"Track your progress and strive for the top spot on the Lilypad Network Leaderboard. ",
title: m.info_dashboard_page_meta_title(),
description: m.info_dashboard_page_meta_description(),
};

/* TODO check if the telegram is correct */

const SOCIALLINKS = [
{ href: "https://twitter.com/lilypad_tech", iconUrl: "/x.svg" },
{
href: "https://discord.gg/zWYTNZqB",
iconUrl: "/discord.svg",
},
{
href: "https://t.me/lilypadnetwork",
iconUrl: "/telegram.svg",
},
{
href: "https://github.com/Lilypad-Tech",
iconUrl: "/github.svg",
},
{
href: "https://www.linkedin.com/company/lilypad-network/",
iconUrl: "/linkedin.svg",
},
{
href: "https://www.youtube.com/@LilypadNetwork/featured",
iconUrl: "/youtube.svg",
},
{ href: m.metrics_footer_social_link_twitter(), iconUrl: "/x.svg" },
{
href: m.metrics_footer_social_link_discord(),
iconUrl: "/discord.svg",
},
{
href: m.metrics_footer_social_link_telegram(),
iconUrl: "/telegram.svg",
},
{
href: m.metrics_footer_social_link_github(),
iconUrl: "/github.svg",
},
{
href: m.metrics_footer_social_link_linkedin(),
iconUrl: "/linkedin.svg",
},
{
href: m.metrics_footer_social_link_youtube(),
iconUrl: "/youtube.svg",
},
];

const IncentiveNetCountdown = dynamic(
() => import("@/components/IncentiveNetCountdown/IncentiveNetCountdown"),
{ ssr: false }
);

export default function RootLayout({
children,
children,
}: Readonly<{
children: React.ReactNode;
children: React.ReactNode;
}>) {
return (
<html className="uui-dark" lang={languageTag()}>
<body className={INTER.className}>
<ReactQueryProvider>
<NavBar />
{children}
<Footer
footerIcon={{
src: "lilypad-logo.svg",
alt: "Lilypad logo",
href: "#top",
}}
socialLinks={SOCIALLINKS}
/>
</ReactQueryProvider>
</body>
</html>
);
const [menuOpened, setMenuOpened] = useState(false);
const [bannerOpened, setBannerOpened] = useState(true);

const pathname = usePathname();
return (
<html className="uui-dark" lang={languageTag()}>
<body className={INTER.className}>
<ReactQueryProvider>
<div className="sticky top-0 w-full z-40">
<CustomAlert
text={<span>{m.incentivenet_banner_text()}</span>}
supportingText={<IncentiveNetCountdown />}
reactivity={{
isOpen: bannerOpened,
setIsOpen: setBannerOpened,
}}
actions={
<>
<button
onClick={() => setBannerOpened(false)}
>
<span className="text-uui-text-white font-semibold hover:text-uui-button-tertiary-fg uui-text-sm">
{m.incentivenet_banner_dismiss_text()}
</span>
</button>
<Link
target="_blank"
href={m.incentivenet_banner_learn_more_link()}
>
<span className="text-uui-button-tertiary-fg font-semibold hover:text-uui-button-tertiary-fg_hover uui-text-sm">
{m.incentivenet_banner_learn_more_text()}
</span>
</Link>
</>
}
/>
<NavBarUntitled
logo={
<a href="/">
<Image
src="lilypad-logo.svg"
width={155}
height={32}
alt={m.metrics_navbar_lilypad_logo_alt()}
/>
</a>
}
menuButton={
<_ApplicationNavMenuButton></_ApplicationNavMenuButton>
}
openedState={{
opened: menuOpened,
setOpened: setMenuOpened,
}}
>
<a href={m.metrics_nav_item_home_link()}>
<_NavItemBase>
{m.metrics_nav_item_home()}
</_NavItemBase>
</a>
<Link
href="/"
onClick={() => {
setMenuOpened(() => false);
}}
>
<_NavItemBase current={pathname === "/"}>
{m.metrics_nav_item_metrics()}
</_NavItemBase>
</Link>
<Link
href="/leaderboard"
onClick={() => {
setMenuOpened(() => false);
}}
>
<_NavItemBase
current={pathname === "/leaderboard"}
>
{m.metrics_nav_item_leaderboard()}
</_NavItemBase>
</Link>
</NavBarUntitled>
</div>

{children}
<Footer
footerIcon={{
src: "lilypad-logo.svg",
alt: m.footer_lilypad_logo_alt(),
href: "#top",
}}
socialLinks={SOCIALLINKS}
/>
</ReactQueryProvider>
</body>
</html>
);
}
Loading

0 comments on commit 34f7889

Please sign in to comment.