diff --git a/html/admin.html b/html/admin.html
index 3c7ae1b..48818a9 100644
--- a/html/admin.html
+++ b/html/admin.html
@@ -645,7 +645,7 @@
-
+
@@ -708,6 +708,14 @@
+
+
+ {{ .strings.noResultsFound }}
+
+
+
@@ -729,11 +737,25 @@
-
+
+
+
+ {{ .strings.noResultsFound }}
+ {{ .strings.settingsMaybeUnderAdvanced }}
+
+
+
+
diff --git a/lang/admin/en-us.json b/lang/admin/en-us.json
index e22efe8..32f473f 100644
--- a/lang/admin/en-us.json
+++ b/lang/admin/en-us.json
@@ -55,6 +55,7 @@
"donate": "Donate",
"unlink": "Unlink Account",
"sendPWR": "Send Password Reset",
+ "noResultsFound": "No Results Found",
"contactThrough": "Contact through:",
"extendExpiry": "Extend expiry",
"sendPWRManual": "User {n} has no method of contact, press copy to get a link to send to them.",
@@ -83,6 +84,10 @@
"settingsRefreshPage": "Refresh the page in a few seconds.",
"settingsRequiredOrRestartMessage": "Note: {n} indicates a required field, {n} indicates changes require a restart.",
"settingsSave": "Save",
+ "settingsHiddenDependency": "Matching settings are hidden because they depend on the value of another setting:",
+ "settingsDependsOn": "{setting}: Depends on {dependency}",
+ "settingsAdvancedMode": "{setting}: Advanced Settings must be enabled",
+ "settingsMaybeUnderAdvanced": "Tip: You might find what you're looking for by enabling Advanced Settings.",
"ombiProfile": "Ombi user profile",
"ombiUserDefaultsDescription": "Create an Ombi user and configure it, then select it below. It's settings/permissions will be stored and applied to new Ombi users created by jfa-go when this profile is selected.",
"userProfiles": "User Profiles",
@@ -122,7 +127,7 @@
"jellyfinID": "Jellyfin ID",
"userPageLogin": "User Page: Login",
"userPagePage": "User Page: Page",
- "buildTime": "Build Time",
+ "buildTime": "Build Time",
"builtBy": "Built By",
"loginNotAdmin": "Not an Admin?"
},
diff --git a/ts/modules/accounts.ts b/ts/modules/accounts.ts
index f4ca0b0..34595ad 100644
--- a/ts/modules/accounts.ts
+++ b/ts/modules/accounts.ts
@@ -946,6 +946,8 @@ export class accountsList {
}
}
+ private _notFoundPanel: HTMLElement = document.getElementById("accounts-not-found");
+
search = (query: String): string[] => {
console.log(this._queries);
this._filterArea.textContent = "";
@@ -2021,17 +2023,25 @@ export class accountsList {
this._inSearch = true;
// this.setVisibility(this.search(query), true);
}
- this.setVisibility(this.search(query), true);
+ const results = this.search(query);
+ this.setVisibility(results, true);
this._checkCheckCount();
this.showHideSearchOptionsHeader();
+ if (results.length == 0) {
+ this._notFoundPanel.classList.remove("unfocused");
+ } else {
+ this._notFoundPanel.classList.add("unfocused");
+ }
};
this._search.oninput = onchange;
- const clearSearchButton = document.getElementById("accounts-search-clear") as HTMLSpanElement;
- clearSearchButton.addEventListener("click", () => {
- this._search.value = "";
- onchange();
- });
+ const clearSearchButtons = Array.from(document.getElementsByClassName("accounts-search-clear")) as Array;
+ for (let b of clearSearchButtons) {
+ b.addEventListener("click", () => {
+ this._search.value = "";
+ onchange();
+ });
+ }
this._announceTextarea.onkeyup = this.loadPreview;
addDiscord = newDiscordSearch(window.lang.strings("linkDiscord"), window.lang.strings("searchDiscordUser"), window.lang.strings("add"), (user: DiscordUser, id: string) => {
@@ -2084,8 +2094,15 @@ export class accountsList {
// console.log("ordering by", event.detail, ": ", this._ordering);
if (!(this._inSearch)) {
this.setVisibility(this._ordering, true);
+ this._notFoundPanel.classList.add("unfocused");
} else {
- this.setVisibility(this.search(this._search.value), true);
+ const results = this.search(this._search.value);
+ this.setVisibility(results, true);
+ if (results.length == 0) {
+ this._notFoundPanel.classList.remove("unfocused");
+ } else {
+ this._notFoundPanel.classList.add("unfocused");
+ }
}
this.showHideSearchOptionsHeader();
});
@@ -2195,8 +2212,15 @@ export class accountsList {
this._ordering = this._columns[this._activeSortColumn].sort(this._users);
if (!(this._inSearch)) {
this.setVisibility(this._ordering, true);
+ this._notFoundPanel.classList.add("unfocused");
} else {
- this.setVisibility(this.search(this._search.value), true);
+ const results = this.search(this._search.value);
+ if (results.length == 0) {
+ this._notFoundPanel.classList.remove("unfocused");
+ } else {
+ this._notFoundPanel.classList.add("unfocused");
+ }
+ this.setVisibility(results, true);
}
this._checkCheckCount();
}
diff --git a/ts/modules/settings.ts b/ts/modules/settings.ts
index 3179e71..045d3a3 100644
--- a/ts/modules/settings.ts
+++ b/ts/modules/settings.ts
@@ -102,6 +102,7 @@ class DOMInput {
constructor(inputType: string, setting: Setting, section: string, name: string) {
this._container = document.createElement("div");
this._container.classList.add("setting");
+ this._container.setAttribute("data-name", name)
this._container.innerHTML = `