mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-04 13:58:12 +00:00
chore(stations): minor improvements to level filtering
This commit is contained in:
@@ -72,9 +72,8 @@
|
||||
<span v-if="station.generalInfo">
|
||||
<span
|
||||
v-if="
|
||||
station.generalInfo.reqLevel > -1 &&
|
||||
station.generalInfo.availability != 'nonPublic' &&
|
||||
station.generalInfo.availability != 'unavailable'
|
||||
station.generalInfo.availability == 'default' ||
|
||||
station.generalInfo.availability == 'nonDefault'
|
||||
"
|
||||
data-tooltip-type="BaseTooltip"
|
||||
:data-tooltip-content="`${$t(`sceneries.info.${station.generalInfo.availability}`)} (${$t(
|
||||
|
||||
@@ -118,10 +118,12 @@ function filterSliderValues(filters: Record<string, any>, generalInfo: StationGe
|
||||
const { availability, reqLevel, routes } = generalInfo;
|
||||
|
||||
const otherAvailability =
|
||||
availability == 'nonPublic' || availability == 'unavailable' || availability == 'abandoned';
|
||||
availability == 'nonPublic' || availability == 'unavailable' || availability == 'abandoned'
|
||||
? 1
|
||||
: 0;
|
||||
|
||||
if (filters['minLevel'] > reqLevel + (otherAvailability ? 1 : 0)) return true;
|
||||
if (filters['maxLevel'] < reqLevel + (otherAvailability ? 1 : 0)) return true;
|
||||
if (filters['minLevel'] > Math.max(reqLevel, 0) + otherAvailability) return true;
|
||||
if (filters['maxLevel'] < Math.max(reqLevel, 0) + otherAvailability) return true;
|
||||
if (filters['minVmax'] > routes.maxRouteSpeed) return true;
|
||||
if (filters['maxVmax'] < routes.minRouteSpeed) return true;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ export default defineComponent({
|
||||
methods: {
|
||||
calculateExpStyle(exp: number, isSupporter = false): string {
|
||||
const bgColor =
|
||||
exp > -1 ? (exp < 2 ? '#26B0D9' : `hsl(${-exp * 5 + 100}, 85%, 50%)`) : '#666';
|
||||
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 6px 2px ${bgColor};` : '';
|
||||
|
||||
Reference in New Issue
Block a user