We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad205a8 commit 5477d10Copy full SHA for 5477d10
src/components/CheckSettingsModal.ts
@@ -52,6 +52,24 @@ export class CheckSettingsModal extends Modal {
52
text: t('settings_check_modal_title')
53
});
54
55
+
56
+ const updateDiv = contentEl.createEl("div");
57
+ this.plugin.updater.update(true).then(updateInfo => {
58
+ if ((typeof updateInfo !== 'boolean') && updateInfo?.updateVersion) {
59
+ const desc = t('settings_update_desc', updateInfo);
60
+ new Setting(updateDiv)
61
+ .setName(t('settings_update_title'))
62
+ .setDesc(desc)
63
+ .addButton((button) => {
64
+ button.setButtonText(t('settings_update_btn'));
65
+ button.onClick(() => {
66
+ this.plugin.updater.update()
67
+ this.close();
68
+ });
69
+ })
70
+ }
71
72
73
new Setting(contentEl)
74
.setDesc(t('settings_check_modal_desc'))
75
0 commit comments