(setting: Setting)
| 395 | } |
| 396 | |
| 397 | private renderPackages(setting: Setting): void { |
| 398 | // Both package actions are secondary utilities — not the page's primary |
| 399 | // action ("New choice" is) — so neither is a CTA. Keeping only one filled |
| 400 | // primary button in the view avoids competing purple CTAs (per the |
| 401 | // one-primary-button-per-page rule). |
| 402 | setting.addButton((button) => |
| 403 | button |
| 404 | .setButtonText("Export package…") |
| 405 | .onClick(() => { |
| 406 | const choicesSnapshot = settingsStore.getState().choices; |
| 407 | new ExportPackageModal( |
| 408 | this.app, |
| 409 | this.plugin, |
| 410 | choicesSnapshot, |
| 411 | ).open(); |
| 412 | }), |
| 413 | ); |
| 414 | |
| 415 | setting.addButton((button) => |
| 416 | button.setButtonText("Import package…").onClick(() => { |
| 417 | new ImportPackageModal(this.app).open(); |
| 418 | }), |
| 419 | ); |
| 420 | } |
| 421 | |
| 422 | private renderDateAliases(setting: Setting): void { |
| 423 | setting.settingEl.addClass("qa-date-alias-setting"); |
no test coverage detected