profiles: "add jellyseerr" checkbox on profile creation

makes things clearer to new users. Fixes #438.
This commit is contained in:
Harvey Tindall
2025-11-28 20:37:45 +00:00
parent 0ecacc6064
commit cbff3085fa
7 changed files with 38 additions and 11 deletions

View File

@@ -199,6 +199,7 @@ export class ProfileEditor {
private _profileName = document.getElementById("add-profile-name") as HTMLInputElement;
private _userSelect = document.getElementById("add-profile-user") as HTMLSelectElement;
private _storeHomescreen = document.getElementById("add-profile-homescreen") as HTMLInputElement;
private _createJellyseerrProfile = window.jellyseerrEnabled ? document.getElementById("add-profile-jellyseerr") as HTMLInputElement : null;
get empty(): boolean { return (Object.keys(this._table.children).length == 0) }
set empty(state: boolean) {
@@ -439,6 +440,7 @@ export class ProfileEditor {
}
this._userSelect.innerHTML = innerHTML;
this._storeHomescreen.checked = true;
this._createJellyseerrProfile.checked = true;
window.modals.profiles.close();
window.modals.addProfile.show();
} else {
@@ -456,6 +458,7 @@ export class ProfileEditor {
"id": this._userSelect.value,
"name": this._profileName.value
}
if (this._createJellyseerrProfile) send["jellyseerr"] = this._createJellyseerrProfile.checked;
_post("/profiles", send, (req: XMLHttpRequest) => {
if (req.readyState == 4) {
toggleLoader(button);