mirror of
https://github.com/iv-org/invidious.git
synced 2026-07-07 14:16:45 -05:00
Move error message and action links before video title
Error reason, subreason, and 'After which you should try to' links now appear above the <h1> title, making them the first thing users see when a video fails to play.
This commit is contained in:
parent
9ae7bb4ff6
commit
c3f16be5c4
@ -34,15 +34,11 @@
|
|||||||
<% if video.reason.nil? %>
|
<% if video.reason.nil? %>
|
||||||
<%= rendered "components/player" %>
|
<%= rendered "components/player" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div id="player-container" class="h-box">
|
<p>
|
||||||
<div style="display:flex;align-items:center;justify-content:center;background-color:#000;width:100%;aspect-ratio:16/9">
|
<%= I18n.translate(preferences.locale, "error_from_youtube_unplayable") %>
|
||||||
<p style="color:#fff;font-size:1.2em;text-align:center">
|
|
||||||
<%= I18n.translate(preferences.locale, "error_from_youtube_unplayable") %><br/>
|
|
||||||
<strong><%= video.reason %></strong>
|
<strong><%= video.reason %></strong>
|
||||||
<% if video.subreason %><br/><%= video.subreason %><% end %>
|
<% if video.subreason %><br/><%= video.subreason %><% end %>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<script src="/js/embed.js?v=<%= ASSET_COMMIT %>"></script>
|
<script src="/js/embed.js?v=<%= ASSET_COMMIT %>"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@ -75,19 +75,18 @@ we're going to need to do it here in order to allow for translations.
|
|||||||
<div id="player-container" class="h-box">
|
<div id="player-container" class="h-box">
|
||||||
<%= rendered "components/player" %>
|
<%= rendered "components/player" %>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
|
||||||
<div class="h-box">
|
|
||||||
<div style="display:flex;align-items:center;justify-content:center;background-color:#000;width:100%;aspect-ratio:16/9">
|
|
||||||
<p style="color:#fff;font-size:1.2em;text-align:center">
|
|
||||||
<%= I18n.translate(locale, "error_from_youtube_unplayable") %><br/>
|
|
||||||
<strong><%= video.reason %></strong>
|
|
||||||
<% if video.subreason %><br/><%= video.subreason %><% end %>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="h-box">
|
<div class="h-box">
|
||||||
|
<% if video.reason %>
|
||||||
|
<h3>
|
||||||
|
<%= I18n.translate(locale, "error_from_youtube_unplayable") %> <%= video.reason %>
|
||||||
|
</h3>
|
||||||
|
<% if video.subreason %>
|
||||||
|
<p><%= video.subreason %></p>
|
||||||
|
<% end %>
|
||||||
|
<%= error_redirect_helper(env) %>
|
||||||
|
<% end %>
|
||||||
<h1>
|
<h1>
|
||||||
<%= title %>
|
<%= title %>
|
||||||
<% if params.listen %>
|
<% if params.listen %>
|
||||||
@ -107,9 +106,7 @@ we're going to need to do it here in order to allow for translations.
|
|||||||
</h3>
|
</h3>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if video.reason %>
|
<% if video.premiere_timestamp.try &.> Time.utc %>
|
||||||
<%= error_redirect_helper(env) %>
|
|
||||||
<% elsif video.premiere_timestamp.try &.> Time.utc %>
|
|
||||||
<h3>
|
<h3>
|
||||||
<%= video.premiere_timestamp.try { |t| I18n.translate(locale, "Premieres in `x`", recode_date((t - Time.utc).ago, locale)) } %>
|
<%= video.premiere_timestamp.try { |t| I18n.translate(locale, "Premieres in `x`", recode_date((t - Time.utc).ago, locale)) } %>
|
||||||
</h3>
|
</h3>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user