generated from RyotaUshio/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
180fe4a
commit e64b923
Showing
5 changed files
with
49 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { ButtonComponent } from 'obsidian'; | ||
import { PDFPlusModal } from './base-modal'; | ||
|
||
|
||
export class InstallerVersionModal extends PDFPlusModal { | ||
onOpen() { | ||
super.onOpen(); | ||
|
||
const name = this.plugin.manifest.name; | ||
this.setTitle(`${name}: Outdated Obsidian installer`); | ||
this.contentEl.appendText( | ||
`Your Obsidian installer is outdated and likely to be incompatible with the latest ${name}. Please download the latest installer from Obsidian's website and re-install the Obsidian app.` | ||
); | ||
|
||
this.contentEl.createDiv('modal-button-container', (el) => { | ||
new ButtonComponent(el) | ||
.setButtonText('Get installer from https://obsidian.md') | ||
.setCta() | ||
.onClick(() => { | ||
window.open('https://obsidian.md/download', '_blank'); | ||
}); | ||
new ButtonComponent(el) | ||
.setButtonText('What is "installer version"?') | ||
.onClick(() => { | ||
window.open('https://help.obsidian.md/Getting+started/Update+Obsidian#Installer%20updates', '_blank'); | ||
}); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters