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