diff options
Diffstat (limited to 'src/views/_sila/Fans/Static')
-rw-r--r-- | src/views/_sila/Fans/Static/FansStaticPage.vue | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/views/_sila/Fans/Static/FansStaticPage.vue b/src/views/_sila/Fans/Static/FansStaticPage.vue index dba6edb1..d92fb888 100644 --- a/src/views/_sila/Fans/Static/FansStaticPage.vue +++ b/src/views/_sila/Fans/Static/FansStaticPage.vue @@ -67,6 +67,14 @@ export default { computed: { fans() { + return this.rawFans.map((fan) => { + return { + type: this.getFanTypeByName(fan.name), + ...fan, + }; + }); + }, + rawFans() { return this.$store.getters['fan/fans']; }, }, @@ -78,5 +86,19 @@ export default { this.isBusy = false; }); }, + + methods: { + getFanTypeByName(name) { + switch (true) { + case name.includes('CPU'): + case name.includes('Pwm'): + return this.$t('pageFans.types.processors'); + case name.includes('System'): + return this.$t('pageFans.types.motherboard'); + default: + return null; + } + }, + }, }; </script> |