- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Web: added connections and databases selector, changed theme color #302
Merged
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
c5fd504
Merge branch 'liuliu/add-custom-title-bar' into liuliu/web-nav-dropdown
liuliu-dev 0c61823
wip
liuliu-dev 8a51cbb
conn and db list, todo: ui on click, reset, default on open
liuliu-dev d8272a2
use current as default, reset db
liuliu-dev e10306e
remove breadcrumbs for app, todo:fix lint
liuliu-dev bb7938e
mobile, gradient, ui fixes
liuliu-dev b1b57c5
show connections link before database page
liuliu-dev 68696d9
feedback wip
liuliu-dev f65f9d9
move to middle, fix long name, same db name issues
liuliu-dev 74024a1
click outside works
liuliu-dev b20259b
color, weight, top
liuliu-dev bd50529
wip
liuliu-dev a30dc4a
web and app top nav
liuliu-dev c0625dc
dropdown wip
liuliu-dev dce6e2e
Merge remote-tracking branch 'origin/main' into liuliu/web-nav-dropdown
liuliu-dev 65411ec
popup ui
liuliu-dev 4d108ba
mobile wip
liuliu-dev 9f5d54a
plus icon
liuliu-dev cbb0254
views, definitions
liuliu-dev 498749d
colors
liuliu-dev 9c5b32f
label
liuliu-dev e3196ff
Merge branch 'liuliu/web-nav-dropdown' into liuliu/left-nav-ui
liuliu-dev 7d08936
table, view, definition list
liuliu-dev 55d76a3
hide icons, bottom, scroll
liuliu-dev 488af3f
conflict
liuliu-dev 76bb6d3
add min window size, web app nav
liuliu-dev bfc9566
ci
liuliu-dev 2b7418b
mobile fix
liuliu-dev c522458
Merge branch 'liuliu/web-nav-dropdown' into liuliu/left-nav-ui
liuliu-dev 7a8dbc1
selectors
liuliu-dev 2ba37df
buttons ui
liuliu-dev af12a83
viewing
liuliu-dev c4362ea
Merge branch 'liuliu/web-nav-dropdown' into liuliu/left-nav-ui
liuliu-dev eadfde7
dropdown updates
liuliu-dev a1ca0ad
Merge remote-tracking branch 'origin/main' into liuliu/web-nav-dropdown
liuliu-dev 7fbe51b
Merge branch 'liuliu/web-nav-dropdown' into liuliu/left-nav-ui
liuliu-dev 1a5c3b0
Merge pull request #317 from dolthub/liuliu/left-nav-ui
liuliu-dev c5abb76
color
liuliu-dev 6f92205
refresh
liuliu-dev f4b758e
active, font size, lowercase
liuliu-dev 26af6ad
url
liuliu-dev 8d84e7c
branch label fixes in mysql and postgres, reset button tooltip, conne…
liuliu-dev 50d72fb
ci fix, nodrag
liuliu-dev 977d422
showlabel for all non-dolt, clearstore,selected conn
liuliu-dev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
dropdown wip
- Loading branch information
commit c0625dc45ed821ca15d457ee63bc0932fccb3c74
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
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 |
---|---|---|
|
@@ -2,6 +2,6 @@ | |
@apply text-sm flex items-center; | ||
|
||
svg { | ||
@apply mr-1; | ||
@apply h-4 w-4; | ||
} | ||
} |
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 was deleted.
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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,10 +1,93 @@ | ||||||
import { DatabaseParams } from "@lib/params"; | ||||||
import DesktopAppNavbar from "./DesktopAppNavbar"; | ||||||
import ConnectionsAndDatabases from "@components/ConnectionsAndDatabases"; | ||||||
import Link from "@components/links/Link"; | ||||||
import { useState } from "react"; | ||||||
import cx from "classnames"; | ||||||
import { dockerHubRepo, workbenchGithubRepo } from "@lib/constants"; | ||||||
import { ExternalLink } from "@dolthub/react-components"; | ||||||
import { FaGithub } from "@react-icons/all-files/fa/FaGithub"; | ||||||
import { FaDocker } from "@react-icons/all-files/fa/FaDocker"; | ||||||
import DocsLink from "@components/links/DocsLink"; | ||||||
import css from "./index.module.css"; | ||||||
|
||||||
// TODO: Support desktop app nav bar on windows | ||||||
const forMacNav = process.env.NEXT_PUBLIC_FOR_MAC_NAV === "true"; | ||||||
|
||||||
const handleDoubleClick = (e: React.MouseEvent<HTMLDivElement>) => { | ||||||
if (e.currentTarget === e.target) { | ||||||
window.ipc.macTitlebarClicked(); | ||||||
} | ||||||
}; | ||||||
|
||||||
type Props = { | ||||||
params?: DatabaseParams; | ||||||
}; | ||||||
|
||||||
export default function Nav({ params }: Props) { | ||||||
return <DesktopAppNavbar params={params} />; | ||||||
export default function DesktopAppNavbar({ params }: Props) { | ||||||
const [noDrag, setNoDrag] = useState(false); | ||||||
|
||||||
return ( | ||||||
<div | ||||||
className={cx(css.titlebar, { | ||||||
[css.drag]: !noDrag, | ||||||
[css.noDrag]: noDrag, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you make |
||||||
})} | ||||||
onDoubleClick={handleDoubleClick} | ||||||
> | ||||||
{params ? ( | ||||||
<Inner params={params} setNoDrag={setNoDrag} /> | ||||||
) : ( | ||||||
<Logo imgSrc="/images/dolt-workbench.png" /> | ||||||
)} | ||||||
</div> | ||||||
); | ||||||
} | ||||||
|
||||||
type InnerProps = { | ||||||
params: DatabaseParams; | ||||||
setNoDrag: (noDrag: boolean) => void; | ||||||
}; | ||||||
|
||||||
function Inner({ params, setNoDrag }: InnerProps) { | ||||||
if (forMacNav) { | ||||||
return ( | ||||||
<div className={css.outer}> | ||||||
<ConnectionsAndDatabases params={params} setNoDrag={setNoDrag} /> | ||||||
<Logo imgSrc="/images/dolt-workbench-grey.png" /> | ||||||
</div> | ||||||
); | ||||||
} | ||||||
return ( | ||||||
<div className={css.desktopOuter}> | ||||||
<Logo imgSrc="/images/dolt-workbench.png" className={css.left} /> | ||||||
<ConnectionsAndDatabases params={params} className={css.middle} /> | ||||||
<RightLinks /> | ||||||
</div> | ||||||
); | ||||||
} | ||||||
|
||||||
type LogoProps = { | ||||||
imgSrc: string; | ||||||
className?: string; | ||||||
}; | ||||||
|
||||||
export function Logo({ imgSrc, className }: LogoProps) { | ||||||
return ( | ||||||
<Link href="/" className={cx(className)}> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
<img src={imgSrc} alt="Dolt Workbench" className={css.logo} /> | ||||||
</Link> | ||||||
); | ||||||
} | ||||||
function RightLinks() { | ||||||
return ( | ||||||
<div className={css.right}> | ||||||
<DocsLink>Documentation</DocsLink> | ||||||
<ExternalLink href={workbenchGithubRepo}> | ||||||
<FaGithub /> GitHub | ||||||
</ExternalLink> | ||||||
<ExternalLink href={dockerHubRepo}> | ||||||
<FaDocker /> Docker Hub | ||||||
</ExternalLink> | ||||||
</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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.