Update StatusBox to display app version and adjust refresh intervals
Add a new element in StatusBox.vue to show the application version. Update the refresh interval for status display from every 0.5 seconds to every 1 second for improved performance. Increment mobile app version to 0.8.0-alpha8 and version code to 9. Introduce new VersionScreen in the mobile app for displaying version information, and update navigation and mock data accordingly.
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
<span class="value" v-if="value !== null">{{ value || '—' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="status-version">TimeClock v{{ appVersion }}</div>
|
||||
</div>
|
||||
<div class="status-box loading" v-else>
|
||||
Lädt…
|
||||
@@ -40,8 +41,10 @@ import { onMounted, onBeforeUnmount, ref, computed } from 'vue'
|
||||
import { useTimeStore } from '../stores/timeStore'
|
||||
import { useAuthStore } from '../stores/authStore'
|
||||
import { API_BASE_URL } from '@/config/api'
|
||||
import { APP_VERSION } from '@/config/version'
|
||||
|
||||
const API_URL = API_BASE_URL
|
||||
const appVersion = APP_VERSION
|
||||
const timeStore = useTimeStore()
|
||||
const authStore = useAuthStore()
|
||||
const stats = ref({})
|
||||
@@ -389,11 +392,11 @@ onMounted(async () => {
|
||||
await refreshStatusData()
|
||||
}, 60000)
|
||||
|
||||
// Anzeige 2x pro Sekunde aktualisieren (nur Berechnung, keine Server-Requests)
|
||||
// Anzeige jede Sekunde aktualisieren (nur Berechnung, keine Server-Requests)
|
||||
displayUpdateInterval = setInterval(() => {
|
||||
updateCurrentlyWorkedTime()
|
||||
updateOpenTime()
|
||||
}, 500)
|
||||
}, 1000)
|
||||
|
||||
// Event-Listener für Login
|
||||
window.addEventListener('login-completed', handleLoginCompleted)
|
||||
@@ -584,4 +587,13 @@ const displayRows = computed(() => {
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.status-version {
|
||||
margin-top: 8px;
|
||||
padding-top: 6px;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
color: #888;
|
||||
}
|
||||
</style>
|
||||
|
||||
2
frontend/src/config/version.js
Normal file
2
frontend/src/config/version.js
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Sichtbare Web-App-Version (synchron mit package.json). */
|
||||
export const APP_VERSION = '3.0.0'
|
||||
Reference in New Issue
Block a user