-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from dolthub/taylor/improvements
Start workbench without default db
- Loading branch information
Showing
16 changed files
with
157 additions
and
63 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
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
12 changes: 12 additions & 0 deletions
12
packages/web/components/layouts/MainLayout/index.module.css
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,12 @@ | ||
.layout { | ||
@apply bg-ld-grey h-full; | ||
min-height: 100vh; | ||
} | ||
|
||
.container { | ||
@apply max-w-2xl py-40 px-4 mx-auto; | ||
|
||
h1 { | ||
@apply mb-6 text-center; | ||
} | ||
} |
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,20 @@ | ||
import Navbar from "@components/Navbar"; | ||
import cx from "classnames"; | ||
import { ReactNode } from "react"; | ||
import css from "./index.module.css"; | ||
|
||
type Props = { | ||
children: ReactNode; | ||
className?: string; | ||
}; | ||
|
||
export default function MainLayout(props: Props) { | ||
return ( | ||
<div className={css.layout}> | ||
<Navbar home /> | ||
<main className={cx(css.container, props.className)}> | ||
{props.children} | ||
</main> | ||
</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
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
27 changes: 12 additions & 15 deletions
27
packages/web/components/pageComponents/ConfigurationPage/index.tsx
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,23 +1,20 @@ | ||
import Navbar from "@components/Navbar"; | ||
import MainLayout from "@components/layouts/MainLayout"; | ||
import DoltLink from "@components/links/DoltLink"; | ||
import AddConnectionOptions from "./AddConnectionOptions"; | ||
import css from "./index.module.css"; | ||
|
||
export default function ConfigurationPage() { | ||
return ( | ||
<div> | ||
<Navbar home /> | ||
<main className={css.container}> | ||
<div className={css.top}> | ||
<h1>Configure Database</h1> | ||
<p> | ||
Connect to the workbench using any MySQL-compatible database. Use{" "} | ||
<DoltLink>Dolt</DoltLink> to unlock version control features, like | ||
branch, commits, and merge. | ||
</p> | ||
</div> | ||
<AddConnectionOptions /> | ||
</main> | ||
</div> | ||
<MainLayout className={css.container}> | ||
<div className={css.top}> | ||
<h1>Configure Database</h1> | ||
<p> | ||
Connect to the workbench using any MySQL-compatible database. Use{" "} | ||
<DoltLink>Dolt</DoltLink> to unlock version control features, like | ||
branch, commits, and merge. | ||
</p> | ||
</div> | ||
<AddConnectionOptions /> | ||
</MainLayout> | ||
); | ||
} |
33 changes: 33 additions & 0 deletions
33
packages/web/components/pageComponents/DatabasesPage/index.module.css
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,33 @@ | ||
.container { | ||
p { | ||
@apply text-lg text-center mb-10; | ||
} | ||
} | ||
|
||
.database { | ||
@apply bg-white w-full border my-2 px-4 py-2 rounded flex justify-between; | ||
|
||
&:hover { | ||
@apply border-acc-grey; | ||
} | ||
} | ||
|
||
.button { | ||
@apply bg-acc-hoverlinkblue text-white my-6 px-4 py-1.5 text-base rounded button-shadow; | ||
|
||
&:hover { | ||
@apply text-white bg-acc-linkblue button-shadow-hover; | ||
} | ||
} | ||
|
||
.go { | ||
@apply hidden; | ||
} | ||
|
||
.database:hover .go { | ||
@apply flex items-center; | ||
|
||
svg { | ||
@apply ml-2; | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
packages/web/components/pageComponents/DatabasesPage/index.tsx
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,35 @@ | ||
import CreateDatabase from "@components/CreateDatabase"; | ||
import MainLayout from "@components/layouts/MainLayout"; | ||
import Link from "@components/links/Link"; | ||
import { useDatabasesQuery } from "@gen/graphql-types"; | ||
import { database } from "@lib/urls"; | ||
import { FaChevronRight } from "@react-icons/all-files/fa/FaChevronRight"; | ||
import css from "./index.module.css"; | ||
|
||
export default function DatabasesPage() { | ||
const res = useDatabasesQuery(); | ||
|
||
return ( | ||
<MainLayout className={css.container}> | ||
<h1>Choose a database</h1> | ||
<p> | ||
Choose an existing database or create a new database to get started. | ||
</p> | ||
<ul> | ||
{res.data?.databases.map(db => ( | ||
<li key={db}> | ||
<Link {...database({ databaseName: db })}> | ||
<div className={css.database}> | ||
<span>{db}</span> | ||
<span className={css.go}> | ||
Go <FaChevronRight /> | ||
</span> | ||
</div> | ||
</Link> | ||
</li> | ||
))} | ||
</ul> | ||
<CreateDatabase buttonClassName={css.button} /> | ||
</MainLayout> | ||
); | ||
} |
8 changes: 1 addition & 7 deletions
8
packages/web/components/pageComponents/HomePage/index.module.css
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
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.