Skip to content

Commit

Permalink
changelog changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaibu committed Jun 7, 2024
1 parent a3278fa commit bda4a6c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/UI.vue
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
<v-window v-model="tab" class="h-100">
<!-- Home -->
<v-window-item :value="0">
<home-window :changelogs="api_data.changelogs" :news="news" @switch-tab="switchTab(3)"></home-window>
<home-window :changelogs="api_data.changelogs.slice(0, 1)" :news="news" @switch-tab="switchTab(3)"></home-window>
</v-window-item>
<!-- Mods -->
<v-window-item :value="1">
Expand All @@ -183,7 +183,7 @@

<!-- Changelogs -->
<v-window-item :value="3">
<changelog-window :changelogs="api_data.changelogs"></changelog-window>
<changelog-window :changelogs="api_data.changelogs.slice(0, 15)"></changelog-window>
</v-window-item>

<!-- Tfar -->
Expand Down
18 changes: 16 additions & 2 deletions src/components/ChangelogWindow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
</v-list-item-title>
</v-list-item>
</v-list>
<v-card-actions>
<v-btn @click="openURL('https://info.panthor.de/changelog')" block color="primary" variant="outlined" prepend-icon="mdi-open-in-new">Alle Changelogs</v-btn>
</v-card-actions>
</v-card>
</v-col>
<v-col cols="9" style="overflow-y: scroll" :style="{ 'max-height': `${scroll_height-88}px` }" id="scrollContainer">
Expand All @@ -27,8 +30,12 @@
year: '2-digit',
})} - ${new Date(changelog.release_at).toLocaleTimeString([], { hour: '2-digit' })}` }}</span>
</v-card-title>
<v-card-text v-if="changelog.note">
<v-code>{{ changelog.note }}</v-code>
</v-card-text>
<v-card-subtitle v-if="changelog.change_mission.length > 0"><v-icon icon="mdi-map"></v-icon>
Mission</v-card-subtitle>
Mission <span v-if="changelog.size" class="float-end text-primary"><v-icon icon="mdi-file-download"></v-icon>
{{ changelog.size }} Download</span></v-card-subtitle>
<v-card-text v-if="changelog.change_mission.length > 0">
<v-list density="compact" class="pt-0">
<v-list-item v-for="change in changelog.change_mission">
Expand Down Expand Up @@ -60,6 +67,8 @@

<script lang="ts">
import Changelog from '@/interfaces/ChangelogInterface';
import PanthorUtils from '@/services/PanthorUtils.service';
import { shell } from 'electron';
import { useGoTo } from 'vuetify'
export default {
Expand All @@ -72,7 +81,9 @@ export default {
return { goTo }
},
data() {
return {};
return {
human_file_size: PanthorUtils.humanFileSize,
};
},
methods: {
scrollTo(target: string) {
Expand Down Expand Up @@ -101,6 +112,9 @@ export default {
formatChangeText(change: string) {
return change.replace("Hinzugefügt:", "").replace("Behoben:", "").replace("Bearbeitet:", "").replace("Entfernt:", "");
},
openURL(url: string) {
shell.openExternal(url);
},
},
computed: {
scroll_height: () => {
Expand Down

0 comments on commit bda4a6c

Please sign in to comment.