100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
Hide sort language from rule-list when 1 language
Robin Dekkersbe8510df6c98
diff --git a/ui/component/or-rules/src/or-rule-list.ts b/ui/component/or-rules/src/or-rule-list.tsindex d15ff1cfc..2511bda3f 100644--- a/ui/component/or-rules/src/or-rule-list.ts+++ b/ui/component/or-rules/src/or-rule-list.ts@@ -204,6 +204,9 @@ export class OrRuleList extends translate(i18next)(LitElement) {}const allowedLanguages = this._allowedLanguages;+ const sortOptions = ["name", "createdOn"]+ if (allowedLanguages && allowedLanguages.length > 1) sortOptions.push("lang")+let addTemplate: TemplateResult | string = ``;if (!this._isReadonly()) {@@ -234,7 +237,7 @@ export class OrRuleList extends translate(i18next)(LitElement) {${getContentWithMenuTemplate(html`<or-input type="${InputType.BUTTON}" icon="sort-variant"></or-input>`,- ["name", "createdOn", "lang"].map((sort) => { return { value: sort, text: i18next.t(sort) } as MenuItem; }),+ sortOptions.map((sort) => { return { value: sort, text: i18next.t(sort) } as MenuItem; }),this.sortBy,(v) => this._onSortClicked(v as string))}</div>diff --git a/ui/component/or-survey/src/index.ts b/ui/component/or-survey/src/index.tsindex 033d9405e..ab087d9fb 100644--- a/ui/component/or-survey/src/index.ts+++ b/ui/component/or-survey/src/index.ts@@ -268,6 +268,9 @@ class OrSurvey extends LitElement {return;}+ this.questions.sort((a, b) => a.attributes && b.attributes ? a.attributes.order.value - b.attributes.order.value : 0);+ this.questions = [...this.questions];+if (this.questionIndex > 0) {this.previousButton = true;this.nextButton = true;diff --git a/ui/keycloak/themes/openremote/openremote b/ui/keycloak/themes/openremote/openremotenew file mode 120000index 000000000..d7d87897c--- /dev/null+++ b/ui/keycloak/themes/openremote/openremote@@ -0,0 +1 @@+/deployment/keycloak/themes/openremote\ No newline at end of file