mirror of
https://github.com/Spythere/srjp-td2.git
synced 2026-05-03 13:38:12 +00:00
chore: timetable warnings; locale test
This commit is contained in:
@@ -1,13 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<main class="grid print:block p-3 mx-auto max-w-[800px] h-screen grid-rows-[auto_1fr_20px] gap-1">
|
<main class="grid print:block p-3 mx-auto max-w-[800px] h-screen grid-rows-[auto_auto_1fr] gap-1">
|
||||||
<TimetableSelect />
|
<TimetableSelect />
|
||||||
|
<TimetableWarnings />
|
||||||
<TrainTimetable />
|
<TrainTimetable />
|
||||||
<MainBottom />
|
<!-- <MainBottom /> -->
|
||||||
</main>
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import TimetableSelect from '../Timetable/TimetableSelect.vue';
|
import TimetableSelect from '../Timetable/TimetableSelect.vue';
|
||||||
|
import TimetableWarnings from "../Timetable/TimetableWarnings.vue";
|
||||||
import TrainTimetable from '../Timetable/TrainTimetable.vue';
|
import TrainTimetable from '../Timetable/TrainTimetable.vue';
|
||||||
import MainBottom from './MainBottom.vue';
|
// import MainBottom from './MainBottom.vue';
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<template>
|
||||||
|
<div
|
||||||
|
class="my-2 print:hidden"
|
||||||
|
v-if="globalStore.currentTimetableData && (globalStore.timetableWarnings || globalStore.currentTimetableData.savedTimestamp)"
|
||||||
|
>
|
||||||
|
<div v-if="globalStore.currentTimetableData?.savedTimestamp" class="flex justify-between p-1 bg-zinc-900">
|
||||||
|
<div>
|
||||||
|
{{ $t('storage-preview-text') }}
|
||||||
|
<b>#{{ globalStore.currentTimetableData.timetableId }}</b>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button class="font-bold" @click="globalStore.selectedStorageTimetable = null">
|
||||||
|
<ArrowUturnLeftIcon class="text-white size-6" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ArrowUturnLeftIcon } from '@heroicons/vue/16/solid';
|
||||||
|
import { useGlobalStore } from '../../stores/global.store';
|
||||||
|
|
||||||
|
const globalStore = useGlobalStore();
|
||||||
|
</script>
|
||||||
@@ -4,14 +4,6 @@
|
|||||||
v-if="globalStore.currentTimetableData != null"
|
v-if="globalStore.currentTimetableData != null"
|
||||||
class="overflow-auto p-1 bg-white print:bg-white dark:bg-zinc-950 print:text-black text-black dark:text-white min-h-full"
|
class="overflow-auto p-1 bg-white print:bg-white dark:bg-zinc-950 print:text-black text-black dark:text-white min-h-full"
|
||||||
>
|
>
|
||||||
<div class="p-1 bg-zinc-900 my-2 print:hidden flex justify-between" v-if="globalStore.currentTimetableData.savedTimestamp">
|
|
||||||
<div>
|
|
||||||
Przeglądasz teraz zapisany rozkład jazdy o ID: <b>#{{ globalStore.currentTimetableData.timetableId }}</b>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<button class="font-bold" @click="globalStore.selectedStorageTimetable = null">Powróć do listy</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div class="p-1 font-bold w-max">
|
<div class="p-1 font-bold w-max">
|
||||||
{{ globalStore.currentTimetableData.category }} {{ globalStore.currentTimetableData.trainNo }} Relacja
|
{{ globalStore.currentTimetableData.category }} {{ globalStore.currentTimetableData.trainNo }} Relacja
|
||||||
@@ -37,7 +29,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from 'vue';``
|
import { computed } from 'vue';
|
||||||
|
``;
|
||||||
import { useApiStore } from '../../stores/api.store';
|
import { useApiStore } from '../../stores/api.store';
|
||||||
import { useGlobalStore } from '../../stores/global.store';
|
import { useGlobalStore } from '../../stores/global.store';
|
||||||
import TimetableBody from './TimetableBody.vue';
|
import TimetableBody from './TimetableBody.vue';
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ import localePL from './locales/pl.json';
|
|||||||
import localeEN from './locales/en.json';
|
import localeEN from './locales/en.json';
|
||||||
|
|
||||||
const i18n = createI18n({
|
const i18n = createI18n({
|
||||||
locale: 'pl',
|
locale: 'en',
|
||||||
fallbackLocale: 'pl',
|
fallbackLocale: 'pl',
|
||||||
legacy: false,
|
legacy: false,
|
||||||
|
|
||||||
|
|||||||
+4
-1
@@ -1 +1,4 @@
|
|||||||
{}
|
{
|
||||||
|
"storage-preview-text": "You're browsing now the saved timetable with ID:",
|
||||||
|
"storage-preview-button-text": "Return"
|
||||||
|
}
|
||||||
+4
-1
@@ -1 +1,4 @@
|
|||||||
{}
|
{
|
||||||
|
"storage-preview-text": "Przeglądasz teraz zapisany rozkład jazdy o ID:",
|
||||||
|
"storage-preview-button-text": "Powróć"
|
||||||
|
}
|
||||||
@@ -10,9 +10,10 @@ export const useGlobalStore = defineStore('global', {
|
|||||||
|
|
||||||
selectedActiveTrain: null as ActiveTrain | null,
|
selectedActiveTrain: null as ActiveTrain | null,
|
||||||
selectedStorageTimetable: null as TimetableData | null,
|
selectedStorageTimetable: null as TimetableData | null,
|
||||||
|
|
||||||
storageTimetables: {} as Record<number, TimetableData>,
|
storageTimetables: {} as Record<number, TimetableData>,
|
||||||
|
|
||||||
|
timetableWarnings: [] as string[],
|
||||||
|
|
||||||
generatedDate: null as Date | null,
|
generatedDate: null as Date | null,
|
||||||
generatedMs: 0,
|
generatedMs: 0,
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user