Skip to content

Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.

feat: add GitHub link with onclick handler to open author's profile

Tonho9944f967e9f9
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index 63c5ecb4..4bf1ce20 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -6,9 +6,15 @@
import { getActiveCount } from "$lib/stores/download-store.svelte";
import { loadSettings } from "$lib/stores/settings-store.svelte";
import Toast from "$components/toast/Toast.svelte";
+ import { open } from "@tauri-apps/plugin-shell";
import { t, locale, loadTranslations, defaultLocale } from "$lib/i18n";
import type { Snippet } from "svelte";
+ async function openAuthorGithub(e: Event) {
+ e.preventDefault();
+ await open("https://github.com/tonhowtf");
+ }
+
let activeCount = $derived(getActiveCount());
let { children }: { children: Snippet } = $props();
@@ -78,6 +84,14 @@
<main class="content">
{@render children()}
+ <a
+ href="https://github.com/tonhowtf"
+ class="watermark"
+ onclick={openAuthorGithub}
+ title="@tonhowtf"
+ >
+ @tonhowtf
+ </a>
</main>
</div>
@@ -170,4 +184,25 @@
padding: calc(var(--padding) * 2);
box-shadow: inset 1px 0 0 0 var(--content-border);
}
+
+ .watermark {
+ position: fixed;
+ bottom: 8px;
+ right: 12px;
+ font-size: 10px;
+ font-weight: 400;
+ color: var(--gray);
+ opacity: 0.3;
+ pointer-events: auto;
+ cursor: pointer;
+ z-index: 1;
+ user-select: none;
+ transition: opacity 0.15s;
+ }
+
+ @media (hover: hover) {
+ .watermark:hover {
+ opacity: 0.7;
+ }
+ }
</style>