-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(rxPage): implement new landing (#388)
Implement new landing page with - last internet path and internet status - Most active iface - Eth ports usage
- Loading branch information
Showing
38 changed files
with
1,810 additions
and
436 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ storybook-static | |
build | ||
package-lock.json | ||
i18n | ||
tailwind.config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** @type {import('@lingui/conf').LinguiConfig} */ | ||
module.exports = { | ||
locales: ["es", "pt", "en", "it"], | ||
catalogs: [ | ||
{ | ||
path: "i18n/{locale}/messages", | ||
include: ["src", "plugins"], | ||
}, | ||
], | ||
format: "po", | ||
compileNamespace: "cjs", | ||
extractBabelOptions: { | ||
presets: [ | ||
"preact", | ||
"@babel/preset-typescript", | ||
"@lingui/babel-preset-react", | ||
], | ||
}, | ||
sourceLocale: "en", | ||
fallbackLocales: { | ||
default: "en", | ||
}, | ||
}; |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
import api from "utils/uhttpd.service"; | ||
|
||
export const getMetrics = (ip) => { | ||
console.log("getting metrics for ", ip); | ||
return api.call("lime-metrics", "get_metrics", { target: ip }); | ||
}; | ||
|
||
export const getGateway = () => | ||
api.call("lime-metrics", "get_gateway", {}).then((res) => res.gateway); | ||
|
||
export const getPath = () => | ||
export const getPath = async () => | ||
api.call("lime-metrics", "get_path", {}).then((res) => res.path); | ||
|
||
export const getLoss = async (ip) => | ||
api | ||
.call("lime-metrics", "get_loss", { target: ip }) | ||
.then((res) => +res.loss); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { ComponentChildren, FunctionalComponent } from "preact"; | ||
|
||
export const IconsClassName = "h-14 w-14"; | ||
|
||
interface SectionTitleProps { | ||
children?: ComponentChildren; | ||
icon: ComponentChildren; | ||
} | ||
|
||
export const SectionTitle: FunctionalComponent<SectionTitleProps> = ({ | ||
children, | ||
icon, | ||
}) => { | ||
return ( | ||
<div className="flex items-center gap-x-4 ml-6 mt-6"> | ||
<span className={"text-primary-dark fill-current"}>{icon}</span> | ||
<h1 className="text-4xl font-bold text-left">{children}</h1> | ||
</div> | ||
); | ||
}; | ||
|
||
export const Section = ({ ...props }) => { | ||
return ( | ||
<div className={"w-full container "}> | ||
<div className="w-full" {...props}> | ||
{props.children} | ||
</div> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { Trans } from "@lingui/macro"; | ||
|
||
export const Footer = () => { | ||
const imgClass = "h-16"; | ||
return ( | ||
<div | ||
className={ | ||
"z-50 fixed bottom-0 w-full flex justify-around content-center items-center" | ||
} | ||
> | ||
<div> | ||
<img | ||
src={"assets/icons/AlterMundiLogo.svg"} | ||
className={imgClass} | ||
/> | ||
</div> | ||
<div className={"flex flex-col text-center text-xl"}> | ||
<div className={"italic font-normal text-2xl"}> | ||
<Trans>Need support?</Trans> | ||
</div> | ||
<div> | ||
<Trans> | ||
Join{" "} | ||
<a | ||
className={"text-[#0198FE] hover:text-[#F39100]"} | ||
href={"https://foro.librerouter.org"} | ||
> | ||
foro.librerouter.org | ||
</a> | ||
</Trans> | ||
</div> | ||
<div> | ||
<Trans> | ||
Visit{" "} | ||
<a | ||
className={"text-[#F39100] hover:text-[#0198FE]"} | ||
href={"https://docs.altermundi.net"} | ||
> | ||
docs.altermundi.net | ||
</a> | ||
</Trans> | ||
</div> | ||
</div> | ||
<div> | ||
<img | ||
src={"assets/icons/LibreRouterLogo.svg"} | ||
className={imgClass} | ||
/> | ||
</div> | ||
</div> | ||
); | ||
}; |
Oops, something went wrong.