Show different help text for each platform (Jellyfin vs Plex)

This commit is contained in:
2026-04-09 23:43:03 -04:00
parent fd9ec48511
commit 4e6bab254a
4 changed files with 87 additions and 16 deletions

25
src/pkjs/customClay.js Normal file
View File

@@ -0,0 +1,25 @@
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 web UI as admin<br>2. Go to your \"Dashboard\"<br>4. Select \"API Keys\" from the left menu<br>5. Create a key with \"New API Key\"; name it whatever you like and enter the key (not the name) in this box<br><br>They 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("Examples:<br>https://plex.example.com<br>http://192.168.1.10:8096");
clayConfig.getItemById('helptext_api_key').set("TODO Plex help");
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);
});
};