From bd7a7754f9f8d440e5d09ef7740b2112d7c14d7c Mon Sep 17 00:00:00 2001 From: Ilya Artamonov Date: Mon, 9 Sep 2024 20:22:15 +0300 Subject: [PATCH 1/2] feat: Renamed "Create Database" to "Add Database" --- .../web/dashboard/databases/create_database.go | 18 +++++++++--------- internal/view/web/dashboard/summary/index.go | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/view/web/dashboard/databases/create_database.go b/internal/view/web/dashboard/databases/create_database.go index df3c3e5..b2641f0 100644 --- a/internal/view/web/dashboard/databases/create_database.go +++ b/internal/view/web/dashboard/databases/create_database.go @@ -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{ @@ -99,7 +99,7 @@ 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(), @@ -107,10 +107,10 @@ func createDatabaseButton() gomponents.Node { ), 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(), @@ -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(), ) diff --git a/internal/view/web/dashboard/summary/index.go b/internal/view/web/dashboard/summary/index.go index 7f16db9..e6480c4 100644 --- a/internal/view/web/dashboard/summary/index.go +++ b/internal/view/web/dashboard/summary/index.go @@ -216,7 +216,7 @@ 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"), @@ -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. `), From f548392a83eb8e6b0e82093e942eec2e62cc6cc2 Mon Sep 17 00:00:00 2001 From: Ilya Artamonov Date: Mon, 9 Sep 2024 22:10:30 +0300 Subject: [PATCH 2/2] feat: Renamed "Create Destination" to "Add Destination" --- .../destinations/create_destination.go | 18 +++++++++--------- internal/view/web/dashboard/summary/index.go | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/internal/view/web/dashboard/destinations/create_destination.go b/internal/view/web/dashboard/destinations/create_destination.go index 3c0e29f..cfca1e5 100644 --- a/internal/view/web/dashboard/destinations/create_destination.go +++ b/internal/view/web/dashboard/destinations/create_destination.go @@ -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{ @@ -124,7 +124,7 @@ 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(), @@ -132,10 +132,10 @@ func createDestinationButton() gomponents.Node { ), 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(), @@ -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(), ) diff --git a/internal/view/web/dashboard/summary/index.go b/internal/view/web/dashboard/summary/index.go index e6480c4..4bceeef 100644 --- a/internal/view/web/dashboard/summary/index.go +++ b/internal/view/web/dashboard/summary/index.go @@ -221,7 +221,7 @@ func indexPage( 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"), @@ -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,