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

feat: Renamed "Create Database" to "Add Database" #41

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
18 changes: 9 additions & 9 deletions internal/view/web/dashboard/databases/create_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,19 @@ func createDatabaseButton() gomponents.Node {
htmxAttributes := func(url string) gomponents.Node {
return gomponents.Group([]gomponents.Node{
htmx.HxPost(url),
htmx.HxInclude("#create-database-form"),
htmx.HxDisabledELT(".create-database-btn"),
htmx.HxIndicator("#create-database-loading"),
htmx.HxInclude("#add-database-form"),
htmx.HxDisabledELT(".add-database-btn"),
htmx.HxIndicator("#add-database-loading"),
htmx.HxValidate("true"),
})
}

mo := component.Modal(component.ModalParams{
Size: component.SizeMd,
Title: "Create database",
Title: "Add database",
Content: []gomponents.Node{
html.Form(
html.ID("create-database-form"),
html.ID("add-database-form"),
html.Class("space-y-2"),

component.InputControl(component.InputControlParams{
Expand Down Expand Up @@ -99,18 +99,18 @@ func createDatabaseButton() gomponents.Node {
html.Div(
html.Button(
htmxAttributes("/dashboard/databases/test"),
html.Class("create-database-btn btn btn-neutral btn-outline"),
html.Class("add-database-btn btn btn-neutral btn-outline"),
html.Type("button"),
component.SpanText("Test connection"),
lucide.DatabaseZap(),
),
),
html.Div(
html.Class("flex justify-end items-center space-x-2"),
component.HxLoadingMd("create-database-loading"),
component.HxLoadingMd("add-database-loading"),
html.Button(
htmxAttributes("/dashboard/databases"),
html.Class("create-database-btn btn btn-primary"),
html.Class("add-database-btn btn btn-primary"),
html.Type("button"),
component.SpanText("Save"),
lucide.Save(),
Expand All @@ -123,7 +123,7 @@ func createDatabaseButton() gomponents.Node {
button := html.Button(
mo.OpenerAttr,
html.Class("btn btn-primary"),
component.SpanText("Create database"),
component.SpanText("Add database"),
lucide.Plus(),
)

Expand Down
18 changes: 9 additions & 9 deletions internal/view/web/dashboard/destinations/create_destination.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,19 @@ func createDestinationButton() gomponents.Node {
htmxAttributes := func(url string) gomponents.Node {
return gomponents.Group([]gomponents.Node{
htmx.HxPost(url),
htmx.HxInclude("#create-destination-form"),
htmx.HxDisabledELT(".create-destination-btn"),
htmx.HxIndicator("#create-destination-loading"),
htmx.HxInclude("#add-destination-form"),
htmx.HxDisabledELT(".add-destination-btn"),
htmx.HxIndicator("#add-destination-loading"),
htmx.HxValidate("true"),
})
}

mo := component.Modal(component.ModalParams{
Size: component.SizeMd,
Title: "Create destination",
Title: "Add destination",
Content: []gomponents.Node{
html.Form(
html.ID("create-destination-form"),
html.ID("add-destination-form"),
html.Class("space-y-2"),

component.InputControl(component.InputControlParams{
Expand Down Expand Up @@ -124,18 +124,18 @@ func createDestinationButton() gomponents.Node {
html.Div(
html.Button(
htmxAttributes("/dashboard/destinations/test"),
html.Class("create-destination-btn btn btn-neutral btn-outline"),
html.Class("add-destination-btn btn btn-neutral btn-outline"),
html.Type("button"),
component.SpanText("Test connection"),
lucide.PlugZap(),
),
),
html.Div(
html.Class("flex justify-end items-center space-x-2"),
component.HxLoadingMd("create-destination-loading"),
component.HxLoadingMd("add-destination-loading"),
html.Button(
htmxAttributes("/dashboard/destinations"),
html.Class("create-destination-btn btn btn-primary"),
html.Class("add-destination-btn btn btn-primary"),
html.Type("button"),
component.SpanText("Save"),
lucide.Save(),
Expand All @@ -148,7 +148,7 @@ func createDestinationButton() gomponents.Node {
button := html.Button(
mo.OpenerAttr,
html.Class("btn btn-primary"),
component.SpanText("Create destination"),
component.SpanText("Add destination"),
lucide.Plus(),
)

Expand Down
10 changes: 5 additions & 5 deletions internal/view/web/dashboard/summary/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,12 @@ func indexPage(
html.Li(
html.Class("step"),
alpine.XBind("class", "currentSlide >= 1 ? 'step-primary' : ''"),
gomponents.Text("Create database"),
gomponents.Text("Add database"),
),
html.Li(
html.Class("step"),
alpine.XBind("class", "currentSlide >= 2 ? 'step-primary' : ''"),
gomponents.Text("Create destination"),
gomponents.Text("Add destination"),
),
html.Li(
html.Class("step"),
Expand All @@ -238,10 +238,10 @@ func indexPage(

html.Div(
alpine.XShow("currentSlide === 1"),
component.H3Text("Create database"),
component.H3Text("Add database"),
component.PText(`
To create a database, click on the "Databases" menu item on the
left sidebar. Then click on the "Create database" button. Fill
left sidebar. Then click on the "Add database" button. Fill
in the form and click on the "Save" button. You can create as
many databases as you want to backup.
`),
Expand All @@ -252,7 +252,7 @@ func indexPage(
component.H3Text("Create S3 destination (optional)"),
component.PText(`
To create a destination, click on the "Destinations" menu item on
the left sidebar. Then click on the "Create destination" button.
the left sidebar. Then click on the "Add destination" button.
Fill in the form and click on the "Save" button. You can create
as many destinations as you want to store the backups. If you
don't want to use S3 destinations and store the backups locally,
Expand Down