implement toggle view to hide watched videos

This commit is contained in:
simon 2021-10-03 18:52:29 +07:00
parent ccc8a658b7
commit f5f3617e96

View File

@ -13,13 +13,6 @@
<option value="downloaded">date downloaded</option> <option value="downloaded">date downloaded</option>
</select> </select>
</p> </p>
<p>Hide watched videos <span class="settings-current">{{ hide_watched }}</span>
<select name="watched" id="watched" onchange="hideWatched(this.value)">
<option value="" disabled selected> -- change hide watched -- </option>
<option value="0">show watched videos</option>
<option value="1">hide watched videos</option>
</select>
</p>
</div> </div>
<div class="search-form icon-text"> <div class="search-form icon-text">
<div class="search-icon"> <div class="search-icon">
@ -31,9 +24,24 @@
</form> </form>
</div> </div>
</div> </div>
<div class="view-icons"> <div class="view-controls">
<div class="toggle">
<span>Hide watched videos:</span>
<div class="toggleBox">
<input
id="hide_watched" onclick="toggleCheckbox(this)" type="checkbox"
{% if hide_watched %}
checked
{% endif %}
>
<label for="" class="onbtn">On</label>
<label for="" class="ofbtn">Off</label>
</div>
</div>
<div class="view-icons">
<img src="{% static 'img/icon-gridview.svg' %}" onclick="changeView(this)" data-origin="home" data-value="grid" alt="grid view"> <img src="{% static 'img/icon-gridview.svg' %}" onclick="changeView(this)" data-origin="home" data-value="grid" alt="grid view">
<img src="{% static 'img/icon-listview.svg' %}" onclick="changeView(this)" data-origin="home" data-value="list" alt="list view"> <img src="{% static 'img/icon-listview.svg' %}" onclick="changeView(this)" data-origin="home" data-value="list" alt="list view">
</div>
</div> </div>
<div id="player" class="video-player"></div> <div id="player" class="video-player"></div>
<div class="video-list {{ view_style }}"> <div class="video-list {{ view_style }}">