From cce936c19068e84b76e45d0cb435a82d401ea859 Mon Sep 17 00:00:00 2001 From: Matthias Metelka <62722460+kleinerpirat@users.noreply.github.com> Date: Wed, 26 Oct 2022 03:32:18 +0200 Subject: [PATCH] Use badge to link manual chapter (#2143) --- ftl/core/help.ftl | 2 -- ts/deck-options/HelpModal.svelte | 43 ++++++++++++++++-------------- ts/deck-options/HelpSection.svelte | 16 +---------- ts/deck-options/icons.ts | 1 + 4 files changed, 25 insertions(+), 37 deletions(-) diff --git a/ftl/core/help.ftl b/ftl/core/help.ftl index 9b34523c8..77094e3f8 100644 --- a/ftl/core/help.ftl +++ b/ftl/core/help.ftl @@ -9,8 +9,6 @@ help-chapter = chapter # Tooltip for links to the manual help-open-manual-chapter = Open chapter { $name } in Anki manual -# Displayed underneath chapter title -help-view-chapter-in-manual = View the { $chapter } on this topic in the official manual. ## Body diff --git a/ts/deck-options/HelpModal.svelte b/ts/deck-options/HelpModal.svelte index 77fc508c2..fe5b809da 100644 --- a/ts/deck-options/HelpModal.svelte +++ b/ts/deck-options/HelpModal.svelte @@ -14,7 +14,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html import * as tr from "../lib/ftl"; import { pageTheme } from "../sveltelib/theme"; import HelpSection from "./HelpSection.svelte"; - import { infoCircle } from "./icons"; + import { infoCircle, manualIcon } from "./icons"; import type { DeckOption } from "./types"; export let title: string; @@ -69,6 +69,16 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html

{title}

+ {#if url} + + + {@html manualIcon} + + + {/if}