@@ -4,11 +4,9 @@ import (
4
4
"fmt"
5
5
"net/http"
6
6
7
- lucide "github.com/eduardolat/gomponents-lucide"
8
7
"github.com/eduardolat/pgbackweb/internal/database/dbgen"
9
8
"github.com/eduardolat/pgbackweb/internal/util/echoutil"
10
9
"github.com/eduardolat/pgbackweb/internal/view/reqctx"
11
- "github.com/eduardolat/pgbackweb/internal/view/web/alpine"
12
10
"github.com/eduardolat/pgbackweb/internal/view/web/component"
13
11
"github.com/eduardolat/pgbackweb/internal/view/web/layout"
14
12
"github.com/google/uuid"
@@ -201,111 +199,8 @@ func indexPage(
201
199
BgColors : []string {blueColor , greenColor , redColor },
202
200
}),
203
201
),
204
- html .Div (
205
- alpine .XData ("genericSlider(4)" ),
206
- alpine .XCloak (),
207
- html .Class ("mt-6 flex flex-col justify-center items-center mx-auto" ),
208
- component .H2Text ("How to use PG Back Web" ),
209
- component .CardBox (component.CardBoxParams {
210
- Class : "mt-4 space-y-4 max-w-[600px]" ,
211
- Children : []gomponents.Node {
212
- html .Div (
213
- html .Class ("flex justify-center" ),
214
- html .Ul (
215
- html .Class ("steps" ),
216
- html .Li (
217
- html .Class ("step" ),
218
- alpine .XBind ("class" , "currentSlide >= 1 ? 'step-primary' : ''" ),
219
- gomponents .Text ("Create database" ),
220
- ),
221
- html .Li (
222
- html .Class ("step" ),
223
- alpine .XBind ("class" , "currentSlide >= 2 ? 'step-primary' : ''" ),
224
- gomponents .Text ("Create destination" ),
225
- ),
226
- html .Li (
227
- html .Class ("step" ),
228
- alpine .XBind ("class" , "currentSlide >= 3 ? 'step-primary' : ''" ),
229
- gomponents .Text ("Create backup" ),
230
- ),
231
- html .Li (
232
- html .Class ("step" ),
233
- alpine .XBind ("class" , "currentSlide >= 4 ? 'step-primary' : ''" ),
234
- gomponents .Text ("Wait for executions" ),
235
- ),
236
- ),
237
- ),
238
-
239
- html .Div (
240
- alpine .XShow ("currentSlide === 1" ),
241
- component .H3Text ("Create database" ),
242
- component .PText (`
243
- To create a database, click on the "Databases" menu item on the
244
- left sidebar. Then click on the "Create database" button. Fill
245
- in the form and click on the "Save" button. You can create as
246
- many databases as you want to backup.
247
- ` ),
248
- ),
249
-
250
- html .Div (
251
- alpine .XShow ("currentSlide === 2" ),
252
- component .H3Text ("Create S3 destination (optional)" ),
253
- component .PText (`
254
- To create a destination, click on the "Destinations" menu item on
255
- the left sidebar. Then click on the "Create destination" button.
256
- Fill in the form and click on the "Save" button. You can create
257
- as many destinations as you want to store the backups. If you
258
- don't want to use S3 destinations and store the backups locally,
259
- you can skip this step.
260
- ` ),
261
- ),
262
-
263
- html .Div (
264
- alpine .XShow ("currentSlide === 3" ),
265
- component .H3Text ("Create backup" ),
266
- component .PText (`
267
- To create a backup you need to have at least one database and one
268
- destination. Click on the "Backups" menu item on the left sidebar.
269
- Then click on the "Create backup" button. Fill in the form and
270
- click on the "Save" button. You can create as many backups as you
271
- want including any combination of databases and destinations.
272
- ` ),
273
- ),
274
202
275
- html .Div (
276
- alpine .XShow ("currentSlide === 4" ),
277
- component .H3Text ("Wait for executions" ),
278
- component .PText (`
279
- When your backup is created and active, the system will start
280
- creating executions based on the schedule you defined. You can
281
- also create executions manually by clicking the "Run backup now"
282
- button on the backups list. You can see the executions on the
283
- "Executions" menu item on the left sidebar and then click on the
284
- "Show details" button to see the details, logs, and download or
285
- delete the backup file.
286
- ` ),
287
- ),
288
-
289
- html .Div (
290
- html .Class ("mt-4 flex justify-between" ),
291
- html .Button (
292
- alpine .XBind ("disabled" , "!hasPrevSlide" ),
293
- alpine .XOn ("click" , "prevSlide" ),
294
- html .Class ("btn btn-neutral btn-ghost" ),
295
- lucide .ChevronLeft (),
296
- component .SpanText ("Previous" ),
297
- ),
298
- html .Button (
299
- alpine .XBind ("disabled" , "!hasNextSlide" ),
300
- alpine .XOn ("click" , "nextSlide" ),
301
- html .Class ("btn btn-neutral btn-ghost" ),
302
- component .SpanText ("Next" ),
303
- lucide .ChevronRight (),
304
- ),
305
- ),
306
- },
307
- }),
308
- ),
203
+ indexHowTo (),
309
204
}
310
205
311
206
return layout .Dashboard (reqCtx , layout.DashboardParams {
0 commit comments