refactor: Footer.svelte imports APP_VERSION from $lib/version

This commit is contained in:
a2nr 2026-07-17 09:46:29 +07:00
parent 12725cbdad
commit 24db01fd8d
2 changed files with 8 additions and 1 deletions

View File

@ -1,11 +1,12 @@
<script lang="ts">
import { authIsTeacher } from '$stores/auth';
import { env } from '$env/dynamic/public';
import { APP_VERSION } from '$lib/version';
</script>
<footer class="footer">
<div class="container">
<p>&copy; {env.PUBLIC_COPYRIGHT_TEXT || `${new Date().getFullYear()} Elemes LMS`} <span class="version-badge">v16</span></p>
<p>&copy; {env.PUBLIC_COPYRIGHT_TEXT || `${new Date().getFullYear()} Elemes LMS`} <span class="version-badge">v{APP_VERSION}</span></p>
{#if $authIsTeacher}
<p><a href="/progress" class="teacher-link">Laporan Progress Siswa</a></p>
{/if}

View File

@ -0,0 +1,6 @@
/**
* Single source of truth for the app display version.
* Both Footer.svelte and service-worker.ts import from here.
* Bump this number after every feature/bugfix release.
*/
export const APP_VERSION = 16;