Skip to content

Commit 6be0774

Browse files
authored
Display versions: Add new version notification in footer (#101)
* feat: Add new version notification in footer This commit implements a system to check for new application versions and notify the user. On page load, the server-side code now fetches the latest release from the GitHub repository API. It uses `semver` to compare the current application version with the latest release tag. If a newer version is available, an alert is displayed in the footer with a link to the release page. The current application version is also now displayed in the footer. The version check is cached for one hour to minimize API requests. * Modify version notification * current version 0.3.1 * Resolve conflicts * Code formatting --------- Co-authored-by: Wayne <5291640+ringoinca@users.noreply.github.com>
1 parent 4a23f8f commit 6be0774

File tree

5 files changed

+305
-301
lines changed

5 files changed

+305
-301
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "open-archiver",
3-
"version": "0.3.0",
3+
"version": "0.3.1",
44
"private": true,
55
"scripts": {
66
"dev": "dotenv -- pnpm --filter \"./packages/*\" --parallel dev",

packages/frontend/src/lib/components/custom/EmailPreview.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,16 @@
5252

5353
<div class="mt-2 rounded-md border bg-white p-4">
5454
{#if isLoading}
55-
<p>{$t('components.email_preview.loading')}</p>
55+
<p>{$t('app.components.email_preview.loading')}</p>
5656
{:else if emailHtml}
5757
<iframe
58-
title={$t('archive.email_preview')}
58+
title={$t('app.archive.email_preview')}
5959
srcdoc={emailHtml()}
6060
class="h-[600px] w-full border-none"
6161
></iframe>
6262
{:else if raw}
63-
<p>{$t('components.email_preview.render_error')}</p>
63+
<p>{$t('app.components.email_preview.render_error')}</p>
6464
{:else}
65-
<p class="text-gray-500">{$t('components.email_preview.not_available')}</p>
65+
<p class="text-gray-500">{$t('app.components.email_preview.not_available')}</p>
6666
{/if}
6767
</div>

packages/frontend/src/lib/components/custom/Footer.svelte

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@
1515
<Alert.Title class="flex items-center gap-2">
1616
<Info class="h-4 w-4" />
1717
{$t('app.components.footer.new_version_available')}
18-
</Alert.Title>
19-
<Alert.Description>
20-
<a href={newVersionInfo.url} target="_blank" class="underline">
18+
<a
19+
href={newVersionInfo.url}
20+
target="_blank"
21+
class=" text-muted-foreground underline"
22+
>
2123
{newVersionInfo.description}
2224
</a>
23-
</Alert.Description>
25+
</Alert.Title>
2426
</Alert.Root>
2527
{/if}
2628
<p class="text-balance text-center text-xs font-medium leading-loose">

0 commit comments

Comments
 (0)