feat: issue #25 implemented - cli
This commit is contained in:
@@ -487,6 +487,15 @@ defmodule BDS.TUI do
|
||||
index = Enum.find_index(options, &(&1 == field.value)) || 0
|
||||
{:noreply, update_field(state, field.key, Enum.at(options, rem(index + 1, length(options))))}
|
||||
|
||||
%{type: :action} = field ->
|
||||
message =
|
||||
case SettingsForm.run_action(field.key) do
|
||||
{:ok, message} -> message
|
||||
{:error, message} -> message
|
||||
end
|
||||
|
||||
{:noreply, toast(state, field.label, message)}
|
||||
|
||||
_other ->
|
||||
{:noreply, state}
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user