Compare commits

...

13 Commits

Author SHA1 Message Date
Spythere 2106675a0a Merge pull request #38 from Spythere/development
v1.8.12
2024-10-22 21:31:37 +02:00
Spythere 1b68e0174d bump: v1.8.12 2024-10-22 20:54:35 +02:00
Spythere b47f692ac1 fix: typos; updated images api source 2024-10-22 20:54:24 +02:00
Spythere b6d776d94e Merge pull request #37 from Spythere/development
v1.8.11
2024-08-21 19:54:09 +02:00
Spythere 3a97f6a7ac bump: v1.8.11 2024-08-21 19:48:26 +02:00
Spythere c03e524f37 fix: wiki vehicles filtering 2024-08-21 19:48:07 +02:00
Spythere 89e947d462 Merge pull request #36 from Spythere/development
v1.8.10
2024-08-10 14:24:57 +02:00
Spythere f286933a81 fix: order of categories listing 2024-08-09 14:57:10 +02:00
Spythere 9bc5f083eb hotfix 2024-08-09 14:48:17 +02:00
Spythere a48cc17c08 hotfix: removed package lock 2024-08-09 14:46:07 +02:00
Spythere 9098ffbfbc bump: v1.8.10 2024-08-09 14:41:12 +02:00
Spythere 603b55b44f chore: categories update for number generator 2024-08-09 14:40:49 +02:00
Spythere ad94c93932 chore: gh workflows update 2024-08-09 14:39:21 +02:00
14 changed files with 4710 additions and 8128 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- run: npm ci && npm run build - run: yarn && yarn build
- uses: FirebaseExtended/action-hosting-deploy@v0 - uses: FirebaseExtended/action-hosting-deploy@v0
with: with:
repoToken: '${{ secrets.GITHUB_TOKEN }}' repoToken: '${{ secrets.GITHUB_TOKEN }}'
@@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- run: npm ci && npm run build - run: yarn && yarn build
- uses: FirebaseExtended/action-hosting-deploy@v0 - uses: FirebaseExtended/action-hosting-deploy@v0
with: with:
repoToken: '${{ secrets.GITHUB_TOKEN }}' repoToken: '${{ secrets.GITHUB_TOKEN }}'
+1 -4
View File
@@ -25,7 +25,4 @@ pnpm-debug.log*
node_modules node_modules
# Dev files # Dev files
stockInfoDev.json stockInfoDev.json
# Lock files
yarn.lock
-8043
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "pojazdownik", "name": "pojazdownik",
"version": "1.8.9", "version": "1.8.12",
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {
+1 -1
View File
@@ -76,7 +76,7 @@
<div class="thumbnail-container"> <div class="thumbnail-container">
<div>{{ stockType }}</div> <div>{{ stockType }}</div>
<img <img
:src="`https://static.spythere.eu/thumbnails/${stockType}.png`" :src="`https://stacjownik.spythere.eu/static/thumbnails/${stockType}.png`"
:title="stockType" :title="stockType"
style="opacity: 0" style="opacity: 0"
@error="(e) => onStockItemError(e, stockType)" @error="(e) => onStockItemError(e, stockType)"
+60 -44
View File
@@ -6,41 +6,48 @@
<div class="tab_content"> <div class="tab_content">
<div class="actions"> <div class="actions">
<label> <div class="action action-input">
<span>{{ $t('wiki.labels.search-vehicle') }}</span> <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 <input
type="text" type="text"
id="search-vehicle"
name="search-vehicle"
:placeholder="$t('wiki.labels.search-vehicle-placeholder')" :placeholder="$t('wiki.labels.search-vehicle-placeholder')"
v-model="searchedVehicleTypeName" v-model="searchedVehicleTypeName"
/> />
</label> </div>
<label> <div class="action action-select">
<span>{{ $t('wiki.labels.vehicles') }}</span> <label for="filter-type">{{ $t('wiki.labels.vehicles') }}</label>
<select name="filter-type" id="filter-type" v-model="filterType"> <select name="filter-type" id="filter-type" v-model="filterType">
<option v-for="filter in filters" :key="filter" :value="filter"> <option v-for="filter in filters" :key="filter" :value="filter">
{{ $t(`wiki.filters.${filter}`) }} {{ $t(`wiki.filters.${filter}`) }}
</option> </option>
</select> </select>
</label> </div>
<label> <div class="action action-select">
<span>{{ $t('wiki.labels.sort-by') }}</span> <label for="sorter-type">{{ $t('wiki.labels.sort-by') }}</label>
<select name="sorter-type" id="sorter-type" v-model="sorterType"> <select name="sorter-type" id="sorter-type" v-model="sorterType">
<option v-for="sorter in sorters" :key="sorter" :value="sorter"> <option v-for="sorter in sorters" :key="sorter" :value="sorter">
{{ $t(`wiki.sort-by.${sorter}`) }} {{ $t(`wiki.sort-by.${sorter}`) }}
</option> </option>
</select> </select>
</label> </div>
<label> <div class="action action-select">
<span>{{ $t('wiki.labels.sort-direction') }}</span> <label for="sorter-direction">{{ $t('wiki.labels.sort-direction') }}</label>
<select name="sorter-direction" id="sorter-direction" v-model="sorterDirection"> <select name="sorter-direction" id="sorter-direction" v-model="sorterDirection">
<option value="asc">{{ $t('wiki.sort-direction.asc') }}</option> <option value="asc">{{ $t('wiki.sort-direction.asc') }}</option>
<option value="desc">{{ $t('wiki.sort-direction.desc') }}</option> <option value="desc">{{ $t('wiki.sort-direction.desc') }}</option>
</select> </select>
</label> </div>
</div> </div>
<ul class="vehicles" ref="vehicles"> <ul class="vehicles" ref="vehicles">
@@ -79,6 +86,10 @@
</span> </span>
</li> </li>
</ul> </ul>
<div class="no-vehicles-warning" v-if="computedVehicles.length == 0">
{{ $t('wiki.no-vehicles') }}
</div>
</div> </div>
</section> </section>
</template> </template>
@@ -148,23 +159,24 @@ export default defineComponent({
this.previewVehicle(vehicle); this.previewVehicle(vehicle);
}, },
resetSearchInput() {
this.searchedVehicleTypeName = '';
},
filterVehicles(v: IVehicle) { filterVehicles(v: IVehicle) {
if (this.searchedVehicleTypeName) if (
return v.type this.searchedVehicleTypeName != '' &&
.toLocaleLowerCase() !v.type.toLocaleLowerCase().includes(this.searchedVehicleTypeName.toLocaleLowerCase())
.includes(this.searchedVehicleTypeName.toLocaleLowerCase()); )
return false;
switch (this.filterType) { if (
case 'vehicles-all': (this.filterType == 'vehicles-traction' && !isTractionUnit(v)) ||
return true; (this.filterType == 'vehicles-wagon' && isTractionUnit(v))
case 'vehicles-traction': )
return isTractionUnit(v); return false;
case 'vehicles-wagon':
return !isTractionUnit(v);
default: return true;
return false;
}
}, },
sortVehicles(v1: IVehicle, v2: IVehicle) { sortVehicles(v1: IVehicle, v2: IVehicle) {
@@ -180,21 +192,6 @@ export default defineComponent({
case 'maxSpeed': case 'maxSpeed':
return Math.sign(v1[this.sorterType] - v2[this.sorterType]) * direction; 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: default:
return v1.type.localeCompare(v2.type) * direction; return v1.type.localeCompare(v2.type) * direction;
} }
@@ -220,16 +217,29 @@ export default defineComponent({
gap: 0.5em; gap: 0.5em;
} }
.actions > label { .action {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 0.25em; gap: 0.5em;
span { label {
color: #ccc; 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 { .vehicles {
display: grid; display: grid;
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
@@ -290,6 +300,12 @@ export default defineComponent({
color: #ccc; color: #ccc;
} }
.no-vehicles-warning {
text-align: center;
padding: 1em;
background-color: #161c2e;
}
@media screen and (max-width: $breakpointSm) { @media screen and (max-width: $breakpointSm) {
.actions-panel { .actions-panel {
align-items: stretch; align-items: stretch;
+1 -1
View File
@@ -28,7 +28,7 @@
v-for="thumbnail in getVehicleThumbnails(stock.vehicleRef.type)" v-for="thumbnail in getVehicleThumbnails(stock.vehicleRef.type)"
draggable="false" draggable="false"
style="min-width: 200px" style="min-width: 200px"
:src="`https://static.spythere.eu/thumbnails/v2/${thumbnail.src}.png`" :src="`https://stacjownik.spythere.eu/static/thumbnails/${thumbnail.src}.png`"
:alt="stock.vehicleRef.type" :alt="stock.vehicleRef.type"
:title="stock.vehicleRef.type" :title="stock.vehicleRef.type"
@load="($event) => (($event.target as HTMLImageElement).style.minWidth = 'auto')" @load="($event) => (($event.target as HTMLImageElement).style.minWidth = 'auto')"
+9 -6
View File
@@ -43,19 +43,22 @@
"PW": ["6", "000", "899"], "PW": ["6", "000", "899"],
"PX": ["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"], "TG": ["1", "000", "899"],
"TR": ["1", "000", "899"], "TR": ["1", "000", "899"],
"TD": ["2", "000", "899"], "TC": ["0", "000", "899"],
"TK": ["3", "000", "899"],
"TN": ["3", "000", "899"],
"TM": ["4", "000", "899"],
"TS": ["5", "000", "899"], "TS": ["5", "000", "899"],
"TH": ["5", "000", "899"],
"LT": ["5", "000", "899"], "LT": ["5", "000", "899"],
"LP": ["6", "000", "899"], "LP": ["6", "000", "899"],
"LS": ["9", "000", "899"], "LS": ["9", "000", "899"],
"LZ": ["9", "000", "899"],
"ZN": ["9", "000", "899"] "ZN": ["9", "000", "899"],
"ZU": ["9", "000", "899"]
} }
} }
+21 -19
View File
@@ -128,40 +128,42 @@
"EI": "EI - domestic express", "EI": "EI - domestic express",
"EC": "EC - international express", "EC": "EC - international express",
"EN": "EN - domestic night express", "EN": "EN - domestic night express",
"MP": "MP - intervoivodeship bullet", "MP": "MP - intervoivodeship bullet",
"RP": "RP - voivodeship bullet",
"MO": "MO - intervoivodeship regio", "MO": "MO - intervoivodeship regio",
"RO": "RO - voivodeship regio",
"MM": "MM - international bullet", "MM": "MM - international bullet",
"MH": "MH - intervoivodeship bullet (night / hotel)", "MH": "MH - intervoivodeship night bullet",
"RP": "RP - voivodeship bullet",
"RM": "RM - international voivodeship regio", "RM": "RM - international voivodeship regio",
"RO": "RO - voivodeship regio",
"RA": "RA - voivodeship regio (urban)", "RA": "RA - voivodeship regio (urban)",
"PW": "PW - empty passenger", "PW": "PW - empty passenger",
"PX": "PX - empty passenger test drive", "PX": "PX - empty passenger test drive",
"TC": "TC - international freight (intermodal)", "TC": "TC - international freight (intermodal)",
"TG": "TG - international freight (cargo)", "TG": "TG - international freight (organized cargo)",
"TR": "TR - international freight (no cargo)", "TR": "TR - international freight (unorganized cargo)",
"TD": "TD - domestic freight (intermodal)", "TD": "TD - domestic freight (intermodal)",
"TM": "TM - domestic freight (cargo)", "TM": "TM - domestic freight (organized cargo)",
"TN": "TN - domestic freight (no cargo)", "TN": "TN - domestic freight (unorganized cargo)",
"TK": "TK - freight (stations & sidings)", "TK": "TK - freight (for stations & sidings)",
"TS": "TS - empty freight test drive", "TS": "TS - empty freight test drive",
"TH": "TH - locomotive rolling stock (over 3 vehicles)",
"LT": "LT - locomotive only",
"LT-new": "LT - freight locomotive only", "LT": "LT - freight locomotive only",
"LP": "LP - passenger locomotive only", "LP": "LP - passenger locomotive only",
"LS": "LS - shunting locomotive", "LS": "LS - shunting locomotive only",
"LZ": "LS - shunting locomotive only",
"ZN": "ZN - inspection / diagnostic"
"ZN": "ZN - inspection / diagnostic type",
"ZU": "ZU - other maintenance type"
} }
}, },
"wiki": { "wiki": {
"title": "LIST OF AVAILABLE VEHICLES", "title": "LIST OF AVAILABLE VEHICLES",
"no-vehicles": "No vehicles to show with the selected filters!",
"labels": { "labels": {
"vehicles": "Vehicles", "vehicles": "Vehicles",
"sort-by": "Sort by", "sort-by": "Sort by",
+8 -6
View File
@@ -137,7 +137,7 @@
"MM": "MM - międzynar. pośpieszny", "MM": "MM - międzynar. pośpieszny",
"MH": "MH - międzywoj. pośpieszny hotelowy", "MH": "MH - międzywoj. pośpieszny hotelowy",
"RM": "RM - woj. osobowy międzynarodowy", "RM": "RM - woj. osobowy międzynarodowy",
"RA": "RA - woj. osobowy algomeracyjny", "RA": "RA - woj. osobowy aglomeracyjny",
"PW": "PW - pasażerski próżny - służbowy", "PW": "PW - pasażerski próżny - służbowy",
"PX": "PX - pasażerski próżny próbny", "PX": "PX - pasażerski próżny próbny",
@@ -150,18 +150,20 @@
"TN": "TN - towarowy krajowy niemasowy", "TN": "TN - towarowy krajowy niemasowy",
"TK": "TK - towarowy (stacje i bocznice)", "TK": "TK - towarowy (stacje i bocznice)",
"TS": "TS - towarowy próżny próbny", "TS": "TS - towarowy próżny próbny",
"TH": "TH - skład lokomotyw (powyżej 3 pojazdów)",
"LT": "LT - lokomotywa luzem", "LT": "LT - lokomotywa towarowa luzem",
"LT-new": "LT - lokomotywa towarowa luzem",
"LP": "LP - lokomotywa pasażerska 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": { "wiki": {
"title": "LISTA DOSTĘPNYCH POJAZDÓW", "title": "LISTA DOSTĘPNYCH POJAZDÓW",
"no-vehicles": "Brak pojazdów do pokazania przy obecnych filtrach!",
"labels": { "labels": {
"vehicles": "Pojazdy", "vehicles": "Pojazdy",
"sort-by": "Sortuj wg", "sort-by": "Sortuj wg",
+1 -1
View File
@@ -7,7 +7,7 @@ export default defineComponent({
}, },
getThumbnailURL(vehicleType: string, size: 'small' | 'large') { getThumbnailURL(vehicleType: string, size: 'small' | 'large') {
return `https://static.spythere.eu/images/${vehicleType}--${size == 'small' ? 300 : 800}px.jpg`; return `https://stacjownik.spythere.eu/static/images/${vehicleType}--${size == 'small' ? 300 : 800}px.jpg`;
}, },
}, },
}); });
+4
View File
@@ -115,6 +115,10 @@ button {
&:hover { &:hover {
color: $accentColor; color: $accentColor;
} }
&:focus-visible {
outline: 1px solid $accentColor;
}
} }
[data-tooltip]:hover::after, [data-tooltip]:hover::after,
+4601
View File
File diff suppressed because it is too large Load Diff