From 353293cb6eada6b4f89f18713aa945c0144c3a22 Mon Sep 17 00:00:00 2001 From: Taylor Bantle Date: Wed, 15 Nov 2023 10:09:21 -0800 Subject: [PATCH 1/2] web: No databases message --- .../DatabasesPage/index.module.css | 10 +++-- .../pageComponents/DatabasesPage/index.tsx | 39 +++++++++++-------- 2 files changed, 29 insertions(+), 20 deletions(-) diff --git a/web/components/pageComponents/DatabasesPage/index.module.css b/web/components/pageComponents/DatabasesPage/index.module.css index 37ae1e84..0dbb1f95 100644 --- a/web/components/pageComponents/DatabasesPage/index.module.css +++ b/web/components/pageComponents/DatabasesPage/index.module.css @@ -1,7 +1,5 @@ -.container { - p { - @apply text-lg text-center mb-10; - } +.desc { + @apply text-lg text-center mb-10; } .database { @@ -12,6 +10,10 @@ } } +.noDbs { + @apply text-lg; +} + .button { @apply bg-acc-hoverlinkblue text-white my-6 px-4 py-1.5 text-base rounded button-shadow; diff --git a/web/components/pageComponents/DatabasesPage/index.tsx b/web/components/pageComponents/DatabasesPage/index.tsx index 474cf103..d459ed22 100644 --- a/web/components/pageComponents/DatabasesPage/index.tsx +++ b/web/components/pageComponents/DatabasesPage/index.tsx @@ -4,31 +4,38 @@ 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 cx from "classnames"; import css from "./index.module.css"; export default function DatabasesPage() { const res = useDatabasesQuery(); return ( - +

Choose a database

-

+

Choose an existing database or create a new database to get started.

-
    - {res.data?.databases.map(db => ( -
  • - -
    - {db} - - Go - -
    - -
  • - ))} -
+ {res.data?.databases.length ? ( +
    + {res.data.databases.map(db => ( +
  • + +
    + {db} + + Go + +
    + +
  • + ))} +
+ ) : ( +

+ No databases found. Create a database to get started. +

+ )}
); From 74e20230735d7fab51f262d1d3fae60231319da3 Mon Sep 17 00:00:00 2001 From: Taylor Bantle Date: Wed, 15 Nov 2023 10:29:55 -0800 Subject: [PATCH 2/2] README updates --- README.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 38558bdd..e1cb9017 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,21 @@ A SQL workbench for your MySQL-compatible database. Use [Dolt](https://doltdb.com) to unlock powerful version control features, such as branches, commits, and merge. -## Getting started with Docker +## Getting started + +The easiest way to get started is to use Docker. Assuming you have Docker +[installed](https://www.docker.com/get-started/) and running, you can simply pull and run +the image. ``` -% docker compose up --build +% docker pull dolthub/dolt-workbench:combined +% docker run -p 9002:9002 -p 3000:3000 dolthub/dolt-workbench:combined ``` -Navigate to http://localhost:3002 to enter database information. +Navigate to http://localhost:3000 to enter your database information. + +You can find more in-depth instructions o n +[Docker Hub](https://hub.docker.com/repository/docker/taylorbantle1/dolt-workbench). ## Getting started from source @@ -46,3 +54,9 @@ web % yarn dev ``` Open your browser to [localhost:3002](http://localhost:3002). + +## Building the Docker images + +``` +% docker compose build +```