Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/tutorials/hint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
6 changes: 3 additions & 3 deletions src/tutorials/hinter.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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);
Expand Down