-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Addin Web UI version * add beta logo and footer styles * add GH link * Adding link on version --------- Co-authored-by: Agustín Longoni <agustin.longoni@altoros.com>
- Loading branch information
1 parent
abacad8
commit 7f783e7
Showing
7 changed files
with
86 additions
and
2 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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,46 @@ | ||
import { Link, Stack, Tooltip, Typography } from "@mui/material"; | ||
import getConfig from "next/config"; | ||
import React from "react"; | ||
|
||
import { FooterContainer } from "./styled"; | ||
|
||
const { publicRuntimeConfig } = getConfig(); | ||
const version = publicRuntimeConfig?.version; | ||
|
||
function isBetaVersion(_version: string): boolean { | ||
const betaRegex = /-beta|-alpha|-rc/; | ||
|
||
return betaRegex.test(_version); | ||
} | ||
|
||
export const Footer: React.FC = () => { | ||
const isBeta = isBetaVersion(version); | ||
|
||
return ( | ||
<FooterContainer> | ||
{isBeta && ( | ||
<Tooltip | ||
title="This project is in beta. Use at your own risk." | ||
placement="top" | ||
> | ||
<Typography variant="caption">Beta version</Typography> | ||
</Tooltip> | ||
)} | ||
{version && ( | ||
<Typography variant="caption"> | ||
<Stack display={"flex"} direction={"row"}> | ||
UI: | ||
<Link | ||
underline="hover" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
href="https://github.com/protofire/ink-multisig-ui" | ||
> | ||
v{version} | ||
</Link> | ||
</Stack> | ||
</Typography> | ||
)} | ||
</FooterContainer> | ||
); | ||
}; |
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,15 @@ | ||
import { styled } from "@mui/material/styles"; | ||
|
||
export const FooterContainer = styled("footer")(({ theme }) => ({ | ||
display: "flex", | ||
alignItems: "flex-end", | ||
boxSizing: "border-box", | ||
fontSize: "1.2rem", | ||
padding: "1rem 0 1rem 15.5rem", | ||
flex: "1 1 auto", | ||
color: theme.palette.text.secondary, | ||
width: "100%", | ||
justifyContent: "center", | ||
margin: "0", | ||
gap: "1rem", | ||
})); |
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