Skip to content

Commit a48d6e9

Browse files
committed
init
1 parent baee767 commit a48d6e9

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

packages/vscode-extension/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,11 @@
283283
"title": "Toggle device appearance (light/dark mode)",
284284
"category": "Radon IDE",
285285
"enablement": "RNIDE.extensionIsActive && RNIDE.panelIsOpen"
286+
},
287+
{
288+
"command": "RNIDE.removeLicense",
289+
"title": "Remove license",
290+
"category": "Radon IDE"
286291
}
287292
],
288293
"keybindings": [

packages/vscode-extension/src/common/Project.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ export enum ActivateDeviceResult {
9090

9191
export interface ProjectEventMap {
9292
projectStateChanged: ProjectState;
93-
licenseActivationChanged: boolean;
9493
}
9594

9695
export interface ProjectEventListener<T> {

packages/vscode-extension/src/extension.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import { DeviceRotationDirection, IDEPanelMoveTarget } from "./common/Project";
3939
import { AdminRestrictedFunctionalityError, PaywalledFunctionalityError } from "./common/Errors";
4040
import { registerRadonAI } from "./ai/mcp/RadonMcpController";
4141
import { MaestroCodeLensProvider } from "./providers/MaestroCodeLensProvider";
42+
import { removeLicense } from "./utilities/license";
4243

4344
const CHAT_ONBOARDING_COMPLETED = "chat_onboarding_completed";
4445

@@ -226,6 +227,20 @@ export async function activate(context: ExtensionContext) {
226227
}
227228
}
228229

230+
function removeLicenseWithConfirmation() {
231+
window
232+
.showWarningMessage(
233+
"Are you sure you want to remove license? Restoring it will require a license key.",
234+
"Yes",
235+
"No"
236+
)
237+
.then((item) => {
238+
if (item === "Yes") {
239+
removeLicense();
240+
}
241+
});
242+
}
243+
229244
context.subscriptions.push(
230245
window.registerWebviewViewProvider(
231246
SidePanelViewProvider.viewType,
@@ -301,6 +316,9 @@ export async function activate(context: ExtensionContext) {
301316
context.subscriptions.push(
302317
commands.registerCommand("RNIDE.toggleDeviceAppearance", toggleDeviceAppearance)
303318
);
319+
context.subscriptions.push(
320+
commands.registerCommand("RNIDE.removeLicense", removeLicenseWithConfirmation)
321+
);
304322
// Debug adapter used by custom launch configuration, we register it in case someone tries to run the IDE configuration
305323
// The current workflow is that people shouldn't run it, but since it is listed under launch options it might happen
306324
// When it does happen, we open the IDE panel and restart the app.

0 commit comments

Comments
 (0)