mirror of
https://github.com/Spythere/pojazdownik.git
synced 2026-05-03 05:18:10 +00:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b6d776d94e | |||
| 3a97f6a7ac | |||
| c03e524f37 | |||
| 89e947d462 | |||
| f286933a81 | |||
| 9bc5f083eb | |||
| a48cc17c08 | |||
| 9098ffbfbc | |||
| 603b55b44f | |||
| ad94c93932 |
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: npm ci && npm run build
|
||||
- run: yarn && yarn build
|
||||
- uses: FirebaseExtended/action-hosting-deploy@v0
|
||||
with:
|
||||
repoToken: '${{ secrets.GITHUB_TOKEN }}'
|
||||
|
||||
@@ -9,7 +9,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: npm ci && npm run build
|
||||
- run: yarn && yarn build
|
||||
- uses: FirebaseExtended/action-hosting-deploy@v0
|
||||
with:
|
||||
repoToken: '${{ secrets.GITHUB_TOKEN }}'
|
||||
|
||||
+1
-4
@@ -25,7 +25,4 @@ pnpm-debug.log*
|
||||
node_modules
|
||||
|
||||
# Dev files
|
||||
stockInfoDev.json
|
||||
|
||||
# Lock files
|
||||
yarn.lock
|
||||
stockInfoDev.json
|
||||
Generated
-8043
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pojazdownik",
|
||||
"version": "1.8.9",
|
||||
"version": "1.8.11",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -6,41 +6,48 @@
|
||||
|
||||
<div class="tab_content">
|
||||
<div class="actions">
|
||||
<label>
|
||||
<span>{{ $t('wiki.labels.search-vehicle') }}</span>
|
||||
<div class="action action-input">
|
||||
<label for="search-vehicle">
|
||||
{{ $t('wiki.labels.search-vehicle') }}
|
||||
<button class="reset-btn" @click="resetSearchInput">
|
||||
<img src="/images/icon-exit.svg" alt="reset vehicle input icon" />
|
||||
</button>
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
id="search-vehicle"
|
||||
name="search-vehicle"
|
||||
:placeholder="$t('wiki.labels.search-vehicle-placeholder')"
|
||||
v-model="searchedVehicleTypeName"
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<label>
|
||||
<span>{{ $t('wiki.labels.vehicles') }}</span>
|
||||
<div class="action action-select">
|
||||
<label for="filter-type">{{ $t('wiki.labels.vehicles') }}</label>
|
||||
<select name="filter-type" id="filter-type" v-model="filterType">
|
||||
<option v-for="filter in filters" :key="filter" :value="filter">
|
||||
{{ $t(`wiki.filters.${filter}`) }}
|
||||
</option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<label>
|
||||
<span>{{ $t('wiki.labels.sort-by') }}</span>
|
||||
<div class="action action-select">
|
||||
<label for="sorter-type">{{ $t('wiki.labels.sort-by') }}</label>
|
||||
<select name="sorter-type" id="sorter-type" v-model="sorterType">
|
||||
<option v-for="sorter in sorters" :key="sorter" :value="sorter">
|
||||
{{ $t(`wiki.sort-by.${sorter}`) }}
|
||||
</option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<label>
|
||||
<span>{{ $t('wiki.labels.sort-direction') }}</span>
|
||||
<div class="action action-select">
|
||||
<label for="sorter-direction">{{ $t('wiki.labels.sort-direction') }}</label>
|
||||
|
||||
<select name="sorter-direction" id="sorter-direction" v-model="sorterDirection">
|
||||
<option value="asc">{{ $t('wiki.sort-direction.asc') }}</option>
|
||||
<option value="desc">{{ $t('wiki.sort-direction.desc') }}</option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="vehicles" ref="vehicles">
|
||||
@@ -79,6 +86,10 @@
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="no-vehicles-warning" v-if="computedVehicles.length == 0">
|
||||
{{ $t('wiki.no-vehicles') }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
@@ -148,23 +159,24 @@ export default defineComponent({
|
||||
this.previewVehicle(vehicle);
|
||||
},
|
||||
|
||||
resetSearchInput() {
|
||||
this.searchedVehicleTypeName = '';
|
||||
},
|
||||
|
||||
filterVehicles(v: IVehicle) {
|
||||
if (this.searchedVehicleTypeName)
|
||||
return v.type
|
||||
.toLocaleLowerCase()
|
||||
.includes(this.searchedVehicleTypeName.toLocaleLowerCase());
|
||||
if (
|
||||
this.searchedVehicleTypeName != '' &&
|
||||
!v.type.toLocaleLowerCase().includes(this.searchedVehicleTypeName.toLocaleLowerCase())
|
||||
)
|
||||
return false;
|
||||
|
||||
switch (this.filterType) {
|
||||
case 'vehicles-all':
|
||||
return true;
|
||||
case 'vehicles-traction':
|
||||
return isTractionUnit(v);
|
||||
case 'vehicles-wagon':
|
||||
return !isTractionUnit(v);
|
||||
if (
|
||||
(this.filterType == 'vehicles-traction' && !isTractionUnit(v)) ||
|
||||
(this.filterType == 'vehicles-wagon' && isTractionUnit(v))
|
||||
)
|
||||
return false;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
sortVehicles(v1: IVehicle, v2: IVehicle) {
|
||||
@@ -180,21 +192,6 @@ export default defineComponent({
|
||||
case 'maxSpeed':
|
||||
return Math.sign(v1[this.sorterType] - v2[this.sorterType]) * direction;
|
||||
|
||||
// case 'cargoCount':
|
||||
// return (
|
||||
// Math.sign(
|
||||
// (!isTractionUnit(v1) ? v1.cargoTypes.length || -1 : -1) -
|
||||
// (!isTractionUnit(row2.vehicle) ? row2.vehicle.cargoTypes.length || -1 : -1)
|
||||
// ) * direction
|
||||
// );
|
||||
|
||||
// case 'coldStart':
|
||||
// return (
|
||||
// ((isTractionUnit(v1) && v1.coldStart ? 1 : -1) -
|
||||
// (isTractionUnit(row2.vehicle) && row2.vehicle.coldStart ? 1 : -1)) *
|
||||
// direction
|
||||
// );
|
||||
|
||||
default:
|
||||
return v1.type.localeCompare(v2.type) * direction;
|
||||
}
|
||||
@@ -220,16 +217,29 @@ export default defineComponent({
|
||||
gap: 0.5em;
|
||||
}
|
||||
|
||||
.actions > label {
|
||||
.action {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.25em;
|
||||
gap: 0.5em;
|
||||
|
||||
span {
|
||||
label {
|
||||
color: #ccc;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
.action.action-input label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.reset-btn {
|
||||
display: flex;
|
||||
background-color: #161c2e;
|
||||
border-radius: 0.25em;
|
||||
}
|
||||
|
||||
.vehicles {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
|
||||
@@ -290,6 +300,12 @@ export default defineComponent({
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.no-vehicles-warning {
|
||||
text-align: center;
|
||||
padding: 1em;
|
||||
background-color: #161c2e;
|
||||
}
|
||||
|
||||
@media screen and (max-width: $breakpointSm) {
|
||||
.actions-panel {
|
||||
align-items: stretch;
|
||||
|
||||
@@ -43,19 +43,22 @@
|
||||
"PW": ["6", "000", "899"],
|
||||
"PX": ["6", "000", "899"],
|
||||
|
||||
"TC": ["0", "000", "899"],
|
||||
"TM": ["4", "000", "899"],
|
||||
"TN": ["3", "000", "899"],
|
||||
"TK": ["3", "000", "899"],
|
||||
"TD": ["2", "000", "899"],
|
||||
"TG": ["1", "000", "899"],
|
||||
"TR": ["1", "000", "899"],
|
||||
"TD": ["2", "000", "899"],
|
||||
"TK": ["3", "000", "899"],
|
||||
"TN": ["3", "000", "899"],
|
||||
"TM": ["4", "000", "899"],
|
||||
"TC": ["0", "000", "899"],
|
||||
"TS": ["5", "000", "899"],
|
||||
"TH": ["5", "000", "899"],
|
||||
|
||||
"LT": ["5", "000", "899"],
|
||||
"LP": ["6", "000", "899"],
|
||||
"LS": ["9", "000", "899"],
|
||||
"LZ": ["9", "000", "899"],
|
||||
|
||||
"ZN": ["9", "000", "899"]
|
||||
"ZN": ["9", "000", "899"],
|
||||
"ZU": ["9", "000", "899"]
|
||||
}
|
||||
}
|
||||
|
||||
+21
-19
@@ -128,40 +128,42 @@
|
||||
"EI": "EI - domestic express",
|
||||
"EC": "EC - international express",
|
||||
"EN": "EN - domestic night express",
|
||||
|
||||
|
||||
"MP": "MP - intervoivodeship bullet",
|
||||
"RP": "RP - voivodeship bullet",
|
||||
"MO": "MO - intervoivodeship regio",
|
||||
"RO": "RO - voivodeship regio",
|
||||
|
||||
"MM": "MM - international bullet",
|
||||
"MH": "MH - intervoivodeship bullet (night / hotel)",
|
||||
"MH": "MH - intervoivodeship night bullet",
|
||||
|
||||
"RP": "RP - voivodeship bullet",
|
||||
"RM": "RM - international voivodeship regio",
|
||||
"RO": "RO - voivodeship regio",
|
||||
"RA": "RA - voivodeship regio (urban)",
|
||||
|
||||
|
||||
"PW": "PW - empty passenger",
|
||||
"PX": "PX - empty passenger test drive",
|
||||
|
||||
|
||||
"TC": "TC - international freight (intermodal)",
|
||||
"TG": "TG - international freight (cargo)",
|
||||
"TR": "TR - international freight (no cargo)",
|
||||
"TG": "TG - international freight (organized cargo)",
|
||||
"TR": "TR - international freight (unorganized cargo)",
|
||||
"TD": "TD - domestic freight (intermodal)",
|
||||
"TM": "TM - domestic freight (cargo)",
|
||||
"TN": "TN - domestic freight (no cargo)",
|
||||
"TK": "TK - freight (stations & sidings)",
|
||||
"TM": "TM - domestic freight (organized cargo)",
|
||||
"TN": "TN - domestic freight (unorganized cargo)",
|
||||
"TK": "TK - freight (for stations & sidings)",
|
||||
"TS": "TS - empty freight test drive",
|
||||
|
||||
"LT": "LT - locomotive only",
|
||||
"LT-new": "LT - freight locomotive only",
|
||||
|
||||
"TH": "TH - locomotive rolling stock (over 3 vehicles)",
|
||||
|
||||
"LT": "LT - freight locomotive only",
|
||||
"LP": "LP - passenger locomotive only",
|
||||
"LS": "LS - shunting locomotive",
|
||||
|
||||
"ZN": "ZN - inspection / diagnostic"
|
||||
"LS": "LS - shunting locomotive only",
|
||||
"LZ": "LS - shunting locomotive only",
|
||||
|
||||
"ZN": "ZN - inspection / diagnostic type",
|
||||
"ZU": "ZU - other maintenance type"
|
||||
}
|
||||
},
|
||||
"wiki": {
|
||||
"title": "LIST OF AVAILABLE VEHICLES",
|
||||
"no-vehicles": "No vehicles to show with the selected filters!",
|
||||
"labels": {
|
||||
"vehicles": "Vehicles",
|
||||
"sort-by": "Sort by",
|
||||
|
||||
+7
-5
@@ -150,18 +150,20 @@
|
||||
"TN": "TN - towarowy krajowy niemasowy",
|
||||
"TK": "TK - towarowy (stacje i bocznice)",
|
||||
"TS": "TS - towarowy próżny próbny",
|
||||
"TH": "TH - skład lokomotyw (powyżej 3 pojazdów)",
|
||||
|
||||
"LT": "LT - lokomotywa luzem",
|
||||
"LT-new": "LT - lokomotywa towarowa luzem",
|
||||
|
||||
"LT": "LT - lokomotywa towarowa luzem",
|
||||
"LP": "LP - lokomotywa pasażerska luzem",
|
||||
"LS": "LS - lokomotywa manewrowa",
|
||||
"LS": "LS - lokomotywa manewrowa luzem",
|
||||
"LZ": "LZ - lokomotywa dla poc. utrzymaniowo-naprawczych",
|
||||
|
||||
"ZN": "ZN - inspekcyjny / diagnostyczny"
|
||||
"ZN": "ZN - inspekcyjny / diagnostyczny",
|
||||
"ZU": "ZU - inny utrzymaniowy"
|
||||
}
|
||||
},
|
||||
"wiki": {
|
||||
"title": "LISTA DOSTĘPNYCH POJAZDÓW",
|
||||
"no-vehicles": "Brak pojazdów do pokazania przy obecnych filtrach!",
|
||||
"labels": {
|
||||
"vehicles": "Pojazdy",
|
||||
"sort-by": "Sortuj wg",
|
||||
|
||||
@@ -115,6 +115,10 @@ button {
|
||||
&:hover {
|
||||
color: $accentColor;
|
||||
}
|
||||
|
||||
&:focus-visible {
|
||||
outline: 1px solid $accentColor;
|
||||
}
|
||||
}
|
||||
|
||||
[data-tooltip]:hover::after,
|
||||
|
||||
Reference in New Issue
Block a user