feature: lvl maszynisty przy dzienniku i pociągach

This commit is contained in:
2023-01-02 18:30:09 +01:00
parent 633f05f690
commit aa7a6b220e
7 changed files with 35 additions and 9 deletions
+11 -5
View File
@@ -4,13 +4,19 @@ export default defineComponent({
methods: {
calculateExpStyle(exp: number, isSupporter = false): string {
const bgColor = exp > -1 ? (exp < 2 ? '#26B0D9' : `hsl(${-exp * 5 + 100}, 85%, 50%)`) : '#666';
const fontColor = exp > 14 || exp == -1 ? 'white' : 'black';
const boxShadow = isSupporter ? `box-shadow: 0 0 10px 2px ${bgColor};` : '';
return `background-color: ${bgColor}; color: ${fontColor}; ${boxShadow}`;
},
calculateTextExpStyle(exp: number): string {
const textColor = exp > -1 ? (exp < 2 ? '#26B0D9' : `hsl(${-exp * 5 + 100}, 75%, 50%)`) : '#666';
return `color: ${textColor};`;
},
statusClasses(occupiedTo: string) {
let className = '';
@@ -41,6 +47,6 @@ export default defineComponent({
}
return className;
}
}
})
},
},
});