@@ -8,21 +8,24 @@ import com.intellij.openapi.project.Project
88import com.intellij.openapi.util.IconLoader
99
1010object DraculaNotifications {
11+ private const val notificationGroupID: String = " dracula-theme"
12+
1113 private val releaseNote = """
1214 What's New?<br>
1315 <ul>
14- <li>Enhanced UI details </li>
16+ <li>Enhanced a bunch of UI components </li>
1517 </ul>
1618 Please visit the <a href="https://github.com/dracula/jetbrains/blob/master/CHANGELOG.md">Changelog</a> for more details.<br>
1719 For premium package, check out <a href="https://gumroad.com/a/477820019">Dracula PRO</a>.<br>
20+ Helpful? Consider <a href="https://github.com/dracula/jetbrains">STAR</a> this project.<br>
1821 Thank you for choosing Dracula.
1922 """ .trimIndent()
2023
2124 @JvmField
2225 val notificationIcon = IconLoader .getIcon(" /icons/dracula-logo.svg" , javaClass)
2326
2427 fun notifyReleaseNote (project : Project ) {
25- NotificationGroupManager .getInstance().getNotificationGroup(" dracula-theme " )
28+ NotificationGroupManager .getInstance().getNotificationGroup(notificationGroupID )
2629 .createNotification(
2730 title = " Dracula Theme updated to v${DraculaMeta .currentVersion} " ,
2831 content = releaseNote,
@@ -33,4 +36,19 @@ object DraculaNotifications {
3336 .notify(project)
3437 }
3538
39+ fun notifyFirstlyDownloaded (project : Project ) {
40+ NotificationGroupManager .getInstance().getNotificationGroup(notificationGroupID)
41+ .createNotification(
42+ title = " Dracula Theme v${DraculaMeta .currentVersion} is installed successfully" ,
43+ content = """
44+ Dracula Theme is fully open-source. If this theme is helpful to you, consider <a href="https://github.com/dracula/jetbrains">STAR</a> this project.
45+ Thank you for choosing Dracula.
46+ """ .trimIndent(),
47+ type = NotificationType .INFORMATION ,
48+ listener = NotificationListener .URL_OPENING_LISTENER
49+ )
50+ .setIcon(notificationIcon)
51+ .notify(project)
52+ }
53+
3654}
0 commit comments