Skip to content

Modern Docker Management, Designed for Everyone

fix: update banner link not clickable

Kyle Mendell69e95e0457f5
diff --git a/frontend/src/lib/components/sidebar/sidebar-updatebanner.svelte b/frontend/src/lib/components/sidebar/sidebar-updatebanner.svelte
index 93af0ea28..a971d216f 100644
--- a/frontend/src/lib/components/sidebar/sidebar-updatebanner.svelte
+++ b/frontend/src/lib/components/sidebar/sidebar-updatebanner.svelte
@@ -6,6 +6,7 @@
import { useSidebar } from '$lib/components/ui/sidebar/index.js';
import type { AppVersionInformation } from '$lib/types/application-configuration';
import { m } from '$lib/paraglide/messages';
+ import { Button } from '$lib/components/ui/button/index.js';
let {
isCollapsed,
@@ -17,6 +18,8 @@
updateAvailable?: boolean;
} = $props();
+ console.log(versionInformation);
+
const sidebar = useSidebar();
</script>
@@ -28,7 +31,8 @@
<div
class="rounded-xl border border-blue-500/20 bg-gradient-to-br from-blue-500/10 to-blue-600/5 p-3 transition-all hover:scale-[1.02] hover:from-blue-500/15 hover:to-blue-600/10 hover:shadow-md"
>
- <a
+ <Button
+ variant="link"
href={versionInformation?.releaseUrl}
target="_blank"
rel="noopener noreferrer"
@@ -41,7 +45,7 @@
>
</div>
<ExternalLink size={16} class="transition-transform duration-200 group-hover:scale-110" />
- </a>
+ </Button>
</div>
{:else}
<div class="flex justify-center">
diff --git a/frontend/src/lib/services/app-version-service.ts b/frontend/src/lib/services/app-version-service.ts
index adba81aee..4be23eeab 100644
--- a/frontend/src/lib/services/app-version-service.ts
+++ b/frontend/src/lib/services/app-version-service.ts
@@ -6,6 +6,11 @@ export class AppVersionService {
private lastFetchTime: number = 0;
private readonly cacheExpiry = 1000 * 60 * 60 * 3; // 3 hours
+ private getReleaseUrl(version?: string): string {
+ if (!version) return 'https://github.com/ofkm/arcane/releases/latest';
+ return `https://github.com/ofkm/arcane/releases/tag/v${version}`;
+ }
+
getCurrentVersion(): string {
return currentVersion;
}
@@ -39,12 +44,16 @@ export class AppVersionService {
this.cachedVersionInfo = {
currentVersion: this.getCurrentVersion(),
newestVersion,
- updateAvailable: !isUpToDate
+ updateAvailable: !isUpToDate,
+ releaseUrl: this.getReleaseUrl(newestVersion)
};
this.lastFetchTime = Date.now();
} catch (error) {
console.error('Error fetching version information:', error);
- return { currentVersion: this.getCurrentVersion() };
+ return {
+ currentVersion: this.getCurrentVersion(),
+ releaseUrl: this.getReleaseUrl()
+ };
}
}