This repository has been archived by the owner on Jan 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added ui for dashboard, sign-up and sign-in dialog
Signed-off-by: guacamole <[email protected]>
- Loading branch information
Showing
22 changed files
with
25,752 additions
and
227 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 |
---|---|---|
|
@@ -3,6 +3,8 @@ | |
# dependencies | ||
/.pnp | ||
.pnp.js | ||
node_modules | ||
.idea | ||
|
||
# testing | ||
/coverage | ||
|
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,65 @@ | ||
import { Input, AutoComplete } from 'antd'; | ||
import { UserOutlined } from '@ant-design/icons'; | ||
|
||
const renderTitle = (title) => ( | ||
<span> | ||
{title} | ||
<a | ||
style={{ | ||
float: 'right', | ||
}} | ||
href="https://www.google.com/search?q=antd" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
more | ||
</a> | ||
</span> | ||
); | ||
|
||
const renderItem = (title, count) => ({ | ||
value: title, | ||
label: ( | ||
<div | ||
style={{ | ||
display: 'flex', | ||
justifyContent: 'space-between', | ||
}} | ||
> | ||
{title} | ||
<span> | ||
<UserOutlined /> {count} | ||
</span> | ||
</div> | ||
), | ||
}); | ||
|
||
// const options = [ | ||
// { | ||
// label: renderTitle('Libraries'), | ||
// options: [renderItem('AntDesign', 10000), renderItem('AntDesign UI', 10600)], | ||
// }, | ||
// { | ||
// label: renderTitle('Solutions'), | ||
// options: [renderItem('AntDesign UI FAQ', 60100), renderItem('AntDesign FAQ', 30010)], | ||
// }, | ||
// { | ||
// label: renderTitle('Articles'), | ||
// options: [renderItem('AntDesign design language', 100000)], | ||
// }, | ||
// ]; | ||
|
||
const Complete = ({options=[]}) => ( | ||
<AutoComplete | ||
dropdownClassName="certain-category-search-dropdown" | ||
dropdownMatchSelectWidth={500} | ||
style={{ | ||
width: "100%", | ||
}} | ||
options={options} | ||
> | ||
<Input.Search size="large" placeholder="Search for container images" /> | ||
</AutoComplete> | ||
); | ||
|
||
export default Complete; |
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,38 @@ | ||
import { Card, Tooltip } from 'antd'; | ||
import { Link } from "react-router-dom"; | ||
import Text from "antd/es/typography/Text"; | ||
|
||
export const Tile = ({repoName, author, updatedAt}) => { | ||
return ( | ||
<div | ||
style={{background: '#ccd7e3', width: "90%", borderRadius: 8, boxShadow: "0.7px 1.4px 1.4px hsl(0deg 0% 0% / 0.48)", margin: "0.5% 0"}}> | ||
<Card | ||
hoverable | ||
headStyle={{background: 'rgba(204,215,227,0.61)', fontWeight: "bold"}} | ||
title={author+"/"+repoName} | ||
bordered={true} | ||
style={{ width: "100%", borderRadius: 8}} | ||
extra={( | ||
<div> | ||
<Text style={{marginRight: "12px"}} copyable={{ | ||
text: `docker pull ${author}/${repoName}`, | ||
tooltips: [<Tooltip>copy pull command</Tooltip>] | ||
}} | ||
/> | ||
<span/> | ||
<Link style={{fontWeight: "bold"}} to={`/details/${author}/${repoName}`}>More</Link> | ||
</div> | ||
)} | ||
> | ||
<p>Author: {author}</p> | ||
<p>Updated At: {updatedAt}</p> | ||
</Card> | ||
</div> | ||
) | ||
} | ||
|
||
export const RenderTileList = ({data = []}) => { | ||
return data.map((item,i) => { | ||
return <Tile repoName={item.repoName} author={item.author} updatedAt={item.updatedAt} key={i}/> | ||
}) | ||
} |
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,61 @@ | ||
import {Menu} from "antd"; | ||
import parachute from "../styles/pictures/parachute.png"; | ||
|
||
import Complete from "./autocomplete"; | ||
import {UserOutlined, ArrowUpOutlined } from "@ant-design/icons"; | ||
import React from "react"; | ||
import {Link} from "react-router-dom"; | ||
|
||
const styles = { | ||
border: { | ||
borderBottomColor: "red", | ||
fontWeight: "bold", | ||
"&:hover": { | ||
backgroundColor: "#fff !important", | ||
borderColor: "#fff !important", | ||
color: "pink", | ||
}, | ||
"border": 'none' | ||
}, | ||
autoComplete: { | ||
width: "40%", | ||
paddingBottom: "0.5%" | ||
}, | ||
menuStyle: { | ||
display:"flex", | ||
justifyContent:"space-between", | ||
alignItems: "center", | ||
backgroundColor: "rgba(152,171,196,0.98)", | ||
"&:hover": { | ||
color: "pink" | ||
} | ||
} | ||
|
||
} | ||
|
||
const NavBar = () => { | ||
return <Menu style={styles.menuStyle} mode="horizontal"> | ||
<Menu.Item style={styles.border} key="openregistry" icon={<img src={parachute} style={{height:50}} alt={""}/>}> | ||
<Link to="/repositories">OpenRegistry</Link> | ||
</Menu.Item> | ||
<Menu.Item style={styles.autoComplete} key="Search"> | ||
<Complete/> | ||
</Menu.Item> | ||
<Menu.Item style={styles.border} key="Repositories"> | ||
<Link to="/repositories">Repositories</Link> | ||
</Menu.Item> | ||
<Menu.Item style={styles.border} key="Explore"> | ||
<Link to="/explore">Explore</Link> | ||
</Menu.Item> | ||
<Menu.Item style={styles.border} key="Help" icon={<ArrowUpOutlined style={{ transform: "rotate(45deg)" }} />}> | ||
<a target="_blank" href={"https://blog.openregistry.dev"}>Blog</a> | ||
</Menu.Item> | ||
<Menu.Item style={styles.border} key="log-out" icon={<UserOutlined/>}> | ||
<Link to="/">Log Out</Link> | ||
</Menu.Item> | ||
|
||
</Menu> | ||
|
||
} | ||
|
||
export default NavBar; |
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
Oops, something went wrong.