The very basic client app, not adapted for mobiles.
This commit is contained in:
36
client/internal/services/core/database/options.go
Normal file
36
client/internal/services/core/database/options.go
Normal file
@@ -0,0 +1,36 @@
|
||||
package database
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"bunker/client/internal/services/core/options/dto"
|
||||
|
||||
"fyne.io/fyne/v2/widget"
|
||||
)
|
||||
|
||||
func (d *database) initializeOptions() error {
|
||||
databaseMaxIdleConnsEntry := widget.NewEntry()
|
||||
databaseMaxIdleConns := widget.NewFormItem("Maximum idle connections", databaseMaxIdleConnsEntry)
|
||||
|
||||
databaseMaxOpenedConnsEntry := widget.NewEntry()
|
||||
databaseMaxOpenedConns := widget.NewFormItem("Maximum opened connections", databaseMaxOpenedConnsEntry)
|
||||
|
||||
optionsWidgetForm := widget.NewForm(
|
||||
databaseMaxIdleConns,
|
||||
databaseMaxOpenedConns,
|
||||
)
|
||||
|
||||
if err := d.options.RegisterOptionsWidget(&dto.OptionPane{
|
||||
Widget: optionsWidgetForm,
|
||||
SaveHandler: d.saveOptions,
|
||||
Name: "Database",
|
||||
}); err != nil {
|
||||
return fmt.Errorf("register options widget: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *database) saveOptions() error {
|
||||
return nil
|
||||
}
|
Reference in New Issue
Block a user