diff options
author | Vitalii Lysak <v.lysak@dunice.net> | 2022-08-09 13:56:56 +0300 |
---|---|---|
committer | Vitalii Lysak <v.lysak@dunice.net> | 2022-08-09 13:56:56 +0300 |
commit | 5fff754d48ec658673c11f8e593d3af4f94d79df (patch) | |
tree | 069e08fa990e004cdddd262fb5f632d806aa3887 /src/views/_sila | |
parent | ebb64e0052f55ccdb403c4484f9a3a365ffd283f (diff) | |
download | webui-vue-5fff754d48ec658673c11f8e593d3af4f94d79df.tar.xz |
fx type fields for fans, static
Diffstat (limited to 'src/views/_sila')
-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> |