Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NyxUI.jl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nyx
NyxUI.jl
Commits
de7e91f2
Commit
de7e91f2
authored
4 months ago
by
François LAURENT
Browse files
Options
Downloads
Patches
Plain Diff
feat: disable download and delete buttons if no sequences
parent
6ba67e54
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2
UX improvements
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/apps/muscles/app.jl
+10
-2
10 additions, 2 deletions
src/apps/muscles/app.jl
with
10 additions
and
2 deletions
src/apps/muscles/app.jl
+
10
−
2
View file @
de7e91f2
...
@@ -51,6 +51,7 @@ const bonito_app = NamedApp(:inherit, Backbone.app)
...
@@ -51,6 +51,7 @@ const bonito_app = NamedApp(:inherit, Backbone.app)
@out
new_clipboard_item
=
false
@out
new_clipboard_item
=
false
@in
delete_sequence_click
=
false
@in
delete_sequence_click
=
false
@out
no_sequences_yet
=
true
@onchange
isready
begin
@onchange
isready
begin
_
,
url
=
init_model
(
__model__
)
_
,
url
=
init_model
(
__model__
)
...
@@ -151,6 +152,8 @@ const bonito_app = NamedApp(:inherit, Backbone.app)
...
@@ -151,6 +152,8 @@ const bonito_app = NamedApp(:inherit, Backbone.app)
notify
(
start_time
)
notify
(
start_time
)
notify
(
time_interval
)
notify
(
time_interval
)
notify
(
series_length
)
notify
(
series_length
)
# enable the download and delete buttons
no_sequences_yet
=
false
# toggle edit mode on
# toggle edit mode on
editmode
=
true
editmode
=
true
end
end
...
@@ -280,6 +283,8 @@ const bonito_app = NamedApp(:inherit, Backbone.app)
...
@@ -280,6 +283,8 @@ const bonito_app = NamedApp(:inherit, Backbone.app)
end
end
# reset
# reset
fileuploads
=
empty!
(
fileuploads
)
fileuploads
=
empty!
(
fileuploads
)
# enable the download and delete buttons
no_sequences_yet
=
false
end
end
end
end
...
@@ -309,6 +314,8 @@ const bonito_app = NamedApp(:inherit, Backbone.app)
...
@@ -309,6 +314,8 @@ const bonito_app = NamedApp(:inherit, Backbone.app)
selected_sequence_name
=
""
selected_sequence_name
=
""
# update the view
# update the view
sequence_name
=
""
sequence_name
=
""
# disable the download and delete buttons (view)
no_sequences_yet
=
true
# update the model
# update the model
model
.
sequence
[]
=
sequence
model
.
sequence
[]
=
sequence
else
else
...
@@ -338,7 +345,7 @@ function muscle_view(bonito_url=""; channel=":channel")
...
@@ -338,7 +345,7 @@ function muscle_view(bonito_url=""; channel=":channel")
label
=
"Upload motor program(s)"
,
autoupload
=
true
,
hideuploadbtn
=
true
,
label
=
"Upload motor program(s)"
,
autoupload
=
true
,
hideuploadbtn
=
true
,
class
=
"no-file-listing"
,
id
=
"uploader"
,
url
=
"/____/upload/
$
channel"
)),
class
=
"no-file-listing"
,
id
=
"uploader"
,
url
=
"/____/upload/
$
channel"
)),
item
(
btn
(
"Download motor program"
,
@click
(
:
export_sequence_click
),
color
=
"primary"
,
item
(
btn
(
"Download motor program"
,
@click
(
:
export_sequence_click
),
color
=
"primary"
,
loading
=:
export_sequence_click
,
loading
=:
export_sequence_click
,
disable
=:
no_sequences_yet
,
[
tooltip
(
"Download the current motor program as a JSON file"
)])),
[
tooltip
(
"Download the current motor program as a JSON file"
)])),
dropdown
(
:
selected_sequence_name
,
:
sequence_names
,
"Motor program"
,
dropdown
(
:
selected_sequence_name
,
:
sequence_names
,
"Motor program"
,
class
=
"sequence-list"
),
class
=
"sequence-list"
),
...
@@ -362,7 +369,8 @@ function muscle_view(bonito_url=""; channel=":channel")
...
@@ -362,7 +369,8 @@ function muscle_view(bonito_url=""; channel=":channel")
textfield
(
"Start time"
,
:
start_time
,
type
=
"number"
,
step
=
"any"
,
textfield
(
"Start time"
,
:
start_time
,
type
=
"number"
,
step
=
"any"
,
disable
=:
editmode_disable
),
disable
=:
editmode_disable
),
]),
]),
item
(
btn
(
"Delete motor program"
,
@click
(
:
delete_sequence_click
),
color
=
"negative"
)),
item
(
btn
(
"Delete motor program"
,
@click
(
:
delete_sequence_click
),
color
=
"negative"
,
disable
=:
no_sequences_yet
)),
])
])
Html
.
div
(
style
=
col
,
[
Html
.
div
(
style
=
col
,
[
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment