mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Add new custom notification text options (WIP).
In settings check if debug logging is enabled for IP logging, if not warn and disable checkbox. Only show video items in user recently watched. Adjust styling on edit user modal. Moar Arnie.
This commit is contained in:
parent
88520d488c
commit
eb2b530718
8 changed files with 397 additions and 54 deletions
|
@ -8438,3 +8438,89 @@ ol.test >li {
|
|||
.stacked-configs > li > span > input[type='checkbox'] {
|
||||
|
||||
}
|
||||
|
||||
.accordion {
|
||||
width: 100%;
|
||||
max-width: 900px;
|
||||
margin: 0px 0px 20px 0px;
|
||||
background: #282828;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.accordion .link {
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
padding: 8px 20px 8px 30px;
|
||||
color: #999;
|
||||
border-bottom: 1px solid #2d2d2d;
|
||||
position: relative;
|
||||
-webkit-transition: all 0.4s ease;
|
||||
-o-transition: all 0.4s ease;
|
||||
transition: all 0.4s ease;
|
||||
}
|
||||
|
||||
.accordion li:last-child .link { border-bottom: 0; }
|
||||
|
||||
.accordion li i {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
color: #999;
|
||||
-webkit-transition: all 0.4s ease;
|
||||
-o-transition: all 0.4s ease;
|
||||
transition: all 0.4s ease;
|
||||
}
|
||||
|
||||
.accordion li i.fa-chevron-down {
|
||||
right: 12px;
|
||||
left: auto;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.accordion li .link:hover {
|
||||
color: #FFF;
|
||||
background: #2f2f2f;
|
||||
}
|
||||
|
||||
.accordion li.open .link { color: #eb8600; }
|
||||
|
||||
.accordion li.open i { color: #eb8600; }
|
||||
|
||||
.accordion li.open i.fa-chevron-down {
|
||||
-webkit-transform: rotate(180deg);
|
||||
-ms-transform: rotate(180deg);
|
||||
-o-transform: rotate(180deg);
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Submenu
|
||||
-----------------------------*/
|
||||
|
||||
|
||||
.submenu {
|
||||
display: none;
|
||||
background: #2d2d2d;
|
||||
list-style: none;
|
||||
margin: 0px;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.submenu li {
|
||||
border-bottom: 1px solid #2f2f2f;
|
||||
}
|
||||
|
||||
.submenu a {
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
color: #d9d9d9;
|
||||
padding: 12px;
|
||||
-webkit-transition: all 0.25s ease;
|
||||
-o-transition: all 0.25s ease;
|
||||
transition: all 0.25s ease;
|
||||
}
|
||||
|
||||
.submenu a:hover {
|
||||
background: #eb8600;
|
||||
color: #FFF;
|
||||
}
|
|
@ -24,7 +24,7 @@ DOCUMENTATION :: END
|
|||
<h3>Edit user <strong>${data['user']}</strong></h3>
|
||||
</div>
|
||||
<div class="modal-body" id="modal-text">
|
||||
<div class="card-back">
|
||||
<fieldset>
|
||||
<div class="form-group">
|
||||
<label for="friendly_name">Friendly Name</label>
|
||||
<input type="text" id="friendly_name" name="friendly_name" value="${data['friendly_name']}" size="30">
|
||||
|
@ -34,7 +34,7 @@ DOCUMENTATION :: END
|
|||
<input type="checkbox" id="do_notify" name="do_notify" value="1" ${data['do_notify']}> Enable notifications
|
||||
<p class="help-block">Uncheck this if you do not want to receive notifications for this user's activity.</p>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div>
|
||||
|
|
|
@ -324,4 +324,27 @@ function getCookie(cname) {
|
|||
if (c.indexOf(name) == 0) return c.substring(name.length,c.length);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
var Accordion = function(el, multiple) {
|
||||
this.el = el || {};
|
||||
this.multiple = multiple || false;
|
||||
|
||||
// Variables privadas
|
||||
var links = this.el.find('.link');
|
||||
// Evento
|
||||
links.on('click', {el: this.el, multiple: this.multiple}, this.dropdown)
|
||||
}
|
||||
|
||||
Accordion.prototype.dropdown = function(e) {
|
||||
var $el = e.data.el;
|
||||
$this = $(this),
|
||||
$next = $this.next();
|
||||
|
||||
$next.slideToggle();
|
||||
$this.parent().toggleClass('open');
|
||||
|
||||
if (!e.data.multiple) {
|
||||
$el.find('.submenu').not($next).slideUp().parent().removeClass('open');
|
||||
};
|
||||
}
|
||||
|
|
|
@ -265,8 +265,9 @@
|
|||
</div>
|
||||
<div class="checkbox">
|
||||
<input type="checkbox" id="ip_logging_enable" name="ip_logging_enable" value="1" ${config['ip_logging_enable']}> Enable IP Logging
|
||||
<span id="debugLogCheck" style="color: red; padding-left: 10px;"></span>
|
||||
<p class="help-block">
|
||||
Enable this to attempt to log the IP address of the user. Debug logging must be enabled and your log folder must be set in the PlexPy settings.
|
||||
Enable this to attempt to log the IP address of the user.
|
||||
</p>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
@ -294,6 +295,70 @@
|
|||
<p class="help-block">Set the progress percentage of when a watched notification should be triggered. Minimum 50, Maximum 95.</p>
|
||||
</div>
|
||||
</fieldset>
|
||||
<br/>
|
||||
<fieldset>
|
||||
<div class="wellheader">
|
||||
<h3>Custom Notification Messages</h3>
|
||||
</div>
|
||||
<p class="help-block">
|
||||
You can set custom formatted text for each type of notification.
|
||||
Click <a href="#notify-text-sub-modal" data-toggle="modal">here</a> for a list of available parameters which can be used.
|
||||
</p>
|
||||
<br/>
|
||||
<ul id="accordion" class="accordion">
|
||||
<li>
|
||||
<div class="link"><i class="fa fa-play"></i>Playback Start<i class="fa fa-chevron-down"></i></div>
|
||||
<ul class="submenu">
|
||||
<li>
|
||||
<div class="form-group">
|
||||
<label for="notify_on_start_subject_text">Subject Line</label>
|
||||
<input class="input-xxlarge" type="text" id="notify_on_start_subject_text" name="notify_on_start_subject_text" value="${config['notify_on_start_subject_text']}" data-parsley-trigger="change" required>
|
||||
<p class="help-block">Set a custom subject line.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="notify_on_start_body_text">Message Body</label>
|
||||
<input class="input-xxlarge" type="text" id="notify_on_start_body_text" name="notify_on_start_body_text" value="${config['notify_on_start_body_text']}" data-parsley-trigger="change" required>
|
||||
<p class="help-block">Set a custom body.</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<div class="link"><i class="fa fa-stop"></i>Playback Stop<i class="fa fa-chevron-down"></i></div>
|
||||
<ul class="submenu">
|
||||
<li>
|
||||
<div class="form-group">
|
||||
<label for="notify_on_stop_subject_text">Subject Line</label>
|
||||
<input class="input-xxlarge" type="text" id="notify_on_stop_subject_text" name="notify_on_stop_subject_text" value="${config['notify_on_stop_subject_text']}" data-parsley-trigger="change" required>
|
||||
<p class="help-block">Set a custom subject line.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="notify_on_stop_body_text">Message Body</label>
|
||||
<input class="input-xxlarge" type="text" id="notify_on_stop_body_text" name="notify_on_stop_body_text" value="${config['notify_on_stop_body_text']}" data-parsley-trigger="change" required>
|
||||
<p class="help-block">Set a custom body.</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<div class="link"><i class="fa fa-eye"></i>Watched<i class="fa fa-chevron-down"></i></div>
|
||||
<ul class="submenu">
|
||||
<li>
|
||||
<div class="form-group">
|
||||
<label for="notify_on_watched_subject_text">Subject Line</label>
|
||||
<input class="input-xxlarge" type="text" id="notify_on_watched_subject_text" name="notify_on_watched_subject_text" value="${config['notify_on_watched_subject_text']}" data-parsley-trigger="change" required>
|
||||
<p class="help-block">Set a custom subject line.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="notify_on_watched_body_text">Message Body</label>
|
||||
<input class="input-xxlarge" type="text" id="notify_on_watched_body_text" name="notify_on_watched_body_text" value="${config['notify_on_watched_body_text']}" data-parsley-trigger="change" required>
|
||||
<p class="help-block">Set a custom body.</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<input type="button" class="rounded rounded-primary save-button" value="Save" data-success="Changes saved successfully">
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="tabs-9">
|
||||
|
@ -493,6 +558,51 @@
|
|||
<div id="notification-config-modal" class="modal hide fade" tabindex="-1" role="dialog"
|
||||
aria-labelledby="notification-setting-modal" aria-hidden="true">
|
||||
</div>
|
||||
<div id="notify-text-sub-modal" class="modal hide fade" tabindex="-1" role="dialog"
|
||||
aria-labelledby="notify-text-sub-modal" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i
|
||||
class="fa fa-remove"></i></button>
|
||||
<h3>Notification string substitutions</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="150"><strong>{user}</strong></td>
|
||||
<td>The username of the person streaming.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150"><strong>{server_name}</strong></td>
|
||||
<td>The name of your Plex Server.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150"><strong>{player}</strong></td>
|
||||
<td>The name of the device being used for playback.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150"><strong>{platform}</strong></td>
|
||||
<td>The type of client being used for playback.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150"><strong>{title}</strong></td>
|
||||
<td>The title of the item being played back.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150"><strong>{transcode_decision}</strong></td>
|
||||
<td>Returns the transcode decisions for the media item.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">More options will be added soon.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -502,7 +612,7 @@
|
|||
<%def name="javascriptIncludes()">
|
||||
<script src="interfaces/default/js/parsley.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(document).ready(function() {
|
||||
|
||||
var configForm = $("#configUpdate");
|
||||
$('.save-button').click(function() {
|
||||
|
@ -770,6 +880,20 @@
|
|||
$.get("/osxnotifyregister", {'app': osx_notify_app}, function (data) { $('#ajaxMsg').html("<div class='msg'><span class='ui-icon ui-icon-check'></span>"+data+"</div>"); });
|
||||
$('#ajaxMsg').addClass('success').fadeIn().delay(3000).fadeOut()
|
||||
})
|
||||
|
||||
$.ajax({
|
||||
url: 'get_server_pref',
|
||||
data: { pref: 'logDebug' },
|
||||
async: true,
|
||||
success: function(data) {
|
||||
if (data !== 'true') {
|
||||
$("#debugLogCheck").html("Debug logging must be enabled on your Plex Server. <a target='_blank' href='https://support.plex.tv/hc/en-us/articles/201643703-Reporting-issues-with-Plex-Media-Server'> More..</a>");
|
||||
$("#ip_logging_enable").attr("disabled", true);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var accordion = new Accordion($('#accordion'), false);
|
||||
});
|
||||
</script>
|
||||
</%def>
|
Loading…
Add table
Add a link
Reference in a new issue