Add speed and fix <select> options

This commit is contained in:
Omar Roth
2018-07-16 11:57:52 -05:00
parent 96c520b02b
commit 58b5e97fc4
4 changed files with 20 additions and 4 deletions

View File

@@ -22,12 +22,21 @@ function update_value(element) {
<input name="autoplay" id="autoplay" type="checkbox" <% if user.preferences.autoplay %>checked<% end %>>
</div>
<div class="pure-control-group">
<label for="speed">Default speed: </label>
<select name="speed" id="speed">
<% [2.0, 1.5, 1.0, 0.5].each do |option| %>
<option <% if user.preferences.speed == option %> selected <% end %>><%= option %></option>
<% end %>
</select>
</div>
<div class="pure-control-group">
<label for="quality">Preferred video quality: </label>
<select name="quality" id="quality" selected="<%= user.preferences.quality %>">
<option>hd720</option>
<option>medium</option>
<option>small</option>
<select name="quality" id="quality">
<% ["hd720", "medium", "small"].each do |option| %>
<option <% if user.preferences.quality == option %> selected <% end %>><%= option %></option>
<% end %>
</select>
</div>