mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Change link to manual in help screen from icon to text (#2886)
* Change help screen link to manual from icon to text * Fix auto advance manual link (dae)
This commit is contained in:
parent
129157eb21
commit
1b0ccfd243
5 changed files with 44 additions and 37 deletions
|
@ -1,11 +1,15 @@
|
||||||
### Text shown in Help pages
|
### Text shown in Help pages
|
||||||
|
|
||||||
|
## Header/footer
|
||||||
|
|
||||||
## Header
|
# Link to more detailed information in the manual
|
||||||
|
help-for-more-info = For more information, see { $link } in the manual.
|
||||||
|
|
||||||
# Tooltip for links to the manual
|
# Tooltip for links to the manual
|
||||||
help-open-manual-chapter = Open { $name } in the manual
|
help-open-manual-chapter = Open { $name } in the manual
|
||||||
|
|
||||||
|
help-ok = OK
|
||||||
|
|
||||||
## Body
|
## Body
|
||||||
|
|
||||||
# Newly introduced settings may not have an explanation yet
|
# Newly introduced settings may not have an explanation yet
|
||||||
|
@ -13,10 +17,3 @@ help-no-explanation =
|
||||||
Whoops! There doesn't seem to be an explanation for this setting yet.
|
Whoops! There doesn't seem to be an explanation for this setting yet.
|
||||||
|
|
||||||
You can help us complete this help page on { $link }.
|
You can help us complete this help page on { $link }.
|
||||||
|
|
||||||
## Footer
|
|
||||||
|
|
||||||
# Link to more detailed information in the manual
|
|
||||||
help-for-more-info = For more information, see { $link } in the manual.
|
|
||||||
|
|
||||||
help-ok = OK
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import * as tr from "@tslib/ftl";
|
import * as tr from "@tslib/ftl";
|
||||||
|
import { renderMarkdown } from "@tslib/helpers";
|
||||||
import Carousel from "bootstrap/js/dist/carousel";
|
import Carousel from "bootstrap/js/dist/carousel";
|
||||||
import Modal from "bootstrap/js/dist/modal";
|
import Modal from "bootstrap/js/dist/modal";
|
||||||
import { createEventDispatcher, getContext, onMount } from "svelte";
|
import { createEventDispatcher, getContext, onMount } from "svelte";
|
||||||
|
@ -13,7 +14,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
import Col from "./Col.svelte";
|
import Col from "./Col.svelte";
|
||||||
import { modalsKey } from "./context-keys";
|
import { modalsKey } from "./context-keys";
|
||||||
import HelpSection from "./HelpSection.svelte";
|
import HelpSection from "./HelpSection.svelte";
|
||||||
import { infoCircle, manualIcon } from "./icons";
|
import { infoCircle } from "./icons";
|
||||||
import Row from "./Row.svelte";
|
import Row from "./Row.svelte";
|
||||||
import { type HelpItem, HelpItemScheduler } from "./types";
|
import { type HelpItem, HelpItemScheduler } from "./types";
|
||||||
|
|
||||||
|
@ -67,26 +68,31 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
<div class="modal-dialog modal-lg">
|
<div class="modal-dialog modal-lg">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h1 class="modal-title" id="modalLabel">
|
<div style="display: flex;">
|
||||||
{title}
|
<h1 class="modal-title" id="modalLabel">
|
||||||
</h1>
|
{title}
|
||||||
|
</h1>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="btn-close"
|
||||||
|
class:invert={$pageTheme.isDark}
|
||||||
|
data-bs-dismiss="modal"
|
||||||
|
aria-label="Close"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
{#if url}
|
{#if url}
|
||||||
<a class="manual-badge" href={url}>
|
<div class="chapter-redirect">
|
||||||
<Badge
|
{@html renderMarkdown(
|
||||||
iconSize={120}
|
tr.helpForMoreInfo({
|
||||||
tooltip={tr.helpOpenManualChapter({ name: title })}
|
link: `<a href="${url}" title="${tr.helpOpenManualChapter(
|
||||||
>
|
{
|
||||||
{@html manualIcon}
|
name: title,
|
||||||
</Badge>
|
},
|
||||||
</a>
|
)}">${title}</a>`,
|
||||||
|
}),
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="btn-close"
|
|
||||||
class:invert={$pageTheme.isDark}
|
|
||||||
data-bs-dismiss="modal"
|
|
||||||
aria-label="Close"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<Row --cols={4}>
|
<Row --cols={4}>
|
||||||
|
@ -157,14 +163,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
margin-inline-end: 0.75rem;
|
margin-inline-end: 0.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.manual-badge {
|
|
||||||
text-decoration: none;
|
|
||||||
color: var(--fg-subtle);
|
|
||||||
&:hover {
|
|
||||||
color: var(--fg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-content {
|
.modal-content {
|
||||||
background-color: var(--canvas);
|
background-color: var(--canvas);
|
||||||
color: var(--fg);
|
color: var(--fg);
|
||||||
|
@ -198,4 +196,16 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
border-inline-start: 4px solid var(--border-focus);
|
border-inline-start: 4px solid var(--border-focus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.modal-header {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: normal;
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chapter-redirect {
|
||||||
|
width: 100%;
|
||||||
|
color: var(--fg-subtle);
|
||||||
|
font-size: small;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
export { default as hsplitIcon } from "@mdi/svg/svg/arrow-split-horizontal.svg";
|
export { default as hsplitIcon } from "@mdi/svg/svg/arrow-split-horizontal.svg";
|
||||||
export { default as vsplitIcon } from "@mdi/svg/svg/arrow-split-vertical.svg";
|
export { default as vsplitIcon } from "@mdi/svg/svg/arrow-split-vertical.svg";
|
||||||
export { default as manualIcon } from "@mdi/svg/svg/book-open-variant.svg";
|
|
||||||
export { default as chevronDown } from "@mdi/svg/svg/chevron-down.svg";
|
export { default as chevronDown } from "@mdi/svg/svg/chevron-down.svg";
|
||||||
export { default as chevronLeft } from "@mdi/svg/svg/chevron-left.svg";
|
export { default as chevronLeft } from "@mdi/svg/svg/chevron-left.svg";
|
||||||
export { default as chevronRight } from "@mdi/svg/svg/chevron-right.svg";
|
export { default as chevronRight } from "@mdi/svg/svg/chevron-right.svg";
|
||||||
|
|
|
@ -58,7 +58,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
<TitledContainer title={tr.actionsAutoAdvance()}>
|
<TitledContainer title={tr.actionsAutoAdvance()}>
|
||||||
<HelpModal
|
<HelpModal
|
||||||
title={tr.deckConfigTimerTitle()}
|
title={tr.deckConfigTimerTitle()}
|
||||||
url={HelpPage.DeckOptions.timer}
|
url={HelpPage.DeckOptions.autoAdvance}
|
||||||
slot="tooltip"
|
slot="tooltip"
|
||||||
{helpSections}
|
{helpSections}
|
||||||
on:mount={(e) => {
|
on:mount={(e) => {
|
||||||
|
|
|
@ -12,6 +12,7 @@ export const HelpPage = {
|
||||||
newInterval: "https://docs.ankiweb.net/deck-options.html#new-interval",
|
newInterval: "https://docs.ankiweb.net/deck-options.html#new-interval",
|
||||||
advanced: "https://docs.ankiweb.net/deck-options.html#advanced",
|
advanced: "https://docs.ankiweb.net/deck-options.html#advanced",
|
||||||
timer: "https://docs.ankiweb.net/deck-options.html#timer",
|
timer: "https://docs.ankiweb.net/deck-options.html#timer",
|
||||||
|
autoAdvance: "https://docs.ankiweb.net/deck-options.html#auto-advance",
|
||||||
learningSteps: "https://docs.ankiweb.net/deck-options.html#learning-steps",
|
learningSteps: "https://docs.ankiweb.net/deck-options.html#learning-steps",
|
||||||
graduatingInterval: "https://docs.ankiweb.net/deck-options.html#graduating-interval",
|
graduatingInterval: "https://docs.ankiweb.net/deck-options.html#graduating-interval",
|
||||||
easyInterval: "https://docs.ankiweb.net/deck-options.html#easy-interval",
|
easyInterval: "https://docs.ankiweb.net/deck-options.html#easy-interval",
|
||||||
|
|
Loading…
Reference in a new issue