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.

fix(remake): autocrítica lote 1 — markdown com fences/hr no changelog, star button na One Accent Rule

tonhowtf66846fb40e33
diff --git a/remake/AUTOCRITICA.md b/remake/AUTOCRITICA.md
new file mode 100644
index 00000000..ed0fd371
--- /dev/null
+++ b/remake/AUTOCRITICA.md
@@ -0,0 +1,17 @@
+# AUTOCRÍTICA visual — remake v2 (Fase 2 da auditoria)
+
+Método: para cada rota, abertos os shots finais 1440×900 (light e dark) + ≥4 referências da(s) pasta(s) `mobbin/` do padrão correspondente, avaliação 1–5 em seis eixos. Eixo < 4 → correção, recaptura, reavaliação (máx. 3 iterações), mantendo o valor inicial registrado como `X→Y`.
+
+Eixos: hier(arquia) · respiro · alinh(amento) · tipo(grafia) · acab(amento) · HIG (fidelidade).
+
+| rota | hier | respiro | alinh | tipo | acab | HIG | notas |
+|---|---|---|---|---|---|---|---|
+| `/` home | 4 | 4 | 4 | 4 | 4 | 4 | Refs: Obsidian, Craft, Apple Music, Fabric (04/05/06). URL field é o herói; azul só em seleção/badge. Observações não bloqueantes: banner de manutenção disputa o primeiro olhar (aceito: é temporário e dispensável) e o ícone ⓘ do hint fica visualmente órfão sob o input. |
+| `/downloads` | 4 | 4 | 4 | 4 | 4 | 4 | Refs: Apple Podcasts, Apple Fitness, Spotify, Breaker (07/08). Faixa lateral de cor eliminada; status como tag; barra de 100% redundante removida. Medição de coordenadas confirmou header e lista na mesma coluna de 800px (falso alarme de alinhamento na 1ª passada — registrado por honestidade). |
+| `/marketplace` | 4 | 4 | 4 | 4 | 4 | 4 | Refs: App Store ×4 (13). Cards hairline, ação quieta, tag accent discreta, i18n corrigida. Observação: tag "In the sidebar" + label do toggle são semanticamente redundantes (aceito: a tag some quando o plugin está oculto e vira o sinal de estado). |
+| `/settings` | 4 | 4 | 4 | 5 | 4 | 5 | Refs: Linear ×2 (09/10), Framer (11), Bear (12). Estrutura idêntica ao padrão Linear: nav agrupada + drill rows com descrição + chevron; busca no topo; caps headers. Sub-views de drill auditadas por código (C-003). |
+| `/about` | 4 | 4 | 4 | 4 | 3→4 | 4 | Refs: App Store ×2, Bear ×2 (19). Iteração 1: 7 chaves i18n cruas (`about.tab.overview`, `card_*`) corrigidas + recaptura. Hero com ícone + versão em pill segue o padrão App Store. |
+| `/about/changelog` | 4 | 4 | 4 | 4 | 3→4 | 4 | Iteração 1: renderer não tratava cercas ``` nem `---` (backticks crus na tela); fence→`<pre>` estilizado, `---`→hairline; recapturado nos 2 temas. |
+| `/about/project` | 4 | 4 | 4 | 4 | 4 | 3→4 | Iteração 1: botão "star on GitHub" em laranja sólido violava a One Accent Rule (Don't do explícito do DESIGN.md); virou secundário quieto com estrela tingida; recapturado. |
+| `/about/terms` | 4 | 4 | 4 | 4 | 4 | 4 | Cards de leitura com títulos headline e corpo confortável; sem correção. |
+| `/about/privacy` | 4 | 4 | 4 | 4 | 4 | 4 | Mesma família visual do terms (verificado light+dark); sem correção. |
diff --git a/src/components/dialog/ChangelogDialog.svelte b/src/components/dialog/ChangelogDialog.svelte
index cfb42b74..aba0560a 100644
--- a/src/components/dialog/ChangelogDialog.svelte
+++ b/src/components/dialog/ChangelogDialog.svelte
@@ -40,27 +40,42 @@
}
function renderMarkdown(md: string): string {
- return md
- .split("\n")
- .map((line) => {
- if (line.startsWith("### ")) {
- return `<h4>${escapeHtml(line.slice(4))}</h4>`;
+ const out: string[] = [];
+ let inFence = false;
+ let fenceLines: string[] = [];
+ for (const line of md.split("\n")) {
+ if (line.trim().startsWith("```")) {
+ if (inFence) {
+ out.push(`<pre><code>${escapeHtml(fenceLines.join("\n"))}</code></pre>`);
+ fenceLines = [];
}
- if (line.startsWith("## ")) {
- return `<h3>${escapeHtml(line.slice(3))}</h3>`;
- }
- if (line.startsWith("# ")) {
- return `<h2>${escapeHtml(line.slice(2))}</h2>`;
- }
- if (line.startsWith("- ") || line.startsWith("* ")) {
- return `<li>${formatInline(line.slice(2))}</li>`;
- }
- if (line.trim() === "") {
- return "<br />";
- }
- return `<p>${formatInline(line)}</p>`;
- })
- .join("");
+ inFence = !inFence;
+ continue;
+ }
+ if (inFence) {
+ fenceLines.push(line);
+ continue;
+ }
+ if (/^\s*(---|\*\*\*|___)\s*$/.test(line)) {
+ out.push("<hr />");
+ } else if (line.startsWith("### ")) {
+ out.push(`<h4>${escapeHtml(line.slice(4))}</h4>`);
+ } else if (line.startsWith("## ")) {
+ out.push(`<h3>${escapeHtml(line.slice(3))}</h3>`);
+ } else if (line.startsWith("# ")) {
+ out.push(`<h2>${escapeHtml(line.slice(2))}</h2>`);
+ } else if (line.startsWith("- ") || line.startsWith("* ")) {
+ out.push(`<li>${formatInline(line.slice(2))}</li>`);
+ } else if (line.trim() === "") {
+ out.push("<br />");
+ } else {
+ out.push(`<p>${formatInline(line)}</p>`);
+ }
+ }
+ if (inFence && fenceLines.length) {
+ out.push(`<pre><code>${escapeHtml(fenceLines.join("\n"))}</code></pre>`);
+ }
+ return out.join("");
}
function escapeHtml(str: string): string {
@@ -322,6 +337,26 @@
font-weight: 600;
}
+ .markdown-content :global(pre) {
+ background: var(--fill-1);
+ border-radius: var(--radius-sm);
+ padding: var(--space-3);
+ overflow-x: auto;
+ margin: var(--space-2) 0;
+ }
+
+ .markdown-content :global(pre code) {
+ background: transparent;
+ padding: 0;
+ }
+
+ .markdown-content :global(hr) {
+ border: none;
+ height: 1px;
+ background: var(--border);
+ margin: var(--space-4) 0;
+ }
+
.markdown-content :global(code) {
font-size: 12px;
padding: 1px 5px;
diff --git a/src/routes/about/changelog/+page.svelte b/src/routes/about/changelog/+page.svelte
index 569560f9..842546ad 100644
--- a/src/routes/about/changelog/+page.svelte
+++ b/src/routes/about/changelog/+page.svelte
@@ -1,227 +1,262 @@
-<script lang="ts">
- import { onMount } from "svelte";
- import { t } from "$lib/i18n";
- import {
- getChangelogBody,
- getCurrentVersion,
- fetchChangelog,
- } from "$lib/stores/changelog-store.svelte";
-
- let body = $derived(getChangelogBody());
- let version = $derived(getCurrentVersion());
- let loading = $state(true);
-
- onMount(async () => {
- await fetchChangelog();
- loading = false;
- });
-
- function renderMarkdown(md: string): string {
- return md
- .split("\n")
- .map((line) => {
- if (line.startsWith("### ")) {
- return `<h4>${escapeHtml(line.slice(4))}</h4>`;
- }
- if (line.startsWith("## ")) {
- return `<h3>${escapeHtml(line.slice(3))}</h3>`;
- }
- if (line.startsWith("# ")) {
- return `<h2>${escapeHtml(line.slice(2))}</h2>`;
- }
- if (line.startsWith("- ") || line.startsWith("* ")) {
- return `<li>${formatInline(line.slice(2))}</li>`;
- }
- if (line.trim() === "") {
- return "<br />";
- }
- return `<p>${formatInline(line)}</p>`;
- })
- .join("");
- }
-
- function escapeHtml(str: string): string {
- return str
- .replace(/&/g, "&amp;")
- .replace(/</g, "&lt;")
- .replace(/>/g, "&gt;")
- .replace(/"/g, "&quot;");
- }
-
- function formatInline(str: string): string {
- let result = escapeHtml(str);
- result = result.replace(/\*\*(.+?)\*\*/g, "<strong>$1</strong>");
- result = result.replace(/`(.+?)`/g, "<code>$1</code>");
- result = result.replace(
- /\[(.+?)\]\((.+?)\)/g,
- '<a href="$2" target="_blank" rel="noopener">$1</a>'
- );
- return result;
- }
-</script>
-
-<div class="changelog-page">
- {#if version}
- <div class="version-row">
- <span class="version-label">{$t("about.version")}</span>
- <span class="version-value">{version}</span>
- </div>
- {/if}
-
- {#if loading}
- <div class="loading">
- <span class="spinner"></span>
- </div>
- {:else if body}
- <div class="card">
- <div class="markdown-content">
- {@html renderMarkdown(body)}
- </div>
- </div>
- {:else}
- <div class="card empty-card">
- <p class="empty-text">{$t("changelog.empty")}</p>
- </div>
- {/if}
-</div>
-
-<style>
- .changelog-page {
- display: flex;
- flex-direction: column;
- gap: calc(var(--padding) * 1.5);
- }
-
- .version-row {
- display: flex;
- align-items: center;
- justify-content: center;
- gap: calc(var(--padding) / 2);
- }
-
- .version-label {
- font-size: var(--text-sm);
- font-weight: 500;
- color: var(--gray);
- }
-
- .version-value {
- font-size: var(--text-sm);
- font-weight: 500;
- color: var(--blue);
- }
-
- .loading {
- display: flex;
- align-items: center;
- justify-content: center;
- padding: calc(var(--padding) * 3) 0;
- }
-
- .spinner {
- width: 24px;
- height: 24px;
- border: 2px solid var(--input-border);
- border-top-color: var(--blue);
- border-radius: 50%;
- animation: spin 0.6s linear infinite;
- }
-
- @keyframes spin {
- to {
- transform: rotate(360deg);
- }
- }
-
- .card {
- width: 100%;
- background: var(--button);
- box-shadow: var(--button-box-shadow);
- border-radius: var(--border-radius);
- padding: calc(var(--padding) + 4px);
- }
-
- .empty-card {
- display: flex;
- align-items: center;
- justify-content: center;
- padding: calc(var(--padding) * 2);
- }
-
- .empty-text {
- font-size: var(--text-base);
- font-weight: 500;
- color: var(--gray);
- }
-
- .markdown-content {
- font-size: var(--text-base);
- font-weight: 400;
- line-height: 1.7;
- color: var(--secondary);
- }
-
- .markdown-content :global(h2) {
- font-size: var(--text-lg);
- font-weight: 600;
- margin: 0 0 calc(var(--padding) / 2);
- letter-spacing: var(--track-snug);
- }
-
- .markdown-content :global(h3) {
- font-size: var(--text-md);
- font-weight: 600;
- margin: var(--padding) 0 calc(var(--padding) / 2);
- }
-
- .markdown-content :global(h4) {
- font-size: var(--text-base);
- font-weight: 600;
- margin: var(--padding) 0 calc(var(--padding) / 4);
- color: var(--gray);
- }
-
- .markdown-content :global(p) {
- margin: 0 0 4px;
- }
-
- .markdown-content :global(li) {
- margin: 0 0 4px;
- padding-left: calc(var(--padding) / 2);
- list-style: none;
- }
-
- .markdown-content :global(li::before) {
- content: "•";
- color: var(--blue);
- margin-right: 6px;
- }
-
- .markdown-content :global(strong) {
- font-weight: 600;
- }
-
- .markdown-content :global(code) {
- font-size: 12px;
- padding: 1px 5px;
- background: var(--button-elevated);
- border-radius: 4px;
- }
-
- .markdown-content :global(a) {
- color: var(--blue);
- text-decoration: none;
- }
-
- @media (hover: hover) {
- .markdown-content :global(a:hover) {
- text-decoration: underline;
- }
- }
-
- .markdown-content :global(br) {
- display: block;
- content: "";
- margin-top: 4px;
- }
-</style>
+<script lang="ts">
+ import { onMount } from "svelte";
+ import { t } from "$lib/i18n";
+ import {
+ getChangelogBody,
+ getCurrentVersion,
+ fetchChangelog,
+ } from "$lib/stores/changelog-store.svelte";
+
+ let body = $derived(getChangelogBody());
+ let version = $derived(getCurrentVersion());
+ let loading = $state(true);
+
+ onMount(async () => {
+ await fetchChangelog();
+ loading = false;
+ });
+
+ function renderMarkdown(md: string): string {
+ const out: string[] = [];
+ let inFence = false;
+ let fenceLines: string[] = [];
+ for (const line of md.split("\n")) {
+ if (line.trim().startsWith("```")) {
+ if (inFence) {
+ out.push(`<pre><code>${escapeHtml(fenceLines.join("\n"))}</code></pre>`);
+ fenceLines = [];
+ }
+ inFence = !inFence;
+ continue;
+ }
+ if (inFence) {
+ fenceLines.push(line);
+ continue;
+ }
+ if (/^\s*(---|\*\*\*|___)\s*$/.test(line)) {
+ out.push("<hr />");
+ } else if (line.startsWith("### ")) {
+ out.push(`<h4>${escapeHtml(line.slice(4))}</h4>`);
+ } else if (line.startsWith("## ")) {
+ out.push(`<h3>${escapeHtml(line.slice(3))}</h3>`);
+ } else if (line.startsWith("# ")) {
+ out.push(`<h2>${escapeHtml(line.slice(2))}</h2>`);
+ } else if (line.startsWith("- ") || line.startsWith("* ")) {
+ out.push(`<li>${formatInline(line.slice(2))}</li>`);
+ } else if (line.trim() === "") {
+ out.push("<br />");
+ } else {
+ out.push(`<p>${formatInline(line)}</p>`);
+ }
+ }
+ if (inFence && fenceLines.length) {
+ out.push(`<pre><code>${escapeHtml(fenceLines.join("\n"))}</code></pre>`);
+ }
+ return out.join("");
+ }
+
+ function escapeHtml(str: string): string {
+ return str
+ .replace(/&/g, "&amp;")
+ .replace(/</g, "&lt;")
+ .replace(/>/g, "&gt;")
+ .replace(/"/g, "&quot;");
+ }
+
+ function formatInline(str: string): string {
+ let result = escapeHtml(str);
+ result = result.replace(/\*\*(.+?)\*\*/g, "<strong>$1</strong>");
+ result = result.replace(/`(.+?)`/g, "<code>$1</code>");
+ result = result.replace(
+ /\[(.+?)\]\((.+?)\)/g,
+ '<a href="$2" target="_blank" rel="noopener">$1</a>'
+ );
+ return result;
+ }
+</script>
+
+<div class="changelog-page">
+ {#if version}
+ <div class="version-row">
+ <span class="version-label">{$t("about.version")}</span>
+ <span class="version-value">{version}</span>
+ </div>
+ {/if}
+
+ {#if loading}
+ <div class="loading">
+ <span class="spinner"></span>
+ </div>
+ {:else if body}
+ <div class="card">
+ <div class="markdown-content">
+ {@html renderMarkdown(body)}
+ </div>
+ </div>
+ {:else}
+ <div class="card empty-card">
+ <p class="empty-text">{$t("changelog.empty")}</p>
+ </div>
+ {/if}
+</div>
+
+<style>
+ .changelog-page {
+ display: flex;
+ flex-direction: column;
+ gap: calc(var(--padding) * 1.5);
+ }
+
+ .version-row {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ gap: calc(var(--padding) / 2);
+ }
+
+ .version-label {
+ font-size: var(--text-sm);
+ font-weight: 500;
+ color: var(--gray);
+ }
+
+ .version-value {
+ font-size: var(--text-sm);
+ font-weight: 500;
+ color: var(--blue);
+ }
+
+ .loading {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: calc(var(--padding) * 3) 0;
+ }
+
+ .spinner {
+ width: 24px;
+ height: 24px;
+ border: 2px solid var(--input-border);
+ border-top-color: var(--blue);
+ border-radius: 50%;
+ animation: spin 0.6s linear infinite;
+ }
+
+ @keyframes spin {
+ to {
+ transform: rotate(360deg);
+ }
+ }
+
+ .card {
+ width: 100%;
+ background: var(--button);
+ box-shadow: var(--button-box-shadow);
+ border-radius: var(--border-radius);
+ padding: calc(var(--padding) + 4px);
+ }
+
+ .empty-card {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: calc(var(--padding) * 2);
+ }
+
+ .empty-text {
+ font-size: var(--text-base);
+ font-weight: 500;
+ color: var(--gray);
+ }
+
+ .markdown-content {
+ font-size: var(--text-base);
+ font-weight: 400;
+ line-height: 1.7;
+ color: var(--secondary);
+ }
+
+ .markdown-content :global(h2) {
+ font-size: var(--text-lg);
+ font-weight: 600;
+ margin: 0 0 calc(var(--padding) / 2);
+ letter-spacing: var(--track-snug);
+ }
+
+ .markdown-content :global(h3) {
+ font-size: var(--text-md);
+ font-weight: 600;
+ margin: var(--padding) 0 calc(var(--padding) / 2);
+ }
+
+ .markdown-content :global(h4) {
+ font-size: var(--text-base);
+ font-weight: 600;
+ margin: var(--padding) 0 calc(var(--padding) / 4);
+ color: var(--gray);
+ }
+
+ .markdown-content :global(p) {
+ margin: 0 0 4px;
+ }
+
+ .markdown-content :global(li) {
+ margin: 0 0 4px;
+ padding-left: calc(var(--padding) / 2);
+ list-style: none;
+ }
+
+ .markdown-content :global(li::before) {
+ content: "•";
+ color: var(--blue);
+ margin-right: 6px;
+ }
+
+ .markdown-content :global(strong) {
+ font-weight: 600;
+ }
+
+ .markdown-content :global(pre) {
+ background: var(--fill-1);
+ border-radius: var(--radius-sm);
+ padding: var(--space-3);
+ overflow-x: auto;
+ margin: var(--space-2) 0;
+ }
+
+ .markdown-content :global(pre code) {
+ background: transparent;
+ padding: 0;
+ }
+
+ .markdown-content :global(hr) {
+ border: none;
+ height: 1px;
+ background: var(--border);
+ margin: var(--space-4) 0;
+ }
+
+ .markdown-content :global(code) {
+ font-size: 12px;
+ padding: 1px 5px;
+ background: var(--button-elevated);
+ border-radius: 4px;
+ }
+
+ .markdown-content :global(a) {
+ color: var(--blue);
+ text-decoration: none;
+ }
+
+ @media (hover: hover) {
+ .markdown-content :global(a:hover) {
+ text-decoration: underline;
+ }
+ }
+
+ .markdown-content :global(br) {
+ display: block;
+ content: "";
+ margin-top: 4px;
+ }
+</style>
diff --git a/src/routes/about/project/+page.svelte b/src/routes/about/project/+page.svelte
index 444f1f54..4a8ef146 100644
--- a/src/routes/about/project/+page.svelte
+++ b/src/routes/about/project/+page.svelte
@@ -71,35 +71,36 @@
}
.star-button {
- display: flex;
+ display: inline-flex;
align-items: center;
justify-content: center;
gap: calc(var(--padding) / 2);
- width: 100%;
- padding: calc(var(--padding) + 2px) calc(var(--padding) * 2);
+ margin: 0 auto;
+ padding: calc(var(--padding) / 2) calc(var(--padding) * 1.5);
font-size: var(--text-base);
font-weight: 500;
- color: #fff;
- background: var(--orange);
- border: none;
- border-radius: var(--border-radius);
+ color: var(--text);
+ background: var(--surface);
+ border: 1px solid var(--border);
+ border-radius: var(--radius-md);
cursor: pointer;
- transition: transform 0.15s;
+ transition: background var(--duration-fast) var(--ease-out);
}
.star-button svg {
pointer-events: none;
flex-shrink: 0;
+ color: var(--warning);
}
@media (hover: hover) {
.star-button:hover {
- transform: scale(1.05);
+ background: var(--surface-hi);
}
}
.star-button:active {
- transform: scale(0.98);
+ background: var(--fill-2);
}
.star-button:focus-visible {