mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
sortowanie po liczbie szlaków i ocenie dyżurnego
This commit is contained in:
@@ -240,8 +240,12 @@
|
||||
<span class="text--primary">{{ station.onlineInfo?.maxUsers || 0 }}</span>
|
||||
</td>
|
||||
|
||||
<td class="station_spawns" :class="{ inactive: !station.onlineInfo }">
|
||||
<span>{{ station.onlineInfo?.spawns.length || 0 }}</span>
|
||||
<td class="station-likes">
|
||||
<span>{{ station.onlineInfo?.dispatcherRate ?? 0 }}</span>
|
||||
</td>
|
||||
|
||||
<td class="station-spawns" :class="{ inactive: !station.onlineInfo }">
|
||||
<span>{{ station.onlineInfo?.spawns.length ?? 0 }}</span>
|
||||
</td>
|
||||
|
||||
<td
|
||||
@@ -406,13 +410,9 @@ table {
|
||||
border-collapse: collapse;
|
||||
table-layout: fixed;
|
||||
width: 100%;
|
||||
min-width: 1200px;
|
||||
min-width: 1250px;
|
||||
white-space: wrap;
|
||||
|
||||
@include smallScreen() {
|
||||
min-width: auto;
|
||||
}
|
||||
|
||||
thead tr {
|
||||
background-color: $bgCol;
|
||||
}
|
||||
@@ -426,7 +426,7 @@ table {
|
||||
}
|
||||
|
||||
&.min-lvl {
|
||||
width: 100px;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
&.status {
|
||||
@@ -443,19 +443,19 @@ table {
|
||||
|
||||
&.routes-double,
|
||||
&.routes-single {
|
||||
width: 75px;
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
&.general {
|
||||
width: 160px;
|
||||
}
|
||||
|
||||
&.user {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
&.header-image {
|
||||
width: 50px;
|
||||
width: 60px;
|
||||
|
||||
&.user {
|
||||
width: 75px;
|
||||
}
|
||||
}
|
||||
|
||||
padding: 0.5em 0.25em;
|
||||
@@ -564,11 +564,11 @@ tr {
|
||||
.station-info {
|
||||
.icon-info {
|
||||
vertical-align: middle;
|
||||
line-height: 32px;
|
||||
line-height: 2.5em;
|
||||
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
font-size: 12px;
|
||||
width: 2.5em;
|
||||
height: 2.5em;
|
||||
font-size: 0.8em;
|
||||
margin: 0 3px;
|
||||
|
||||
outline: 2px solid #2b2b2b;
|
||||
|
||||
@@ -11,6 +11,7 @@ export const headIds = [
|
||||
|
||||
export const headIconsIds = [
|
||||
'user',
|
||||
'like',
|
||||
'spawn',
|
||||
'timetableAll',
|
||||
'timetableUnconfirmed',
|
||||
|
||||
@@ -54,12 +54,28 @@ export const sortStations = (
|
||||
diff = (a.onlineInfo?.dispatcherExp || 0) - (b.onlineInfo?.dispatcherExp || 0);
|
||||
break;
|
||||
|
||||
case 'routes-single':
|
||||
diff =
|
||||
(a.generalInfo?.routes.single.length ?? -1) - (b.generalInfo?.routes.single.length ?? -1);
|
||||
break;
|
||||
|
||||
case 'routes-double':
|
||||
diff =
|
||||
(a.generalInfo?.routes.double.length ?? -1) - (b.generalInfo?.routes.double.length ?? -1);
|
||||
break;
|
||||
|
||||
case 'user':
|
||||
diff =
|
||||
(b.onlineInfo ? b.onlineInfo.currentUsers : -1) -
|
||||
(a.onlineInfo ? a.onlineInfo.currentUsers : -1);
|
||||
break;
|
||||
|
||||
case 'like':
|
||||
diff =
|
||||
(b.onlineInfo ? b.onlineInfo.dispatcherRate : -Infinity) -
|
||||
(a.onlineInfo ? a.onlineInfo.dispatcherRate : -Infinity);
|
||||
break;
|
||||
|
||||
case 'spawn':
|
||||
diff =
|
||||
(a.onlineInfo ? a.onlineInfo.spawns.length : -1) -
|
||||
|
||||
@@ -230,6 +230,8 @@ export const useMainStore = defineStore('store', {
|
||||
return apiStore.sceneryData.map((scenery) => {
|
||||
const routes = scenery.routesInfo.reduce(
|
||||
(acc, route) => {
|
||||
if (route.hidden) return acc;
|
||||
|
||||
const tracksKey = route.routeTracks == 2 ? 'double' : 'single';
|
||||
const isElectric = route.isElectric;
|
||||
const routesKey: keyof StationRoutes = `${tracksKey}${
|
||||
|
||||
Reference in New Issue
Block a user