Skip to content

Commit

Permalink
πŸ”– Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiteVermouth committed Jan 11, 2021
1 parent 4f4b9c4 commit 185baa3
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 5 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

### 1.10.1

- Enhanced a bunch of UI components:
- Button
- ToolWindow Bar
- Editor Bar
- SidePanel
- Checkbox
- ComboBox
- Separator

### 1.10.0

- Enhanced UI details of:
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
}

group = "com.draculatheme"
version = "1.10.0"
version = "1.10.1"

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ import com.intellij.openapi.startup.StartupActivity
class DraculaStartupActivity : StartupActivity, DumbAware {
override fun runActivity(project: Project) {
val settings = DraculaSettings.instance
val updated = DraculaMeta.currentVersion != settings.version
if (updated) {
if (settings.version.isEmpty()) {
settings.version = DraculaMeta.currentVersion
DraculaNotifications.notifyFirstlyDownloaded(project)
return
}
if (DraculaMeta.currentVersion != settings.version) {
settings.version = DraculaMeta.currentVersion
DraculaNotifications.notifyReleaseNote(project)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,24 @@ import com.intellij.openapi.project.Project
import com.intellij.openapi.util.IconLoader

object DraculaNotifications {
private const val notificationGroupID: String = "dracula-theme"

private val releaseNote = """
What's New?<br>
<ul>
<li>Enhanced UI details</li>
<li>Enhanced a bunch of UI components</li>
</ul>
Please visit the <a href="https://github.com/dracula/jetbrains/blob/master/CHANGELOG.md">Changelog</a> for more details.<br>
For premium package, check out <a href="https://gumroad.com/a/477820019">Dracula PRO</a>.<br>
Helpful? Consider <a href="https://github.com/dracula/jetbrains">STAR</a> this project.<br>
Thank you for choosing Dracula.
""".trimIndent()

@JvmField
val notificationIcon = IconLoader.getIcon("/icons/dracula-logo.svg", javaClass)

fun notifyReleaseNote(project: Project) {
NotificationGroupManager.getInstance().getNotificationGroup("dracula-theme")
NotificationGroupManager.getInstance().getNotificationGroup(notificationGroupID)
.createNotification(
title = "Dracula Theme updated to v${DraculaMeta.currentVersion}",
content = releaseNote,
Expand All @@ -33,4 +36,19 @@ object DraculaNotifications {
.notify(project)
}

fun notifyFirstlyDownloaded(project: Project) {
NotificationGroupManager.getInstance().getNotificationGroup(notificationGroupID)
.createNotification(
title = "Dracula Theme v${DraculaMeta.currentVersion} is installed successfully",
content = """
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.
Thank you for choosing Dracula.
""".trimIndent(),
type = NotificationType.INFORMATION,
listener = NotificationListener.URL_OPENING_LISTENER
)
.setIcon(notificationIcon)
.notify(project)
}

}

0 comments on commit 185baa3

Please sign in to comment.