mirror of
https://github.com/tbnobody/OpenDTU.git
synced 2025-12-10 16:59:52 +01:00
webapp: Simplify line class detection in console view
This commit is contained in:
@@ -212,12 +212,8 @@ export default defineComponent({
|
||||
};
|
||||
},
|
||||
getLineClass(line: string): string {
|
||||
for (const tag in this.levelMap) {
|
||||
if (line.includes(tag)) {
|
||||
return this.levelMap[tag];
|
||||
}
|
||||
}
|
||||
return 'default';
|
||||
const found = Object.entries(this.levelMap).find(([tag]) => line.includes(tag));
|
||||
return found ? found[1] : 'default';
|
||||
},
|
||||
handleScroll() {
|
||||
const el = this.$refs.logRef as HTMLDivElement;
|
||||
|
||||
Reference in New Issue
Block a user