26 lines
1.9 KiB
JavaScript
26 lines
1.9 KiB
JavaScript
module.exports = function (minified) {
|
|
var clayConfig = this;
|
|
var _ = minified._;
|
|
var $ = minified.$;
|
|
var HTML = minified.HTML;
|
|
|
|
function toggleHelptext() {
|
|
if (this.get()) {
|
|
clayConfig.getItemById('helptext_host').set("Examples:<br>https://jellyfin.example.com<br>http://192.168.1.10:8096");
|
|
clayConfig.getItemById('helptext_api_key').set("1. Log into Jellyfin web UI as an admin<br>2. Go to your \"Dashboard\"<br>3. Select \"API Keys\" from the left menu<br>4. Create a key with \"New API Key\"; name it whatever you like and enter the key (not the name) in this box<br><br>The key will look like this:<br>d7f4c2e8a4b3444bb5d6b685fa5918b6");
|
|
clayConfig.getItemById('helptext_user').set("Enter Jellyfin username to track;<br>this is used in case multiple users were active when you fell asleep")
|
|
} else {
|
|
clayConfig.getItemById('helptext_host').set("IMPORTANT:<br>Plex support requires installing Tautulli alongside Plex.<br>Enter the URL to your Tautulli instance, not Plex itself.<br><br>Examples:<br>https://tautulli.example.com<br>http://192.168.1.10:8181");
|
|
clayConfig.getItemById('helptext_api_key').set("1. Log into your Tautulli web UI (after initial configuration)<br>2. Go to settings<br>3. Select \"Web Interface\" from the left menu<br>4. At the bottom, ensure \"Enable API\" is checked<br>5. Reveal your API key; this is what goes in this box<br><br>The key will look like this:<br>9cb7053181cf4c8d807640f8c6a93b20");
|
|
clayConfig.getItemById('helptext_user').set("Enter Plex username to track;<br>this is used in case multiple users were active when you fell asleep")
|
|
}
|
|
}
|
|
|
|
clayConfig.on(clayConfig.EVENTS.AFTER_BUILD, function () {
|
|
var jellyfinToggle = clayConfig.getItemByMessageKey('CLAY_API_IS_JELLYFIN');
|
|
toggleHelptext.call(jellyfinToggle);
|
|
jellyfinToggle.on('change', toggleHelptext);
|
|
});
|
|
|
|
};
|