mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Feat/Add globe to help tooltip (#4148)
* Add global option to HelpItem * Fix: Spacing * add to more sections * Fix: Spacing again
This commit is contained in:
parent
0b5218706a
commit
4232185735
5 changed files with 24 additions and 1 deletions
|
@ -8,6 +8,8 @@
|
|||
|
||||
import Row from "./Row.svelte";
|
||||
import type { HelpItem } from "./types";
|
||||
import { mdiEarth } from "./icons";
|
||||
import Icon from "./Icon.svelte";
|
||||
|
||||
export let item: HelpItem;
|
||||
</script>
|
||||
|
@ -21,6 +23,11 @@
|
|||
{/if}
|
||||
</h2>
|
||||
{#if item.help}
|
||||
{#if item.global}
|
||||
<div class="icon">
|
||||
<Icon icon={mdiEarth} />
|
||||
</div>
|
||||
{/if}
|
||||
{@html renderMarkdown(item.help)}
|
||||
{:else}
|
||||
{@html renderMarkdown(
|
||||
|
@ -54,4 +61,12 @@
|
|||
color: var(--fg-subtle);
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.icon {
|
||||
display: inline-block;
|
||||
width: 1em;
|
||||
fill: currentColor;
|
||||
margin-right: 0.25em;
|
||||
margin-bottom: 1.25em;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -9,6 +9,7 @@ export type HelpItem = {
|
|||
help?: string;
|
||||
url?: string;
|
||||
sched?: HelpItemScheduler;
|
||||
global?: boolean;
|
||||
};
|
||||
|
||||
export enum HelpItemScheduler {
|
||||
|
|
|
@ -82,6 +82,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
title: tr.deckConfigCustomScheduling(),
|
||||
help: tr.deckConfigCustomSchedulingTooltip(),
|
||||
url: "https://faqs.ankiweb.net/the-2021-scheduler.html#add-ons-and-custom-scheduling",
|
||||
global: true,
|
||||
},
|
||||
};
|
||||
const helpSections: HelpItem[] = Object.values(settings);
|
||||
|
|
|
@ -133,14 +133,15 @@
|
|||
},
|
||||
newCardsIgnoreReviewLimit: {
|
||||
title: tr.deckConfigNewCardsIgnoreReviewLimit(),
|
||||
|
||||
help: newCardsIgnoreReviewLimitHelp,
|
||||
url: HelpPage.DeckOptions.newCardsday,
|
||||
global: true,
|
||||
},
|
||||
applyAllParentLimits: {
|
||||
title: tr.deckConfigApplyAllParentLimits(),
|
||||
help: applyAllParentLimitsHelp,
|
||||
url: HelpPage.DeckOptions.newCardsday,
|
||||
global: true,
|
||||
},
|
||||
};
|
||||
const helpSections: HelpItem[] = Object.values(settings);
|
||||
|
|
|
@ -35,6 +35,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
title: "FSRS",
|
||||
help: tr.deckConfigFsrsTooltip(),
|
||||
url: HelpPage.DeckOptions.fsrs,
|
||||
global: true,
|
||||
},
|
||||
desiredRetention: {
|
||||
title: tr.deckConfigDesiredRetention(),
|
||||
|
@ -56,6 +57,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
title: tr.deckConfigRescheduleCardsOnChange(),
|
||||
help: tr.deckConfigRescheduleCardsOnChangeTooltip(),
|
||||
sched: HelpItemScheduler.FSRS,
|
||||
global: true,
|
||||
},
|
||||
computeOptimalRetention: {
|
||||
title: tr.deckConfigComputeOptimalRetention(),
|
||||
|
@ -65,10 +67,13 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
healthCheck: {
|
||||
title: tr.deckConfigHealthCheck(),
|
||||
help:
|
||||
tr.deckConfigAffectsEntireCollection() +
|
||||
"\n\n" +
|
||||
tr.deckConfigHealthCheckTooltip1() +
|
||||
"\n\n" +
|
||||
tr.deckConfigHealthCheckTooltip2(),
|
||||
sched: HelpItemScheduler.FSRS,
|
||||
global: true,
|
||||
},
|
||||
};
|
||||
const helpSections: HelpItem[] = Object.values(settings);
|
||||
|
|
Loading…
Reference in a new issue