|
1 | 1 | import { StatusSettings } from '../Config/StatusSettings';
|
2 | 2 | import { MarkdownTable } from '../lib/MarkdownTable';
|
3 | 3 | import { i18n } from '../i18n/i18n';
|
| 4 | +import { GlobalFilter } from '../Config/GlobalFilter'; |
4 | 5 | import { type StatusConfiguration, StatusType } from './StatusConfiguration';
|
5 | 6 | import { Status } from './Status';
|
6 | 7 | import { StatusRegistry } from './StatusRegistry';
|
@@ -123,16 +124,19 @@ export function tabulateStatusSettings(statusSettings: StatusSettings) {
|
123 | 124 | * @returns {string[]} An array of markdown strings representing sample tasks.
|
124 | 125 | * Each task includes a symbol, an introductory text, and the name of the status.
|
125 | 126 | * Only the actually registered symbols are used; duplicate and empty symbols are ignored.
|
| 127 | + * The Global Filter will be added, if it is non-empty. |
126 | 128 | */
|
127 | 129 | export function sampleTaskLinesForValidStatuses(statusSettings: StatusSettings) {
|
128 | 130 | const statusRegistry = new StatusRegistry();
|
129 | 131 | StatusSettings.applyToStatusRegistry(statusSettings, statusRegistry);
|
130 | 132 | const registeredStatuses: StatusConfiguration[] = statusRegistry.registeredStatuses;
|
131 | 133 |
|
132 | 134 | return registeredStatuses.map((status, index) => {
|
| 135 | + const globalFilter = GlobalFilter.getInstance(); |
| 136 | + const globalFilterIfSet = globalFilter.isEmpty() ? '' : globalFilter.get() + ' '; |
133 | 137 | const intro = `Sample task ${index + 1}`;
|
134 | 138 | const symbol = `status symbol=${getPrintableSymbol(status.symbol)}`;
|
135 | 139 | const name = `status name='${status.name}'`;
|
136 |
| - return `- [${status.symbol}] ${intro}: ${symbol} ${name}`; |
| 140 | + return `- [${status.symbol}] ${globalFilterIfSet}${intro}: ${symbol} ${name}`; |
137 | 141 | });
|
138 | 142 | }
|
0 commit comments