diff --git a/index.html b/index.html index ecd4ac7..2c9c711 100644 --- a/index.html +++ b/index.html @@ -1,55 +1,56 @@ - - - - - Pojazdownik - + + + + - - - - - + Pojazdownik + - - + + + + + - - - - - - - - - - - - - - - - - - -
- - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/package.json b/package.json index ca45604..bcc1daa 100644 --- a/package.json +++ b/package.json @@ -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" } } diff --git a/public/fonts/Lato-Black.ttf b/public/fonts/Lato-Black.ttf deleted file mode 100644 index 4340502..0000000 Binary files a/public/fonts/Lato-Black.ttf and /dev/null differ diff --git a/public/fonts/Lato-Bold.ttf b/public/fonts/Lato-Bold.ttf deleted file mode 100644 index 016068b..0000000 Binary files a/public/fonts/Lato-Bold.ttf and /dev/null differ diff --git a/public/fonts/Lato-Light.woff b/public/fonts/Lato-Light.woff deleted file mode 100644 index 3f53bab..0000000 Binary files a/public/fonts/Lato-Light.woff and /dev/null differ diff --git a/public/fonts/Lato-Light.woff2 b/public/fonts/Lato-Light.woff2 deleted file mode 100644 index 3f01ef9..0000000 Binary files a/public/fonts/Lato-Light.woff2 and /dev/null differ diff --git a/public/fonts/Lato-Regular.ttf b/public/fonts/Lato-Regular.ttf deleted file mode 100644 index bb2e887..0000000 Binary files a/public/fonts/Lato-Regular.ttf and /dev/null differ diff --git a/src/App.vue b/src/App.vue index 304dd89..194e7ea 100644 --- a/src/App.vue +++ b/src/App.vue @@ -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); } }, }, diff --git a/src/components/tabs/stock-list/StockWarnings.vue b/src/components/tabs/stock-list/StockWarnings.vue index 185a897..dbf3e13 100644 --- a/src/components/tabs/stock-list/StockWarnings.vue +++ b/src/components/tabs/stock-list/StockWarnings.vue @@ -1,23 +1,31 @@ @@ -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; + }, }, }); @@ -81,6 +96,10 @@ export default defineComponent({ font-weight: bold; + .lucide { + vertical-align: text-bottom; + } + a { color: black; text-decoration: underline; diff --git a/src/locales/en.json b/src/locales/en.json index 5547060..584a98d 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -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!" diff --git a/src/locales/pl.json b/src/locales/pl.json index 36cd088..845c8a6 100644 --- a/src/locales/pl.json +++ b/src/locales/pl.json @@ -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!" diff --git a/src/styles/_global.scss b/src/styles/_global.scss index 790523f..fe52510 100644 --- a/src/styles/_global.scss +++ b/src/styles/_global.scss @@ -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; } -} +} \ No newline at end of file