Merge branch 'iv-org:master' into youtube-playlist-import

This commit is contained in:
Gavin
2023-04-03 17:09:34 -07:00
committed by GitHub
96 changed files with 1668 additions and 581 deletions

View File

@@ -39,6 +39,8 @@
<% end %>
</div>
<script src="/js/watched_indicator.js"></script>
<% if query %>
<%- query_encoded = URI.encode_www_form(query.text, space_to_plus: true) -%>
<div class="pure-g h-box">

View File

@@ -49,6 +49,8 @@
<% end %>
</div>
<script src="/js/watched_indicator.js"></script>
<div class="pure-g h-box">
<div class="pure-u-1 pure-u-md-4-5"></div>
<div class="pure-u-1 pure-u-lg-1-5" style="text-align:right">

View File

@@ -1,3 +1,5 @@
<% item_watched = !item.is_a?(SearchChannel | SearchPlaylist | InvidiousPlaylist | Category) && env.get?("user").try &.as(User).watched.index(item.id) != nil %>
<div class="pure-u-1 pure-u-md-1-4">
<div class="h-box">
<% case item when %>
@@ -40,6 +42,11 @@
<% if item.length_seconds != 0 %>
<p class="length"><%= recode_length_seconds(item.length_seconds) %></p>
<% end %>
<% if item_watched %>
<div class="watched-overlay"></div>
<div class="watched-indicator" data-length="<%= item.length_seconds %>" data-id="<%= item.id %>"></div>
<% end %>
</div>
<% end %>
<p dir="auto"><%= HTML.escape(item.title) %></p>
@@ -67,6 +74,11 @@
<% elsif item.length_seconds != 0 %>
<p class="length"><%= recode_length_seconds(item.length_seconds) %></p>
<% end %>
<% if item_watched %>
<div class="watched-overlay"></div>
<div class="watched-indicator" data-length="<%= item.length_seconds %>" data-id="<%= item.id %>"></div>
<% end %>
</div>
<% end %>
<p dir="auto"><%= HTML.escape(item.title) %></p>
@@ -124,6 +136,11 @@
<% elsif item.length_seconds != 0 %>
<p class="length"><%= recode_length_seconds(item.length_seconds) %></p>
<% end %>
<% if item_watched %>
<div class="watched-overlay"></div>
<div class="watched-indicator" data-length="<%= item.length_seconds %>" data-id="<%= item.id %>"></div>
<% end %>
</div>
<% end %>
<p dir="auto"><%= HTML.escape(item.title) %></p>

View File

@@ -62,6 +62,8 @@
<% end %>
</div>
<script src="/js/watched_indicator.js"></script>
<div class="pure-g h-box">
<div class="pure-u-1 pure-u-lg-1-5">
<% if page > 1 %>

View File

@@ -39,3 +39,5 @@
<%= rendered "components/item" %>
<% end %>
</div>
<script src="/js/watched_indicator.js"></script>

View File

@@ -16,3 +16,5 @@
<%= rendered "components/item" %>
<% end %>
</div>
<script src="/js/watched_indicator.js"></script>

View File

@@ -62,6 +62,8 @@
<% end %>
</div>
<script src="/js/watched_indicator.js"></script>
<div class="pure-g h-box">
<div class="pure-u-1 pure-u-lg-1-5">
<% if page > 1 %>

View File

@@ -45,3 +45,5 @@
<%= rendered "components/item" %>
<% end %>
</div>
<script src="/js/watched_indicator.js"></script>

View File

@@ -24,6 +24,8 @@
<%- end -%>
</div>
<script src="/js/watched_indicator.js"></script>
<div class="pure-g h-box">
<div class="pure-u-1 pure-u-lg-1-5">
<%- if page > 1 -%>

View File

@@ -106,6 +106,8 @@
<% end %>
</div>
<script src="/js/watched_indicator.js"></script>
<div class="pure-g h-box">
<div class="pure-u-1 pure-u-lg-1-5">
<% if page > 1 %>

View File

@@ -37,6 +37,8 @@
</div>
<%- end -%>
<script src="/js/watched_indicator.js"></script>
<div class="pure-g h-box">
<div class="pure-u-1 pure-u-lg-1-5">
<%- if query.page > 1 -%>

View File

@@ -181,7 +181,11 @@ we're going to need to do it here in order to allow for translations.
<% end %>
</p>
<% if video.license %>
<p id="license"><%= translate(locale, "License: ") %><%= video.license %></p>
<% if video.license.empty? %>
<p id="license"><%= translate(locale, "License: ") %><%= translate(locale, "Standard YouTube license") %></p>
<% else %>
<p id="license"><%= translate(locale, "License: ") %><%= video.license %></p>
<% end %>
<% end %>
<p id="family_friendly"><%= translate(locale, "Family friendly? ") %><%= translate_bool(locale, video.is_family_friendly) %></p>
<p id="wilson" style="display: none; visibility: hidden;"></p>
@@ -235,6 +239,28 @@ we're going to need to do it here in order to allow for translations.
<hr>
<% if !video.music.empty? %>
<input id="music-desc-expansion" type="checkbox"/>
<label for="music-desc-expansion">
<h3 id="music-description-title">
<%= translate(locale, "Music in this video") %>
<span class="icon ion-ios-arrow-up"></span>
<span class="icon ion-ios-arrow-down"></span>
</h3>
</label>
<div id="music-description-box">
<% video.music.each do |music| %>
<div class="music-item">
<p class="music-song"><%= translate(locale, "Song: ") %><%= music.song %></p>
<p class="music-artist"><%= translate(locale, "Artist: ") %><%= music.artist %></p>
<p class="music-album"><%= translate(locale, "Album: ") %><%= music.album %></p>
</div>
<% end %>
</div>
<hr>
<% end %>
<div id="comments">
<% if nojs %>
<%= comment_html %>