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

Fix file menu layout and add credits #25

Merged
merged 1 commit into from
Dec 1, 2023
Merged
Changes from all commits
Commits
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
81 changes: 52 additions & 29 deletions client/src/components/Navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,42 +29,65 @@ export default function Navbar(props: Props) {

return (
<nav className="flex flex-row gap-2 pointer-events-none [&>*]:pointer-events-auto">
<div className="flex panel-surface-050 items-center p-1">
<div className="relative">
<div className="relative">
<div className="flex panel-surface-050 items-center p-1">
<button
className="p-1 rounded-lg hover:bg-surface-100"
// data-tooltip-id="tooltip-navbar"
// data-tooltip-content="Boards"
onClick={toggleBoardMenu}
>
<Folder24Regular />
</button>
{isBoardMenuOpen && (
<div className="absolute left-0 mt-3 p-1 whitespace-nowrap panel-surface-050">
<ul role="menu" aria-orientation="vertical" aria-labelledby="options-menu">
<li>
<button className="w-full p-2 text-sm rounded-lg hover:bg-surface-100" onClick={closeBoardMenu}>
Save Board
</button>
</li>
<li>
<button className="w-full p-2 text-sm rounded-lg hover:bg-surface-100" onClick={closeBoardMenu}>
Open Board
</button>
</li>
<li>
<button className="w-full p-2 text-sm rounded-lg hover:bg-surface-100"
onClick={() => {
closeBoardMenu();
handleNewBoard();
}}>
New Board
</button>
</li>
</ul>
</div>
)}
</div>
{isBoardMenuOpen && (
<div className="flex flex-col absolute left-0 mt-2 whitespace-nowrap panel-surface-050">
<div className="flex flex-col p-1">
<button
className="p-2 text-left text-sm rounded-lg hover:bg-surface-100 disabled:text-surface-300"
onClick={() => {
closeBoardMenu();
handleNewBoard();
}}
>
New Board
</button>
<button
className="p-2 text-left text-sm rounded-lg hover:bg-surface-100 disabled:text-surface-300"
disabled
onClick={closeBoardMenu}
>
Open Board
</button>
<button
className="p-2 text-left text-sm rounded-lg hover:bg-surface-100 disabled:text-surface-300"
disabled
onClick={closeBoardMenu}
>
Save Board
</button>
</div>
<span className="w-full border-t-2 border-surface-100" />
<div className="flex flex-col p-1">
<button
className="p-2 text-left text-sm rounded-lg hover:bg-surface-100 disabled:text-surface-300"
onClick={() => {
closeBoardMenu();
window.alert(
"TaskWeaver is a student project for CS 465 User Interface Design at UIUC.\n\n" +
"Developers:\n" +
" - Zhuojun Cheng\n" +
" - Minh Duong\n" +
" - Lilly He\n" +
" - Ashwin Lamani\n" +
" - Stephanie Patterson\n\n" +
"Source code: https://github.com/lashwi/TaskWeaver"
)
}}
>
Credits
</button>
</div>
</div>
)}
</div>
<div className="flex panel-surface-050 items-center p-1">
<input
Expand Down