Skip to content

Commit

Permalink
Environment screen buttons can only be pressed when the action is valid
Browse files Browse the repository at this point in the history
  • Loading branch information
yazz committed Nov 23, 2023
1 parent e7acb4a commit 72d81cd
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -405,18 +405,22 @@ when was the change in a commit first made (each commit can have many changes)
<div>
<button type=button
class=' btn btn-info btn-lg'
v-bind:disabled="pane_environments_selected_env_id==null"
v-on:click='pane_environment_editPressed()' >Edit</button>
<button type=button
class=' btn btn-info btn-lg'
v-bind:disabled="(pane_environments_selected_env_id==null) || (pane_environments_selected_env_pos == 0)"
v-on:click='pane_environment_moveUpPressed()' >Move Up</button>
<button type=button
class=' btn btn-info btn-lg'
v-bind:disabled="(pane_environments_selected_env_id==null) || (pane_environments_selected_env_pos == (pane_environments_env_list.length - 1))"
v-on:click='pane_environment_moveDownPressed()' >Move Down</button>
<button type=button
class=' btn btn-info btn-lg'
v-bind:disabled="pane_environments_selected_env_id==null"
v-on:click='pane_environment_deletePressed()' >Delete</button>
<button type=button
Expand Down Expand Up @@ -1272,7 +1276,6 @@ when was the change in a commit first made (each commit can have many changes)
//--------------------------------------------------------------------
try {
let mm = this
showProgressBar()

mm.pane_environments_env_list.unshift(
{
Expand All @@ -1293,10 +1296,9 @@ when was the change in a commit first made (each commit can have many changes)
mm.pane_environments_env_name = ""
mm.pane_environments_env_desc = ""
mm.editingEnvironment = true
await pane_environment_envSelected()

mm.refresh ++

hideProgressBar()
} catch (e) {

}
Expand Down Expand Up @@ -1518,6 +1520,7 @@ when was the change in a commit first made (each commit can have many changes)

mm.pane_environments_selected_env_pos = null
mm.pane_environments_selected_env_id = null
mm.editingEnvironment = false
await pane_environment_envSelected()

} catch (e) {
Expand Down

0 comments on commit 72d81cd

Please sign in to comment.