Misc improvements
This commit is contained in:
parent
b9b503d61b
commit
9ed83f0b96
@ -100,6 +100,10 @@ async fn start_socket(req: HttpRequest, stream: web::Payload) -> impl Responder
|
||||
state.parameters = params;
|
||||
state
|
||||
.render()
|
||||
.map(|s| {
|
||||
println!("{}", s);
|
||||
s
|
||||
})
|
||||
.map_err(|e| {
|
||||
format!("Error rendering state: {:?}", e);
|
||||
e
|
||||
|
@ -1,14 +1,12 @@
|
||||
<!-- TODO: When refreshing, the selected element does not change -->
|
||||
<!-- TODO: Do not use .to_string() for comparison -->
|
||||
<select id="template-name" rust-input="change-template">
|
||||
{% let selected_name = parameters.get_name() %}
|
||||
{% for name in Parameters::get_names() %}
|
||||
{%- let selected_name = parameters.get_name() -%}
|
||||
{% for name in Parameters::get_names() -%}
|
||||
<option value="{{ name }}"
|
||||
{% if selected_name == name.to_string() -%}
|
||||
selected="selected"
|
||||
{%- endif -%}
|
||||
{%- if selected_name == name.to_string() %} selected="selected"{% endif -%}
|
||||
>{{ name }}</option>
|
||||
{% endfor %}
|
||||
{% endfor -%}
|
||||
</select>
|
||||
|
||||
<form rust-submit="form">
|
||||
|
Loading…
x
Reference in New Issue
Block a user