Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

## [Unreleased]

## [1.2.0] - 2025-11-26

- Skip showing "Enter CodeClocker API Key" dialog on every IDE start

## [1.1.0] - 2025-11-22

- Show VCS changes in IDE popup
Expand Down Expand Up @@ -58,7 +62,8 @@

- Support IntelliJ Platform 2024.3.5

[Unreleased]: https://github.com/codeclocker/codeclocker-intellij-plugin/compare/v1.1.0...HEAD
[Unreleased]: https://github.com/codeclocker/codeclocker-intellij-plugin/compare/v1.2.0...HEAD
[1.2.0]: https://github.com/codeclocker/codeclocker-intellij-plugin/compare/v1.1.0...v1.2.0
[1.1.0]: https://github.com/codeclocker/codeclocker-intellij-plugin/compare/v1.0.11...v1.1.0
[1.0.11]: https://github.com/codeclocker/codeclocker-intellij-plugin/compare/v1.0.10...v1.0.11
[1.0.10]: https://github.com/codeclocker/codeclocker-intellij-plugin/compare/v1.0.9...v1.0.10
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pluginGroup = com.codeclocker
pluginName = CodeClocker
pluginRepositoryUrl = https://github.com/codeclocker/codeclocker-intellij-plugin
# SemVer format -> https://semver.org
pluginVersion = 1.1.0
pluginVersion = 1.2.0

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 242
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
package com.codeclocker.plugin.intellij.apikey;

import com.intellij.ide.util.PropertiesComponent;
import com.intellij.openapi.application.ApplicationManager;

public class ApiKeyPromptStartupActivity {

private static final String API_KEY_PROMPT_SHOWN_PROPERTY =
"com.codeclocker.api-key-prompt-shown";

public static void showApiKeyDialog() {
if (ApiKeyPersistence.getApiKey() == null) {
if (ApiKeyPersistence.getApiKey() == null && !wasPromptAlreadyShown()) {
markPromptAsShown();
ApplicationManager.getApplication().invokeLater(EnterApiKeyAction::showAction);
}
}

private static boolean wasPromptAlreadyShown() {
return PropertiesComponent.getInstance().getBoolean(API_KEY_PROMPT_SHOWN_PROPERTY, false);
}

private static void markPromptAsShown() {
PropertiesComponent.getInstance().setValue(API_KEY_PROMPT_SHOWN_PROPERTY, true);
}
}
Loading