Drop telegram share button

This commit is contained in:
Sergio Brighenti 2020-11-12 22:50:18 +01:00
parent 6ddbc0fca3
commit 3ff9fb181c
3 changed files with 49 additions and 733 deletions

757
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -19,7 +19,6 @@
<div class="collapse navbar-collapse" id="navbarCollapse">
<div class="ml-auto">
<a href="javascript:void(0)" class="btn btn-success my-2 my-sm-0 btn-clipboard" data-toggle="tooltip" title="{{ lang('copy_link') }}" data-clipboard-text="{{ url }}{{ copy_url_behavior == 'raw' ? '/raw' }}"><i class="fas fa-link fa-lg fa-fw"></i></a>
<a href="javascript:void(0)" class="btn btn-info my-2 my-sm-0" data-toggle="tooltip" title="{{ lang('public.telegram') }}" onclick="$('#modalTelegramShare').modal('toggle')"><i class="fab fa-telegram-plane fa-lg fa-fw"></i></a>
<a href="{{ url }}/raw" class="btn btn-secondary my-2 my-sm-0" data-toggle="tooltip" title="{{ lang('raw') }}"><i class="fas fa-file-alt fa-lg fa-fw"></i></a>
<a href="{{ url }}/download" class="btn btn-warning my-2 my-sm-0" data-toggle="tooltip" title="{{ lang('download') }}"><i class="fas fa-cloud-download-alt fa-lg fa-fw"></i></a>
{% if session.get('logged') %}
@ -135,26 +134,5 @@
</div>
</div>
</div>
<div class="modal fade" id="modalTelegramShare" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content shadow-sm">
<div class="modal-header">
<h5 class="modal-title">{{ lang('public.telegram') }}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<textarea type="text" class="form-control mb-2" id="telegram-share-text" onclick="this.select()">{{ media.filename }}</textarea>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-info" id="telegram-share-button" onclick="app.telegramShare()" data-url="https://telegram.me/share/url?url={{ url }}&text=">
<i class="fab fa-telegram-plane fa-lg fa-fw"></i> {{ lang("send") }}
</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ lang('cancel') }}</button>
</div>
</div>
</div>
</div>
{% include 'comp/modal_delete.twig' %}
{% endblock %}

View file

@ -119,9 +119,6 @@ var app = {
});
$themes.unbind('mousedown');
},
telegramShare: function () {
window.open($('#telegram-share-button').data('url') + $('#telegram-share-text').val(), '_blank');
},
checkForUpdates: function () {
$('#checkForUpdatesMessage').empty().html('<i class="fas fa-spinner fa-pulse fa-3x"></i>');
$('#doUpgradeButton').prop('disabled', true);