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
5 changes: 5 additions & 0 deletions packages/vscode-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,11 @@
"title": "Toggle device appearance (light/dark mode)",
"category": "Radon IDE",
"enablement": "RNIDE.extensionIsActive && RNIDE.panelIsOpen"
},
{
"command": "RNIDE.removeLicense",
"title": "Remove license",
"category": "Radon IDE"
}
],
"keybindings": [
Expand Down
1 change: 0 additions & 1 deletion packages/vscode-extension/src/common/Project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ export enum ActivateDeviceResult {

export interface ProjectEventMap {
projectStateChanged: ProjectState;
licenseActivationChanged: boolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change relevant to this PR?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no but i noticed it working on it. It is a dead code from previous state management approach

}

export interface ProjectEventListener<T> {
Expand Down
18 changes: 18 additions & 0 deletions packages/vscode-extension/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import { DeviceRotationDirection, IDEPanelMoveTarget } from "./common/Project";
import { AdminRestrictedFunctionalityError, PaywalledFunctionalityError } from "./common/Errors";
import { registerRadonAI } from "./ai/mcp/RadonMcpController";
import { MaestroCodeLensProvider } from "./providers/MaestroCodeLensProvider";
import { removeLicense } from "./utilities/license";

const CHAT_ONBOARDING_COMPLETED = "chat_onboarding_completed";

Expand Down Expand Up @@ -226,6 +227,20 @@ export async function activate(context: ExtensionContext) {
}
}

function removeLicenseWithConfirmation() {
window
.showWarningMessage(
"Are you sure you want to remove license? Restoring it will require a license key.",
"Yes",
"No"
)
.then((item) => {
if (item === "Yes") {
removeLicense();
}
});
}

context.subscriptions.push(
window.registerWebviewViewProvider(
SidePanelViewProvider.viewType,
Expand Down Expand Up @@ -301,6 +316,9 @@ export async function activate(context: ExtensionContext) {
context.subscriptions.push(
commands.registerCommand("RNIDE.toggleDeviceAppearance", toggleDeviceAppearance)
);
context.subscriptions.push(
commands.registerCommand("RNIDE.removeLicense", removeLicenseWithConfirmation)
);
// Debug adapter used by custom launch configuration, we register it in case someone tries to run the IDE configuration
// The current workflow is that people shouldn't run it, but since it is listed under launch options it might happen
// When it does happen, we open the IDE panel and restart the app.
Expand Down
Loading