Basic GUI client, login dialog, various comments fixes after copypaste.
Some checks failed
Linting and tests / Linting (push) Failing after 6s
Some checks failed
Linting and tests / Linting (push) Failing after 6s
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package options
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
|
||||
@@ -9,7 +10,11 @@ import (
|
||||
"bunker/client/internal/services/core/options/models"
|
||||
)
|
||||
|
||||
var _ = core.Options(&options{})
|
||||
var (
|
||||
_ = core.Options(&options{})
|
||||
|
||||
errOptions = errors.New("options core service")
|
||||
)
|
||||
|
||||
type options struct {
|
||||
app *application.Application
|
||||
@@ -18,17 +23,17 @@ type options struct {
|
||||
mainWindow core.MainWindow
|
||||
|
||||
widgets map[string]*models.OptionPane
|
||||
widgetsItems []string // для рисования списка Fyne.
|
||||
widgetsItems []string // for Fyne's list widget.
|
||||
}
|
||||
|
||||
// Initialize инициализирует сервис.
|
||||
// Initialize initializes service.
|
||||
func Initialize(app *application.Application) error {
|
||||
opts := &options{
|
||||
app: app,
|
||||
}
|
||||
|
||||
if err := app.RegisterService(opts); err != nil {
|
||||
return fmt.Errorf("%w: %w", core.ErrOptions, err)
|
||||
return fmt.Errorf("%w: %w", &errOptions, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
@@ -4,7 +4,6 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"bunker/client/internal/services/core"
|
||||
"bunker/client/internal/services/core/options/dto"
|
||||
"bunker/client/internal/services/core/options/models"
|
||||
)
|
||||
@@ -15,7 +14,7 @@ func (o *options) RegisterOptionsWidget(widgetData *dto.OptionPane) error {
|
||||
if _, found := o.widgets[widgetData.Name]; found {
|
||||
return fmt.Errorf(
|
||||
"%w: RegisterOptionsWidget: '%s': %w",
|
||||
core.ErrOptions,
|
||||
errOptions,
|
||||
widgetData.Name,
|
||||
errWidgetPaneAlreadyRegistered,
|
||||
)
|
||||
|
Reference in New Issue
Block a user