From 329c85b85830407dd83fe06810473dcf9bd4b366 Mon Sep 17 00:00:00 2001 From: Spythere Date: Mon, 16 Feb 2026 02:16:22 +0100 Subject: [PATCH] refactor(journal): fetching heavy timetable details separately on demand --- .../JournalTimetables/EntryDetails.vue | 390 ++++++++++-------- .../JournalTimetables/EntryGeneral.vue | 2 +- .../JournalTimetables/EntryStatus.vue | 2 +- .../JournalTimetableEntry.vue | 72 +--- .../JournalTimetablesList.vue | 2 +- src/typings/api.ts | 100 +++-- src/views/JournalTimetables.vue | 41 +- 7 files changed, 296 insertions(+), 313 deletions(-) diff --git a/src/components/JournalView/JournalTimetables/EntryDetails.vue b/src/components/JournalView/JournalTimetables/EntryDetails.vue index 996fbdb..c4ec0ac 100644 --- a/src/components/JournalView/JournalTimetables/EntryDetails.vue +++ b/src/components/JournalView/JournalTimetables/EntryDetails.vue @@ -19,209 +19,243 @@
- +
+ -
- -
- - {{ $t('journal.dispatcher-name') }} - {{ timetable.authorName }} - - - - {{ $t('journal.stock-timetable-speed') }} - {{ timetable.trainMaxSpeed }}km/h - - - - {{ $t('journal.stock-max-speed') }} - {{ timetable.maxSpeed }}km/h - -
- -
- {{ $t('journal.stock-dangers') }}: - -
    -
  • - {{ $t('warnings.TWR') }} (TWR) -
  • - -
  • - {{ $t('warnings.SKR') }} -
  • - -
  • - {{ $t('warnings.TN') }} -
  • - -
  • - {{ $t('warnings.PN') }} -
  • -
- -
-

{{ $t('warnings.header-title') }}

-

- {{ timetable.warningNotes }} -

-
-
- - -
-
- - {{ $t('journal.stock-preview') }}: - -
- - {{ $t('journal.stock-length') }} - - {{ - currentHistoryIndex == 0 - ? timetable.stockLength - : stockHistory[currentHistoryIndex].stockLength || timetable.stockLength - }}m - +
+ + {{ $t('journal.dispatcher-name') }} + {{ timetableDetails.authorName }} - - {{ $t('journal.stock-mass') }} - - {{ - Math.floor( - (currentHistoryIndex == 0 - ? timetable.stockMass - : stockHistory[currentHistoryIndex].stockMass || timetable.stockMass) / 1000 - ) - }}t - + + {{ $t('journal.stock-timetable-speed') }} + {{ timetableDetails.trainMaxSpeed }}km/h + + + + {{ $t('journal.stock-max-speed') }} + {{ timetableDetails.maxSpeed }}km/h
-
- +
+
- + {{ $t('journal.stock-dangers') }}: + +
    +
  • + {{ $t('warnings.TWR') }} (TWR) +
  • + +
  • + {{ $t('warnings.SKR') }} +
  • + +
  • + {{ $t('warnings.TN') }} +
  • + +
  • + {{ $t('warnings.PN') }} +
  • +
+ +
+

{{ $t('warnings.header-title') }}

+

+ {{ timetableDetails.warningNotes }} +

+
-
- + +
+
+ + {{ $t('journal.stock-preview') }}: + +
+ + {{ $t('journal.stock-length') }} + + {{ + currentHistoryIndex == 0 + ? timetableDetails.stockLength + : stockHistory[currentHistoryIndex].stockLength || timetableDetails.stockLength + }}m + + + + + {{ $t('journal.stock-mass') }} + + {{ + Math.floor( + (currentHistoryIndex == 0 + ? timetableDetails.stockMass + : stockHistory[currentHistoryIndex].stockMass || timetableDetails.stockMass) / + 1000 + ) + }}t + + +
+ +
+ + + +
+ +
+ +
-