Fix settings page compatibility and add debug access
This commit is contained in:
@@ -39,6 +39,18 @@
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="ml-section">
|
||||
<legend>Debug</legend>
|
||||
<div class="inputContainer">
|
||||
<label class="inputLabel inputLabelUnfocused" for="ml-debug-item-id">Jellyfin item ID</label>
|
||||
<input id="ml-debug-item-id" type="text" class="emby-input ml-input" placeholder="32-character item ID">
|
||||
</div>
|
||||
<div class="ml-actions">
|
||||
<button id="ml-debug-open" is="emby-button" type="button" class="raised"><span>Open debug view</span></button>
|
||||
</div>
|
||||
<div class="fieldDescription">Shows how your classification and translation rules resolve for this item.</div>
|
||||
</fieldset>
|
||||
|
||||
<button id="ml-save-user" is="emby-button" type="submit" class="raised button-submit"><span>Save</span></button>
|
||||
<button id="ml-reset-user" is="emby-button" type="button" class="raised"><span>Reload</span></button>
|
||||
</form>
|
||||
@@ -1264,6 +1276,14 @@
|
||||
state.rules.SortLocale = $("ml-sort-locale").value || "Auto";
|
||||
renderSortLocaleAutoText();
|
||||
});
|
||||
$("ml-debug-open").addEventListener("click", function () {
|
||||
var itemId = $("ml-debug-item-id").value.trim();
|
||||
if (!itemId) {
|
||||
M.setStatus(status, "Enter a Jellyfin item ID.", true);
|
||||
return;
|
||||
}
|
||||
window.open(M.debugUrl(itemId), "_blank", "noopener");
|
||||
});
|
||||
$("ml-user-export").addEventListener("click", function () {
|
||||
downloadUserExport().catch(function (err) { M.setStatus(status, String(err), true); });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user