diff --git a/src/tutorials/hint.ts b/src/tutorials/hint.ts index bb945a4..9974f2d 100644 --- a/src/tutorials/hint.ts +++ b/src/tutorials/hint.ts @@ -11,4 +11,14 @@ export interface Hint { * HTML content. */ content: string; + + /** + * Optional override of the title of the hint. + */ + title?: string; + + /** + * Optional override of the close button text of the hint. + */ + actionTitle?: string; } \ No newline at end of file diff --git a/src/tutorials/hinter.ts b/src/tutorials/hinter.ts index 0de742c..7d0a9a7 100644 --- a/src/tutorials/hinter.ts +++ b/src/tutorials/hinter.ts @@ -1,6 +1,6 @@ import { ILayoutService } from "../layouts"; import { Router } from "../routing"; -import { ViewManager } from "./../ui"; +import { ViewManager } from "../ui"; import { EventManager } from "../events"; import { ISettingsProvider } from "../configuration"; import { Hint } from "./hint"; @@ -31,8 +31,8 @@ export class Hinter { this.activeHintKey = hint.key; - const toast = this.viewManager.addToast("Did you know?", hint.content, [{ - title: "Got it", + const toast = this.viewManager.addToast(hint.title ?? "Did you know?", hint.content, [{ + title: hint.actionTitle ?? "Got it", action: async () => { await this.localSettings.setSetting(hintSettingName, true); this.viewManager.removeToast(toast);