diff --git a/.prettierrc b/.prettierrc index 6b858bb..98f86c2 100644 --- a/.prettierrc +++ b/.prettierrc @@ -3,5 +3,5 @@ "tabWidth": 2, "singleQuote": true, "printWidth": 100, - "trailingComma": "none" + "trailingComma": "none", } diff --git a/src/components/DriverView/DriverTrainCard.vue b/src/components/DriverView/DriverTrainCard.vue index b2ff25a..8699859 100644 --- a/src/components/DriverView/DriverTrainCard.vue +++ b/src/components/DriverView/DriverTrainCard.vue @@ -1,73 +1,323 @@ \ No newline at end of file + +.propositions-container { + margin-bottom: 1em; + padding: 0.5em; + background-color: #111; +} + +.categories-select { + display: inline-flex; + flex-wrap: wrap; + gap: 0.5em; + + position: relative; + + &::after { + content: ''; + position: absolute; + bottom: calc(-0.5em); + left: 0; + + width: 100%; + height: 2px; + background-color: #aaa; + } +} + +.propositions-numbers { + margin-top: 1em; +} + +.no-propositions { + margin-top: 1em; + color: #ccc; +} + +@include responsive.smallScreen { + .propositions-container { + text-align: center; + } + + .categories-select { + justify-content: center; + } +} + diff --git a/src/data/trainNumberRules.json b/src/data/trainNumberRules.json new file mode 100644 index 0000000..5da466e --- /dev/null +++ b/src/data/trainNumberRules.json @@ -0,0 +1,65 @@ +{ + "regionNumbers": { + "Warszawa (1)": 1, + "Lublin (2)": 2, + "Kraków (3)": 3, + "Sosnowiec (4)": 4, + "Gdańsk (5)": 5, + "Wrocław (6)": 6, + "Poznań (7)": 7, + "Szczecin (8)": 8, + "Rezerwa (9)": 9 + }, + "sameRegions": { + "Losowy": [ + 10, 11, 19, 91, 93, 97, 99, 20, 22, 29, 30, 33, 39, 40, 44, 49, 94, 50, 55, 59, 90, 95, 96, + 66, 60, 69, 77, 70, 79, 88, 80, 89, 92, 98 + ], + "Warszawa (1)": [10, 11, 19, 91, 93, 97, 99], + "Lublin (2)": [20, 22, 29], + "Kraków (3)": [30, 33, 39], + "Sosnowiec (4)": [40, 44, 49, 94], + "Gdańsk (5)": [50, 55, 59, 90, 95, 96], + "Wrocław (6)": [66, 60, 69], + "Poznań (7)": [77, 70, 79], + "Szczecin (8)": [88, 80], + "Rezerwa (9)": [89, 92, 98] + }, + "categoriesRules": { + "EI": [null, "00", "99"], + "EC": [null, "000", "049"], + "EN": [null, "000", "049"], + + "RO": [null, "200", "999"], + "RP": [null, "050", "169"], + "RM": [null, "200", "999"], + "RA": [null, "200", "999"], + + "MO": [null, "200", "999"], + "MP": [null, "050", "169"], + "MM": [null, "001", "049"], + "MH": [null, "170", "199"], + + "PW": ["6", "000", "899"], + "PX": ["6", "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"], + "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"], + "ZU": ["9", "000", "899"] + } + } + \ No newline at end of file diff --git a/src/locales/en.json b/src/locales/en.json index 8915420..c4bcd13 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -395,9 +395,15 @@ "driver-not-found-others": "Player {driver} is online as:", "driver-not-found-return": "GO BACK TO THE MAIN SITE", "stock-copy": "COPY THE STOCK", - "number-propositions": "PROPOSE NUMBERS", + "number-propositions": "PROPOSE NUMBER", "stock-clipboard-success": "Successfully copied the railway stock in a text form to your clipboard!", - "stock-clipboard-failure": "Oops! Something happened and the railway stock couldn't be copied to your clipboard! :/" + "stock-clipboard-failure": "Oops! Something happened and the railway stock couldn't be copied to your clipboard! :/", + + "number-propositions-header": "Generate number examples for selected category:", + "number-propositions-third-number": "Third digit:", + "number-propositions-last-nums": "{count} last digits from the range of:", + "number-propositions-title": "Propositions:", + "number-propositions-empty": "No propositions available for the chosen category! :/" }, "train-stats": { "stats-button": "STATISTICS", diff --git a/src/locales/pl.json b/src/locales/pl.json index 13034c0..3cc127a 100644 --- a/src/locales/pl.json +++ b/src/locales/pl.json @@ -382,9 +382,16 @@ "driver-not-found-others": "Gracz {driver} jest online jako:", "driver-not-found-return": "WRÓĆ NA STRONĘ GŁÓWNĄ", "stock-copy": "SKOPIUJ SKŁAD", - "number-propositions": "ZAPROPONUJ NUMERY", + "number-propositions": "ZAPROPONUJ NUMER", "stock-clipboard-success": "Pomyślnie skopiowano skład w postaci tekstowej do schowka!", - "stock-clipboard-failure": "Ups! Nie udało się skopiować składu do schowka! :/" + "stock-clipboard-failure": "Ups! Nie udało się skopiować składu do schowka! :/", + + "number-propositions-header": "Wygeneruj propozycje numerów dla kategorii pociągu:", + "number-propositions-third-number": "Trzecia cyfra:", + "number-propositions-last-nums": "{count} ostatnie cyfry z przedziału:", + "number-propositions-title": "Propozycje:", + "number-propositions-empty": "Brak propozycji dla wybranej kategorii! :/" + }, "train-stats": { "stats-button": "STATYSTYKI",