mirror of
https://github.com/Spythere/pojazdownik.git
synced 2026-05-02 21:08:12 +00:00
+50
-49
@@ -1,55 +1,56 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
||||
|
||||
<title>Pojazdownik</title>
|
||||
<meta name="description" content="Edytor składów online dla symulatora Train Driver 2" />
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
||||
|
||||
<link rel="icon" href="/favicon.ico" sizes="any" />
|
||||
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
||||
<link rel="apple-touch-icon" href="/apple-touch-icon-180x180.png" />
|
||||
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5" />
|
||||
<link rel="manifest" href="/site.webmanifest" />
|
||||
<title>Pojazdownik</title>
|
||||
<meta name="description" content="Edytor składów online dla symulatora Train Driver 2" />
|
||||
|
||||
<meta name="msapplication-TileColor" content="#da532c" />
|
||||
<meta name="theme-color" content="#111" />
|
||||
<link rel="icon" href="/favicon.ico" sizes="any" />
|
||||
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
||||
<link rel="apple-touch-icon" href="/apple-touch-icon-180x180.png" />
|
||||
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5" />
|
||||
<link rel="manifest" href="/site.webmanifest" />
|
||||
|
||||
<!-- Static OpenGraph meta -->
|
||||
<meta name="description" content="Edytor składów online dla symulatora Train Driver 2" />
|
||||
<meta property="og:url" content="https://pojazdownik-td2.web.app/" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="Pojazdownik" />
|
||||
<meta
|
||||
property="og:description"
|
||||
content="Edytor składów online dla symulatora Train Driver 2"
|
||||
/>
|
||||
<meta
|
||||
property="og:image"
|
||||
content="https://raw.githubusercontent.com/Spythere/api/refs/heads/main/thumbnails/pojazdownik-banner.png"
|
||||
/>
|
||||
<meta property="og:image:width" content="1200" />
|
||||
<meta property="og:image:height" content="630" />
|
||||
<meta property="og:site_name" content="Pojazdownik" />
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:title" content="Pojazdownik" />
|
||||
<meta
|
||||
name="twitter:description"
|
||||
content="Edytor składów online dla symulatora Train Driver 2"
|
||||
/>
|
||||
<meta
|
||||
name="twitter:image"
|
||||
content="https://raw.githubusercontent.com/Spythere/api/refs/heads/main/thumbnails/pojazdownik-banner.png"
|
||||
/>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong> We're sorry but Pojazdownik doesn't work properly without JavaScript enabled. Please enable it to continue. </strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
<meta name="msapplication-TileColor" content="#da532c" />
|
||||
<meta name="theme-color" content="#111" />
|
||||
|
||||
<!-- Static OpenGraph meta -->
|
||||
<meta name="description" content="Edytor składów online dla symulatora Train Driver 2" />
|
||||
<meta property="og:url" content="https://pojazdownik-td2.web.app/" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="Pojazdownik" />
|
||||
<meta property="og:description" content="Edytor składów online dla symulatora Train Driver 2" />
|
||||
<meta property="og:image"
|
||||
content="https://raw.githubusercontent.com/Spythere/api/refs/heads/main/thumbnails/pojazdownik-banner.png" />
|
||||
<meta property="og:image:width" content="1200" />
|
||||
<meta property="og:image:height" content="630" />
|
||||
<meta property="og:site_name" content="Pojazdownik" />
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:title" content="Pojazdownik" />
|
||||
<meta name="twitter:description" content="Edytor składów online dla symulatora Train Driver 2" />
|
||||
<meta name="twitter:image"
|
||||
content="https://raw.githubusercontent.com/Spythere/api/refs/heads/main/thumbnails/pojazdownik-banner.png" />
|
||||
|
||||
<!-- Preload -->
|
||||
<link rel="preload" href="/fonts/Lato-Bold.woff2" as="font" type="font/woff2" crossorigin />
|
||||
<link rel="preload" href="/fonts/Lato-Regular.woff2" as="font" type="font/woff2" crossorigin />
|
||||
|
||||
<link rel="preload" as="image" href="/logo-pl.svg" />
|
||||
<link rel="preload" as="image" href="/logo-en.svg" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<noscript>
|
||||
<strong> We're sorry but Pojazdownik doesn't work properly without JavaScript enabled. Please enable it to continue.
|
||||
</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
+15
-15
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pojazdownik",
|
||||
"version": "1.9.2",
|
||||
"version": "1.9.3",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
@@ -13,27 +13,27 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^1.4.0",
|
||||
"lucide-vue-next": "^0.487.0",
|
||||
"pinia": "^2.0.17",
|
||||
"lucide-vue-next": "^0.552.0",
|
||||
"pinia": "^3.0.3",
|
||||
"prettier": "^3.0.3",
|
||||
"vue": "^3.2.37",
|
||||
"vue-i18n": "9.11.0",
|
||||
"vue-i18n": "11.1.12",
|
||||
"vue-router": "4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rushstack/eslint-patch": "^1.3.3",
|
||||
"@types/node": "^22.13.9",
|
||||
"@vite-pwa/assets-generator": "^0.2.3",
|
||||
"@vitejs/plugin-vue": "^5.0.3",
|
||||
"@vue/eslint-config-prettier": "^9.0.0",
|
||||
"@vue/eslint-config-typescript": "^12.0.0",
|
||||
"@vue/tsconfig": "^0.5.1",
|
||||
"eslint": "^8.49.0",
|
||||
"eslint-plugin-vue": "^9.17.0",
|
||||
"@types/node": "^24.10.0",
|
||||
"@vite-pwa/assets-generator": "^1.0.2",
|
||||
"@vitejs/plugin-vue": "^6.0.1",
|
||||
"@vue/eslint-config-prettier": "^10.2.0",
|
||||
"@vue/eslint-config-typescript": "^14.6.0",
|
||||
"@vue/tsconfig": "^0.8.1",
|
||||
"eslint": "^9.39.1",
|
||||
"eslint-plugin-vue": "^10.5.1",
|
||||
"sass": "^1.59.3",
|
||||
"typescript": "^5.0.2",
|
||||
"vite": "^5.0.12",
|
||||
"vite-plugin-pwa": "^0.17.5",
|
||||
"vue-tsc": "^2.2.8"
|
||||
"vite": "^7.1.12",
|
||||
"vite-plugin-pwa": "^1.1.0",
|
||||
"vue-tsc": "^3.1.3"
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+9
-4
@@ -11,6 +11,14 @@ import { useStore } from './store';
|
||||
import ImageFullscreenPreview from './components/utils/ImageFullscreenPreview.vue';
|
||||
import AppContainerView from './views/AppContainerView.vue';
|
||||
import AppModals from './components/app/AppModals.vue';
|
||||
import { registerSW } from 'virtual:pwa-register';
|
||||
|
||||
registerSW({
|
||||
immediate: true,
|
||||
onNeedRefresh() {
|
||||
console.log('Needs refresh!');
|
||||
},
|
||||
});
|
||||
|
||||
export default defineComponent({
|
||||
components: { ImageFullscreenPreview, AppContainerView, AppModals },
|
||||
@@ -49,10 +57,7 @@ export default defineComponent({
|
||||
try {
|
||||
this.store.storageStockData = JSON.parse(savedData);
|
||||
} catch (error) {
|
||||
console.error(
|
||||
'Wystąpił błąd podczas przetwarzania danych o składach z localStorage!',
|
||||
error
|
||||
);
|
||||
console.error('Wystąpił błąd podczas przetwarzania danych o składach z localStorage!', error);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,23 +1,31 @@
|
||||
<template>
|
||||
<div class="stock_warnings" v-if="hasAnyWarnings">
|
||||
<div class="warning" v-if="locoNotSuitable">(!) {{ $t('stocklist.warning-not-suitable') }}</div>
|
||||
<div class="warning" v-if="locoNotSuitable"><TriangleAlertIcon :size="20" :stroke-width="2" /> {{ $t('stocklist.warning-not-suitable') }}</div>
|
||||
|
||||
<div class="warning" v-if="lengthExceeded && store.isTrainPassenger">(!) {{ $t('stocklist.warning-passenger-too-long') }}</div>
|
||||
<div class="warning" v-if="lengthExceeded && store.isTrainPassenger">
|
||||
<TriangleAlertIcon :size="20" :stroke-width="2" /> {{ $t('stocklist.warning-passenger-too-long') }}
|
||||
</div>
|
||||
|
||||
<div class="warning" v-if="lengthExceeded && !store.isTrainPassenger">(!) {{ $t('stocklist.warning-freight-too-long') }}</div>
|
||||
<div class="warning" v-if="lengthExceeded && !store.isTrainPassenger">
|
||||
<TriangleAlertIcon :size="20" :stroke-width="2" /> {{ $t('stocklist.warning-freight-too-long') }}
|
||||
</div>
|
||||
|
||||
<div class="warning" v-if="teamOnlyVehicles.length > 0">
|
||||
(!)
|
||||
<TriangleAlertIcon :size="20" :stroke-width="2" />
|
||||
{{ $t('stocklist.warning-team-only-vehicle', [teamOnlyVehicles.map((v) => v.vehicleRef.type).join(', ')]) }}
|
||||
</div>
|
||||
|
||||
<div class="warning" v-if="store.cargoWarnings.size > 0">
|
||||
(!) <b>{{ $t('cargo-warnings.title') }}</b>
|
||||
<TriangleAlertIcon :size="20" :stroke-width="2" /> <b>{{ $t('cargo-warnings.title') }}</b>
|
||||
{{ [...store.cargoWarnings].map((v) => $t(`cargo-warnings.${v}`)).join('; ') }}
|
||||
</div>
|
||||
|
||||
<div class="warning" v-if="!isRearPRSM4">
|
||||
<TriangleAlertIcon :size="20" :stroke-width="2" /> {{ $t('stocklist.warning-prsm4-not-at-the-rear') }}
|
||||
</div>
|
||||
|
||||
<div class="warning" v-if="weightExceeded">
|
||||
(!)
|
||||
<TriangleAlertIcon :size="20" :stroke-width="2" />
|
||||
<i18n-t keypath="stocklist.warning-too-heavy">
|
||||
<template #href>
|
||||
<a target="_blank" href="https://docs.google.com/spreadsheets/d/1BvTU-U7huIaEheov22TrhTtROUM4MwVfdbq03GVAEM8">
|
||||
@@ -26,10 +34,6 @@
|
||||
</template>
|
||||
</i18n-t>
|
||||
</div>
|
||||
|
||||
<!-- <div class="warning" v-if="locoCountExceeded">
|
||||
{{ $t('stocklist.warning-too-many-locos') }}
|
||||
</div> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -37,8 +41,11 @@
|
||||
import { defineComponent } from 'vue';
|
||||
import { useStore } from '../../../store';
|
||||
import { isTractionUnit } from '../../../utils/vehicleUtils';
|
||||
import { TriangleAlertIcon } from 'lucide-vue-next';
|
||||
|
||||
export default defineComponent({
|
||||
components: { TriangleAlertIcon },
|
||||
|
||||
data: () => ({
|
||||
store: useStore(),
|
||||
}),
|
||||
@@ -68,6 +75,14 @@ export default defineComponent({
|
||||
this.store.stockList.some((stock) => isTractionUnit(stock.vehicleRef) && stock.vehicleRef.type.startsWith('EP'))
|
||||
);
|
||||
},
|
||||
|
||||
isRearPRSM4() {
|
||||
if (this.store.stockList.length <= 1) return true;
|
||||
|
||||
const index = this.store.stockList.findIndex((stock) => stock.vehicleRef.type.startsWith('PRSM4'));
|
||||
|
||||
return index != -1 ? index == this.store.stockList.length - 1 : true;
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
@@ -81,6 +96,10 @@ export default defineComponent({
|
||||
|
||||
font-weight: bold;
|
||||
|
||||
.lucide {
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
|
||||
a {
|
||||
color: black;
|
||||
text-decoration: underline;
|
||||
|
||||
@@ -84,6 +84,7 @@
|
||||
"warning-too-many-locos": "This train has too many traction units!",
|
||||
"warning-too-heavy": "This train is too heavy! Check {href}",
|
||||
"warning-team-only-vehicle": "There's at least one vehicle available only for TD2 team members in your stock composition! ({0})",
|
||||
"warning-prsm4-not-at-the-rear": "PRSM4 welding car must be at the end of a train!",
|
||||
"acceptable-mass-docs": "acceptable rolling stock masses (PL)",
|
||||
"stock-loading-error": "An error occurred: cannot parse data from the file - make sure it's in a proper format!",
|
||||
"stock-clipboard-error": "An error occurred: cannot read data from the clipboard - make sure the site has been granted right permissions for this action!"
|
||||
|
||||
@@ -84,6 +84,7 @@
|
||||
"warning-too-many-locos": "Ten skład posiada za dużo pojazdów trakcyjnych!",
|
||||
"warning-too-heavy": "Ten skład jest za ciężki! Sprawdź {href}",
|
||||
"warning-team-only-vehicle": "W zestawieniu znajduje się co najmniej jeden pojazd dostępny tylko dla członków zespołu TD2! ({0})",
|
||||
"warning-prsm4-not-at-the-rear": "Zgrzewarka PRSM4 może znajdować się jedynie na końcu składu w przypadku jazdy pociągowej!",
|
||||
"acceptable-mass-docs": "dopuszczalne masy składów",
|
||||
"stock-loading-error": "Wystąpił błąd: nie można przetworzyć danych ze schowka! Upewnij się, że są one w poprawnym formacie!",
|
||||
"stock-clipboard-error": "Wystąpił błąd: nie można odczytać danych ze schowka! Upewnij się, że nadałeś uprawnienia stronie do tej akcji!"
|
||||
|
||||
+4
-12
@@ -10,16 +10,6 @@ $accentColor: #e4c428;
|
||||
$sponsorColor: gold;
|
||||
$teamColor: #ff4848;
|
||||
|
||||
@font-face {
|
||||
font-family: 'Lato';
|
||||
src:
|
||||
url('/fonts/Lato-Light.woff2') format('woff2'),
|
||||
url('/fonts/Lato-Light.woff') format('woff');
|
||||
font-weight: 300;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Lato';
|
||||
src:
|
||||
@@ -350,7 +340,7 @@ hr {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
label > input:checked + span {
|
||||
label>input:checked+span {
|
||||
color: $accentColor;
|
||||
border-color: $accentColor;
|
||||
}
|
||||
@@ -358,6 +348,7 @@ hr {
|
||||
|
||||
// Vue Transition anims
|
||||
.slide-top {
|
||||
|
||||
&-enter-from,
|
||||
&-leave-to {
|
||||
transform: translateY(-100%);
|
||||
@@ -370,6 +361,7 @@ hr {
|
||||
}
|
||||
|
||||
.card-appear {
|
||||
|
||||
&-enter-from,
|
||||
&-leave-to {
|
||||
opacity: 0;
|
||||
@@ -379,4 +371,4 @@ hr {
|
||||
&-leave-active {
|
||||
transition: all 100ms ease-in-out;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user