MCPcopy
hub / github.com/basecamp/once / handleFormSubmit

Method handleFormSubmit

internal/ui/settings.go:242–254  ·  view source on GitHub ↗
(msg SettingsSectionSubmitMsg)

Source from the content-addressed store, hash-verified

240}
241
242func (m Settings) handleFormSubmit(msg SettingsSectionSubmitMsg) (Component, tea.Cmd) {
243 if msg.Settings.Equal(m.app.Settings) {
244 return m, m.navigateToDashboard()
245 }
246 if m.namespace.HostInUseByAnother(msg.Settings.Host, m.app.Settings.Name) {
247 m.err = docker.ErrHostnameInUse
248 return m, nil
249 }
250 m.state = settingsStateDeploying
251 m.app.Settings = msg.Settings
252 m.progress = NewProgress(m.width, Colors.Border)
253 return m, tea.Batch(m.progress.Init(), m.runDeploy())
254}
255
256func (m Settings) handleActionResult(msg settingsActionFinishedMsg) (Component, tea.Cmd) {
257 if msg.err != nil {

Callers 1

UpdateMethod · 0.95

Calls 6

navigateToDashboardMethod · 0.95
runDeployMethod · 0.95
NewProgressFunction · 0.85
EqualMethod · 0.80
HostInUseByAnotherMethod · 0.80
InitMethod · 0.65

Tested by

no test coverage detected