Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
icon
Browse files Browse the repository at this point in the history
  • Loading branch information
ruihe774 committed Jan 3, 2024
1 parent 29c3827 commit f0d55a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/components/FeatureSlider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import monitorManager from "../monitor";
import sheet from "../style.module.sass";
import settings from "../settings";
const iconMap = {
const iconMap: { [key: string]: string } = {
luminance: "\uE706",
contrast: "\uE793",
brightness: "\uE7E8",
brightness: "\uE706",
volume: "\uE767",
powerstate: "\uE7E8",
};
Expand Down Expand Up @@ -47,7 +47,7 @@ export default defineComponent({
return this.feature.value.maximum;
},
icon() {
return (iconMap as { [key: string]: string })[this.featureName];
return iconMap[this.featureName];
},
update() {
const { updateInterval } = settings;
Expand Down
5 changes: 4 additions & 1 deletion src/components/MonitorItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ export default defineComponent({
return void 0;
}
},
icon() {
return this.monitor.features[0]?.value.source == "wmi" ? "\ue7f8" : "\ue7f4";
},
},
methods: {
handlePowerOff() {
Expand All @@ -53,7 +56,7 @@ export default defineComponent({
:class="[sheet.horizontalFlex, sheet.spreadContent, sheet.centerItems, sheet.cozyLine]"
>
<div>
<span :class="sheet.bigIcon" aria-label="monitor">&#xE7F4;</span>
<span :class="sheet.bigIcon" aria-label="monitor">{{ icon }}</span>
<span
:class="[sheet.titleFont, sheet.selectable]"
style="margin-inline-start: 0.15em"
Expand Down

0 comments on commit f0d55a8

Please sign in to comment.