Compare commits

...

3 Commits

Author SHA1 Message Date
988ecd11d2 show max connection next to stream url 2025-07-15 17:54:42 +01:00
260e330f9a reload on refresh 2025-07-15 17:22:23 +01:00
cf2c004958 update expiry 2025-07-15 16:56:43 +01:00

View File

@ -44,11 +44,11 @@
<!-- <td>{{ loop.index }}</td> --> <!-- <td>{{ loop.index }}</td> -->
<td>{{ account.username }}</td> <td>{{ account.username }}</td>
<td>{{ account.stream }}</td> <td>{{ account.stream }}</td>
<td><a href="{{ account.streamURL }}" target="_blank">{{ account.streamURL }}</a></td> <td><a href="{{ account.streamURL }}" target="_blank">{{ account.streamURL }}</a> ({{ account.maxConnections }})</td>
<td>{{ account.expiaryDate_rendered }}</td> <td>{{ account.expiaryDate_rendered }}</td>
<td>{{ account.password }}</td> <td>{{ account.password }}</td>
<td> <td>
<button type="button" class="btn btn-info btn-validate" data-username="{{ account.username }}" data-password="{{ account.password }}" data-stream="{{ account.stream }}" style="margin-right: 5px;"> <button type="button" class="btn btn-info btn-validate" data-username="{{ account.username }}" data-password="{{ account.password }}" data-stream="{{ account.stream }}" data-expiry-date="{{ account.expiaryDate }}" data-max-connections="{{ account.maxConnections }}" style="margin-right: 5px;">
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true" style="display: none;"></span> <span class="spinner-border spinner-border-sm" role="status" aria-hidden="true" style="display: none;"></span>
<span class="button-text">Validate</span> <span class="button-text">Validate</span>
</button> </button>
@ -101,6 +101,8 @@
var username = button.data('username'); var username = button.data('username');
var password = button.data('password'); var password = button.data('password');
var stream = button.data('stream'); var stream = button.data('stream');
var expiryDate = button.data('expiry-date');
var maxConnections = button.data('max-connections');
spinner.show(); spinner.show();
buttonText.hide(); buttonText.hide();
@ -113,18 +115,24 @@
data: JSON.stringify({ data: JSON.stringify({
username: username, username: username,
password: password, password: password,
stream: stream stream: stream,
expiry_date: expiryDate,
max_connections: maxConnections
}), }),
success: function(response) { success: function(response) {
spinner.hide(); if (response.message === 'Account is valid and updated') {
buttonText.show(); location.reload();
button.prop('disabled', false); } else {
button.removeClass('btn-info').addClass('btn-success'); spinner.hide();
buttonText.text('Valid'); buttonText.show();
setTimeout(function() { button.prop('disabled', false);
button.removeClass('btn-success').addClass('btn-info'); button.removeClass('btn-info').addClass('btn-success');
buttonText.text('Validate'); buttonText.text('Valid');
}, 3000); setTimeout(function() {
button.removeClass('btn-success').addClass('btn-info');
buttonText.text('Validate');
}, 3000);
}
}, },
error: function(xhr, status, error) { error: function(xhr, status, error) {
spinner.hide(); spinner.hide();