mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
@@ -22,6 +22,11 @@
|
|||||||
|
|
||||||
<link rel="icon" href="favicon.ico" />
|
<link rel="icon" href="favicon.ico" />
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="fa/css/fontawesome.css" />
|
||||||
|
<link rel="stylesheet" href="fa/css/brands.css" />
|
||||||
|
<link rel="stylesheet" href="fa/css/regular.css" />
|
||||||
|
<link rel="stylesheet" href="fa/css/solid.css" />
|
||||||
|
|
||||||
<!-- Static OpenGraph meta -->
|
<!-- Static OpenGraph meta -->
|
||||||
<meta name="description" content="Pomocnik maszynisty i dyżurnego symulatora Train Driver 2" />
|
<meta name="description" content="Pomocnik maszynisty i dyżurnego symulatora Train Driver 2" />
|
||||||
<meta property="og:url" content="https://stacjownik-td2.web.app/" />
|
<meta property="og:url" content="https://stacjownik-td2.web.app/" />
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "stacjownik",
|
"name": "stacjownik",
|
||||||
"version": "1.28.5",
|
"version": "1.28.6",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Vendored
+6243
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,19 @@
|
|||||||
|
/*!
|
||||||
|
* Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
|
||||||
|
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
||||||
|
* Copyright 2024 Fonticons, Inc.
|
||||||
|
*/
|
||||||
|
:root, :host {
|
||||||
|
--fa-style-family-classic: 'Font Awesome 6 Free';
|
||||||
|
--fa-font-regular: normal 400 1em/1 'Font Awesome 6 Free'; }
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Font Awesome 6 Free';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
font-display: block;
|
||||||
|
src: url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.ttf") format("truetype"); }
|
||||||
|
|
||||||
|
.far,
|
||||||
|
.fa-regular {
|
||||||
|
font-weight: 400; }
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
/*!
|
||||||
|
* Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
|
||||||
|
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
||||||
|
* Copyright 2024 Fonticons, Inc.
|
||||||
|
*/
|
||||||
|
:root, :host {
|
||||||
|
--fa-style-family-classic: 'Font Awesome 6 Free';
|
||||||
|
--fa-font-solid: normal 900 1em/1 'Font Awesome 6 Free'; }
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Font Awesome 6 Free';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 900;
|
||||||
|
font-display: block;
|
||||||
|
src: url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.ttf") format("truetype"); }
|
||||||
|
|
||||||
|
.fas,
|
||||||
|
.fa-solid {
|
||||||
|
font-weight: 900; }
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -59,7 +59,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="stock-dangers" v-if="timetable.twr || timetable.skr">
|
<div class="stock-dangers" v-if="timetable.warningNotes">
|
||||||
<div class="g-separator"></div>
|
<div class="g-separator"></div>
|
||||||
|
|
||||||
<b>{{ $t('journal.stock-dangers') }}:</b>
|
<b>{{ $t('journal.stock-dangers') }}:</b>
|
||||||
@@ -95,7 +95,11 @@
|
|||||||
<div class="g-separator"></div>
|
<div class="g-separator"></div>
|
||||||
<b>{{ $t('journal.stock-preview') }}:</b>
|
<b>{{ $t('journal.stock-preview') }}:</b>
|
||||||
|
|
||||||
<div class="stock-history" v-if="stockHistory.length > 1">
|
<div class="stock-history">
|
||||||
|
<button class="btn btn--action" @click="copyStockToClipboard()">
|
||||||
|
<i class="fa-regular fa-copy"></i> {{ $t('journal.stock-copy') }}
|
||||||
|
</button>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
v-for="(sh, i) in stockHistory"
|
v-for="(sh, i) in stockHistory"
|
||||||
:key="i"
|
:key="i"
|
||||||
@@ -128,6 +132,7 @@ import StockList from '../../Global/StockList.vue';
|
|||||||
import { API } from '../../../typings/api';
|
import { API } from '../../../typings/api';
|
||||||
import { RouteLocationRaw } from 'vue-router';
|
import { RouteLocationRaw } from 'vue-router';
|
||||||
import EntryStops from './EntryStops.vue';
|
import EntryStops from './EntryStops.vue';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: { StockList, EntryStops },
|
components: { StockList, EntryStops },
|
||||||
@@ -146,7 +151,8 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
currentHistoryIndex: 0
|
currentHistoryIndex: 0,
|
||||||
|
i18n: useI18n()
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -167,6 +173,7 @@ export default defineComponent({
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
driverRouteLocation(): RouteLocationRaw | null {
|
driverRouteLocation(): RouteLocationRaw | null {
|
||||||
if (this.timetable.terminated) return null;
|
if (this.timetable.terminated) return null;
|
||||||
return {
|
return {
|
||||||
@@ -185,6 +192,25 @@ export default defineComponent({
|
|||||||
|
|
||||||
toggleExtraInfo() {
|
toggleExtraInfo() {
|
||||||
this.$emit('toggleExtraInfo', this.timetable.id);
|
this.$emit('toggleExtraInfo', this.timetable.id);
|
||||||
|
},
|
||||||
|
|
||||||
|
copyStockToClipboard() {
|
||||||
|
const currentStockString =
|
||||||
|
this.stockHistory[this.currentHistoryIndex]?.stockString ?? this.timetable.stockString;
|
||||||
|
|
||||||
|
if (!currentStockString) {
|
||||||
|
alert(this.i18n.t('journal.stock-clipboard-failure'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
navigator.clipboard
|
||||||
|
.writeText(currentStockString)
|
||||||
|
.then(() => {
|
||||||
|
prompt(this.i18n.t('journal.stock-clipboard-success'), currentStockString);
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
alert(this.i18n.t('journal.stock-clipboard-failure'));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -221,6 +221,10 @@ export default defineComponent({
|
|||||||
.stop-name {
|
.stop-name {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #ccc;
|
color: #ccc;
|
||||||
|
|
||||||
|
i {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.stop-date {
|
.stop-date {
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
:data-minor="stop.isSBL || (stop.nameRaw.endsWith(', po') && !stop.duration)"
|
:data-minor="stop.isSBL || (stop.nameRaw.endsWith(', po') && !stop.duration)"
|
||||||
>
|
>
|
||||||
<router-link v-if="/(, podg$|<strong>)/.test(stop.nameHtml)" :to="sceneryHref">
|
<router-link v-if="/(, podg$|<strong>)/.test(stop.nameHtml)" :to="sceneryHref">
|
||||||
<span class="stop-name" v-html="stop.nameHtml"></span>
|
<b class="stop-name">{{ stop.nameRaw }}</b>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|
||||||
<span v-else class="stop-name" v-html="stop.nameHtml"></span>
|
<span v-else class="stop-name">{{ stop.nameRaw }}</span>
|
||||||
|
|
||||||
<span
|
<span
|
||||||
v-if="stop.position != 'begin'"
|
v-if="stop.position != 'begin'"
|
||||||
@@ -118,6 +118,10 @@ s {
|
|||||||
&.misc {
|
&.misc {
|
||||||
background: gray;
|
background: gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
i {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.date {
|
.date {
|
||||||
@@ -139,6 +143,10 @@ s {
|
|||||||
color: #aaa;
|
color: #aaa;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
i {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.stop {
|
.stop {
|
||||||
|
|||||||
@@ -106,12 +106,12 @@
|
|||||||
|
|
||||||
<div class="status-badges">
|
<div class="status-badges">
|
||||||
<div v-if="!train.currentStationHash" class="train-badge offline">
|
<div v-if="!train.currentStationHash" class="train-badge offline">
|
||||||
<img src="/images/icon-offline.svg" alt="offline train icon" />
|
<i class="fa-solid fa-shop-slash"></i>
|
||||||
{{ $t('trains.scenery-offline') }}
|
{{ $t('trains.scenery-offline') }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="!train.online" class="train-badge offline">
|
<div v-if="!train.online" class="train-badge offline">
|
||||||
<img src="/images/icon-offline.svg" alt="offline train icon" />
|
<i class="fa-solid fa-user-slash"></i>
|
||||||
Offline {{ lastSeenMessage(train.lastSeen) }}
|
Offline {{ lastSeenMessage(train.lastSeen) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+8
-1
@@ -423,7 +423,11 @@
|
|||||||
"driver-not-found-desc-2": "You can browse timetable history in the",
|
"driver-not-found-desc-2": "You can browse timetable history in the",
|
||||||
"driver-not-found-journal": "TIMETABLES JOURNAL",
|
"driver-not-found-journal": "TIMETABLES JOURNAL",
|
||||||
"driver-not-found-others": "Player {driver} is online as:",
|
"driver-not-found-others": "Player {driver} is online as:",
|
||||||
"driver-not-found-return": "GO BACK TO THE MAIN SITE"
|
"driver-not-found-return": "GO BACK TO THE MAIN SITE",
|
||||||
|
|
||||||
|
"stock-copy": "COPY THE STOCK",
|
||||||
|
"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! :/"
|
||||||
},
|
},
|
||||||
"train-stats": {
|
"train-stats": {
|
||||||
"stats-button": "STATISTICS",
|
"stats-button": "STATISTICS",
|
||||||
@@ -478,6 +482,9 @@
|
|||||||
|
|
||||||
"stock-dangers": "ADDITIONAL NOTES",
|
"stock-dangers": "ADDITIONAL NOTES",
|
||||||
"stock-preview": "STOCK PREVIEW",
|
"stock-preview": "STOCK PREVIEW",
|
||||||
|
"stock-copy": "COPY THE STOCK",
|
||||||
|
"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! :/",
|
||||||
|
|
||||||
"load-data": "Load further data...",
|
"load-data": "Load further data...",
|
||||||
|
|
||||||
|
|||||||
+8
-1
@@ -409,7 +409,11 @@
|
|||||||
"driver-not-found-desc-2": "Historię rozkładów jazdy możesz przejrzeć w",
|
"driver-not-found-desc-2": "Historię rozkładów jazdy możesz przejrzeć w",
|
||||||
"driver-not-found-journal": "DZIENNIKU RJ",
|
"driver-not-found-journal": "DZIENNIKU RJ",
|
||||||
"driver-not-found-others": "Gracz {driver} jest online jako:",
|
"driver-not-found-others": "Gracz {driver} jest online jako:",
|
||||||
"driver-not-found-return": "WRÓĆ NA STRONĘ GŁÓWNĄ"
|
"driver-not-found-return": "WRÓĆ NA STRONĘ GŁÓWNĄ",
|
||||||
|
|
||||||
|
"stock-copy": "SKOPIUJ SKŁAD",
|
||||||
|
"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! :/"
|
||||||
},
|
},
|
||||||
"train-stats": {
|
"train-stats": {
|
||||||
"stats-button": "STATYSTYKI",
|
"stats-button": "STATYSTYKI",
|
||||||
@@ -462,6 +466,9 @@
|
|||||||
|
|
||||||
"stock-dangers": "DODATKOWE UWAGI",
|
"stock-dangers": "DODATKOWE UWAGI",
|
||||||
"stock-preview": "PODGLĄD SKŁADU",
|
"stock-preview": "PODGLĄD SKŁADU",
|
||||||
|
"stock-copy": "SKOPIUJ SKŁAD",
|
||||||
|
"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! :/",
|
||||||
|
|
||||||
"load-data": "Pobierz dalszą historię...",
|
"load-data": "Pobierz dalszą historię...",
|
||||||
|
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ a.a-button {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: #424242;
|
background-color: #505050;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:disabled {
|
&:disabled {
|
||||||
|
|||||||
@@ -24,9 +24,12 @@
|
|||||||
|
|
||||||
<div class="train-card">
|
<div class="train-card">
|
||||||
<TrainInfo :train="chosenTrain" :extended="true" />
|
<TrainInfo :train="chosenTrain" :extended="true" />
|
||||||
<div style="margin-top: 1em">
|
|
||||||
<StockList :trainStockList="chosenTrain.stockList" />
|
<button class="btn btn--action" style="margin: 1em 0" @click="copyStockToClipboard()">
|
||||||
</div>
|
<i class="fa-regular fa-copy"></i> {{ $t('trains.stock-copy') }}
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<StockList :trainStockList="chosenTrain.stockList" />
|
||||||
<TrainSchedule :train="chosenTrain" />
|
<TrainSchedule :train="chosenTrain" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -79,6 +82,7 @@ import { useMainStore } from '../store/mainStore';
|
|||||||
import { useApiStore } from '../store/apiStore';
|
import { useApiStore } from '../store/apiStore';
|
||||||
import { Status } from '../typings/common';
|
import { Status } from '../typings/common';
|
||||||
import { regions as regionsJSON } from '../data/options.json';
|
import { regions as regionsJSON } from '../data/options.json';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
trainId: {
|
trainId: {
|
||||||
@@ -93,6 +97,8 @@ const props = defineProps({
|
|||||||
const mainStore = useMainStore();
|
const mainStore = useMainStore();
|
||||||
const apiStore = useApiStore();
|
const apiStore = useApiStore();
|
||||||
|
|
||||||
|
const i18n = useI18n();
|
||||||
|
|
||||||
const chosenTrain = computed(() =>
|
const chosenTrain = computed(() =>
|
||||||
mainStore.trainList.find((train) => train.id == props.trainId || train.modalId == props.modalId)
|
mainStore.trainList.find((train) => train.id == props.trainId || train.modalId == props.modalId)
|
||||||
);
|
);
|
||||||
@@ -104,6 +110,24 @@ const otherDriverTrains = computed(() => {
|
|||||||
(train.timetableData || train.online || train.lastSeen >= Date.now() - 60000)
|
(train.timetableData || train.online || train.lastSeen >= Date.now() - 60000)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function copyStockToClipboard() {
|
||||||
|
const stockString = chosenTrain.value?.stockList.join(';');
|
||||||
|
|
||||||
|
if (!stockString) {
|
||||||
|
alert(i18n.t('trains.stock-clipboard-failure'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
navigator.clipboard
|
||||||
|
.writeText(stockString)
|
||||||
|
.then(() => {
|
||||||
|
prompt(i18n.t('trains.stock-clipboard-success'), stockString);
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
alert(i18n.t('trains.stock-clipboard-failure'));
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user