0
0
mirror of https://github.com/anthonyaxenov/iptv.git synced 2024-11-24 14:29:53 +00:00

Фикс подгрузки логотипа из кэша + косметика в подробностях

This commit is contained in:
Anthony Axenov 2024-09-25 11:56:17 +08:00
parent 70e25ded66
commit 1c57f58936
Signed by: anthony
GPG Key ID: EA9EC32FF7CCD4EC
2 changed files with 24 additions and 10 deletions

View File

@ -19,7 +19,7 @@ class ChannelLogo implements \Stringable
/** /**
* @var string|null Путь к файлу изображению на диске * @var string|null Путь к файлу изображению на диске
*/ */
protected ?string $path; protected ?string $path = '';
/** /**
* @var string|null MIME-тип изображения * @var string|null MIME-тип изображения

View File

@ -3,7 +3,13 @@
{% block title %}{{ name }} - {{ config('app.title') }}{% endblock %} {% block title %}{{ name }} - {{ config('app.title') }}{% endblock %}
{% block head %} {% block head %}
<style>.tvg-logo{max-width:100px;max-height:100px;background:white;padding:2px;border-radius:5px}.tvg-logo{background:unset}</style> <style>
img.tvg-logo{max-width:80px;max-height:80px;padding:2px;border-radius:5px}
tr.chrow td{padding:3px}
td.chindex{width:1%}
td.chlogo{width:100px}
div.chlist-table{max-height:550px}
</style>
{% endblock %} {% endblock %}
{% block header %} {% block header %}
@ -76,23 +82,31 @@
<h4>Список каналов ({{ content.channelCount ?? 0 }})</h4> <h4>Список каналов ({{ content.channelCount ?? 0 }})</h4>
{% if (content.channelCount > 0) %} {% if (content.channelCount > 0) %}
<div id="chlist"> <div id="chlist">
<input type="text" class="form-control form-control-sm bg-dark text-light mb-2 fuzzy-search" placeholder="Поиск..."> <input type="text"
<div class="overflow-auto" style="max-height:550px"> class="form-control form-control-sm bg-dark text-light mb-2 fuzzy-search"
placeholder="Поиск..."
/>
<div class="chlist-table overflow-auto">
<table class="table table-dark table-hover small"> <table class="table table-dark table-hover small">
<tbody class="list"> <tbody class="list">
{% for channel in content.channels %} {% for channel in content.channels %}
<tr class="chrow"> <tr class="chrow">
<td class="p-1" class="chindex">{{ loop.index }}</td> <td class="chindex">{{ loop.index }}</td>
<td class="p-1"> <td class="chlogo text-center">
<img class="tvg-logo"
{% if (channel.logo.base64) %} {% if (channel.logo.base64) %}
<img class="tvg-logo yes" src="{{ channel.logo.base64 }}" /> src="{{ channel.logo.base64 }}"
{% elseif (channel.attributes['tvg-logo']) %} {% elseif (channel.attributes['tvg-logo']) %}
<img loading="lazy" class="tvg-logo" src="{{ base_url('logo?url=' ~ channel.attributes['tvg-logo']) }}" /> src="{{ base_url('logo?url=' ~ channel.attributes['tvg-logo']) }}"
loading="lazy"
{% else %} {% else %}
<img class="tvg-logo.empty" src="{{ base_url('no-tvg-logo.png') }}"/> src="{{ base_url('no-tvg-logo.png') }}"
{% endif %} {% endif %}
alt="Логотип канала '{{ channel.name }}'"
title="Логотип канала '{{ channel.name }}'"
/>
</td> </td>
<td class="p-1 chname">{{ channel.name }}</td> <td class="chname">{{ channel.name }}</td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>