diff --git a/Thermo.Active/wwwroot/assets/styles/base/paddle.less b/Thermo.Active/wwwroot/assets/styles/base/paddle.less index 71720491..636f3ec0 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/paddle.less +++ b/Thermo.Active/wwwroot/assets/styles/base/paddle.less @@ -75,6 +75,7 @@ display: grid; grid-template-rows: 50px 1fr 50px; padding: 1rem; + position: relative; header { display: flex; diff --git a/Thermo.Active/wwwroot/assets/styles/style.css b/Thermo.Active/wwwroot/assets/styles/style.css index 7b5f1bd0..85dee545 100644 --- a/Thermo.Active/wwwroot/assets/styles/style.css +++ b/Thermo.Active/wwwroot/assets/styles/style.css @@ -4812,6 +4812,7 @@ article .box .body { display: grid; grid-template-rows: 50px 1fr 50px; padding: 1rem; + position: relative; } .paddle section header { display: flex; diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/paddle.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/paddle.ts index 5bfbda3c..c17d48f9 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/paddle.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/paddle.ts @@ -32,7 +32,7 @@ export default class Paddle extends Vue { return this.softKeys[id]; } - get allSoftKeys() { + get allSoftKeys(): SoftKeysConfigurationModel[] { var result = []; for (const key in this.softKeys) { const element = this.softKeys[key]; @@ -45,8 +45,12 @@ export default class Paddle extends Vue { return store.state.machineInfo.softkeysFavorites; } - getSoftKeyById(id: number) { - return machineInfoStore.getters.getSoftkey(id); + get Favourites(): SoftKeysConfigurationModel[] { + return this.favourites.map(i => this.getSoftKeyById(i) as SoftKeysConfigurationModel) + } + + getSoftKeyById(id: number): SoftKeysConfigurationModel { + return this.allSoftKeys.find(i => i.id == id); } isFavourite(id: number) { @@ -81,13 +85,11 @@ export default class Paddle extends Vue { } getSoftKeyStatus(id) { - var sk = this.$store.getters.getSoftKeyStatus(id); - if (sk) - return sk.value; - return false; + return this.$store.getters.getSoftKeyStatus(id); } async toggleFavourite(id: number, add: boolean) { + if (add) await dataService.AddUserSoftkeyFavorite(id) else diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/paddle.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/paddle.vue index 928db334..93739101 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/paddle.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/paddle.vue @@ -12,18 +12,21 @@
{{'preferred-softkeys' | localize("Soft Keys")}}
- +
+
{{'preferred-softkeys' | localize("Tutte")}}
- +
- -