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 download stats display and enhance about page with version info and external links

Tonhof5c2726e85f8
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index c48f424d..8ea50339 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -191,6 +191,8 @@
let key: string;
if (mascotEmotion === "complete") key = "complete";
else if (mascotEmotion === "queue") key = "queue";
+ else if (mascotEmotion === "downloading") key = "downloading";
+ else if (mascotEmotion === "stalled") key = "stalled";
else {
switch (omniState.kind) {
case "idle": key = "idle"; break;
diff --git a/src/routes/about/+page.svelte b/src/routes/about/+page.svelte
index d641bb47..45217075 100644
--- a/src/routes/about/+page.svelte
+++ b/src/routes/about/+page.svelte
@@ -1,5 +1,12 @@
<script lang="ts">
import { t } from "$lib/i18n";
+ import { getVersion } from "@tauri-apps/api/app";
+
+ let version = $state("");
+
+ $effect(() => {
+ getVersion().then(v => { version = v; }).catch(() => {});
+ });
</script>
<div class="about-page">
@@ -7,13 +14,32 @@
<img src="/loop.png" alt="Loop" class="about-loop" draggable="false" />
<h1>OmniGet</h1>
<p class="about-tagline">{$t("about.tagline")}</p>
+ <p class="about-desc">{$t("about.description")}</p>
+ {#if version}
+ <span class="about-version">{$t("about.version")} {version}</span>
+ {/if}
</div>
<div class="about-links">
- <a href="/about/project" class="about-link">{$t("about.project")}</a>
- <a href="/about/changelog" class="about-link">{$t("about.changelog")}</a>
- <a href="/about/terms" class="about-link">{$t("about.terms")}</a>
- <a href="/about/roadmap" class="about-link">{$t("about.roadmap")}</a>
+ <a href="/about/project" class="about-link">{$t("about.tab.project")}</a>
+ <a href="/about/changelog" class="about-link">{$t("about.tab.changelog")}</a>
+ <a href="/about/terms" class="about-link">{$t("about.tab.terms")}</a>
+ <a href="/about/roadmap" class="about-link">{$t("about.tab.roadmap")}</a>
+ </div>
+
+ <div class="about-external">
+ <a href="https://github.com/tonhowtf/omniget" target="_blank" rel="noopener" class="about-ext-link">
+ <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
+ <path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"/>
+ </svg>
+ {$t("about.star_button")}
+ </a>
+ <a href="https://discord.gg/jgdxyPy7Vn" target="_blank" rel="noopener" class="about-ext-link">
+ <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
+ <path d="M18.9 5.3a16.6 16.6 0 0 0-4.1-1.3 12.2 12.2 0 0 0-.5 1.1 15.4 15.4 0 0 0-4.6 0A12.2 12.2 0 0 0 9.2 4a16.6 16.6 0 0 0-4.1 1.3A17.3 17.3 0 0 0 2 17.2a16.7 16.7 0 0 0 5.1 2.6 12.5 12.5 0 0 0 1.1-1.8 10.8 10.8 0 0 1-1.7-.8l.4-.3a11.9 11.9 0 0 0 10.2 0l.4.3a10.8 10.8 0 0 1-1.7.8 12.5 12.5 0 0 0 1.1 1.8 16.7 16.7 0 0 0 5.1-2.6A17.3 17.3 0 0 0 18.9 5.3zM8.7 14.8c-1 0-1.8-.9-1.8-2s.8-2 1.8-2 1.8.9 1.8 2-.8 2-1.8 2zm6.6 0c-1 0-1.8-.9-1.8-2s.8-2 1.8-2 1.8.9 1.8 2-.8 2-1.8 2z"/>
+ </svg>
+ Discord
+ </a>
</div>
<p class="about-credit">{$t("about.credit")}</p>
@@ -57,6 +83,21 @@
margin: 0;
}
+ .about-desc {
+ font-size: 13px;
+ color: var(--secondary);
+ margin: 0;
+ max-width: 340px;
+ }
+
+ .about-version {
+ font-size: 12px;
+ color: var(--tertiary);
+ background: var(--button);
+ padding: 3px 10px;
+ border-radius: var(--border-radius);
+ }
+
.about-links {
display: flex;
flex-wrap: wrap;
@@ -79,6 +120,34 @@
background: var(--button-hover);
}
+ .about-external {
+ display: flex;
+ gap: 12px;
+ justify-content: center;
+ }
+
+ .about-ext-link {
+ display: flex;
+ align-items: center;
+ gap: 6px;
+ padding: 6px 14px;
+ background: var(--button-elevated);
+ border: 1px solid var(--button-stroke);
+ border-radius: var(--border-radius);
+ color: var(--secondary);
+ font-size: 13px;
+ text-decoration: none;
+ transition: background 0.15s ease;
+ }
+
+ .about-ext-link:hover {
+ background: var(--button-hover);
+ }
+
+ .about-ext-link svg {
+ flex-shrink: 0;
+ }
+
.about-credit {
font-size: 12px;
color: var(--tertiary);
diff --git a/src/routes/downloads/+page.svelte b/src/routes/downloads/+page.svelte
index cbd6a7ee..b3b0cb81 100644
--- a/src/routes/downloads/+page.svelte
+++ b/src/routes/downloads/+page.svelte
@@ -11,6 +11,7 @@
type CourseDownloadItem,
type GenericDownloadItem,
} from "$lib/stores/download-store.svelte";
+ import { getDownloadStats } from "$lib/stores/download-stats.svelte";
import PlatformIcon from "$components/icons/PlatformIcon.svelte";
import Mascot from "$components/mascot/Mascot.svelte";
import ContextHint from "$components/hints/ContextHint.svelte";
@@ -48,6 +49,7 @@
let hasDownloads = $derived(courseList.length > 0 || genericList.length > 0);
let finishedCount = $derived(getFinishedCount());
+ let dlStats = $derived(getDownloadStats());
async function cancelDownload(courseId: number) {
try {
@@ -139,7 +141,12 @@
{#if hasDownloads}
<div class="downloads-page">
<div class="downloads-header">
- <h2>{$t('downloads.title')}</h2>
+ <div class="downloads-title-row">
+ <h2>{$t('downloads.title')}</h2>
+ {#if dlStats.totalDownloads > 0}
+ <span class="downloads-stats">{$t('downloads.stats_line', { count: String(dlStats.totalDownloads), size: formatBytes(dlStats.totalBytes) })}</span>
+ {/if}
+ </div>
{#if finishedCount > 0}
<button class="clear-btn" onclick={clearFinished}>
{$t('downloads.clear_finished')}
@@ -531,6 +538,18 @@
gap: var(--padding);
}
+ .downloads-title-row {
+ display: flex;
+ align-items: baseline;
+ gap: 10px;
+ }
+
+ .downloads-stats {
+ font-size: 12px;
+ color: var(--tertiary);
+ font-weight: 400;
+ }
+
.clear-btn {
font-size: 12.5px;
font-weight: 500;