From ba4d1374bc13e477487e9367823f7636c6bf6b89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Tetsing?= Date: Wed, 5 Jun 2024 12:04:00 +0200 Subject: [PATCH] minor --- apps/remix-ide/src/app.js | 2 +- .../remix-ide/src/app/plugins/remixAIPlugin.tsx | 17 +++++++++++++---- .../remix-ai/src/lib/components/Default.tsx | 16 ++++++++++++++-- .../remix-ai/src/lib/components/RemixAI.tsx | 2 +- libs/remix-ui/remix-ai/src/lib/remix-ai.css | 6 +++--- 5 files changed, 32 insertions(+), 11 deletions(-) diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index 4c1d2e1d51..3a112d494b 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -375,7 +375,7 @@ class AppComponent { const compilerloader = isElectron()? new compilerLoaderPluginDesktop(): new compilerLoaderPlugin() this.engine.register([compilerloader]) - const remixAI = new RemixAIPlugin() + const remixAI = new RemixAIPlugin(isElectron()) this.engine.register([remixAI]) // LAYOUT & SYSTEM VIEWS diff --git a/apps/remix-ide/src/app/plugins/remixAIPlugin.tsx b/apps/remix-ide/src/app/plugins/remixAIPlugin.tsx index 26efd5f935..adc8f5e2b3 100644 --- a/apps/remix-ide/src/app/plugins/remixAIPlugin.tsx +++ b/apps/remix-ide/src/app/plugins/remixAIPlugin.tsx @@ -20,16 +20,25 @@ const profile = { export class RemixAIPlugin extends ViewPlugin { - constructor() { + isOnDesktop:boolean = false + aiIsActivated:boolean = false + constructor(inDesktop:boolean) { console.log('remixAIPlugin') super(profile) + this.isOnDesktop = inDesktop + } + + onActivation(): void { + + if (this.isOnDesktop) { + console.log('Activating RemixAIPlugin on desktop') + // Do some desktop specific stuff + } } render() { return ( -
- -
+ ) } } diff --git a/libs/remix-ui/remix-ai/src/lib/components/Default.tsx b/libs/remix-ui/remix-ai/src/lib/components/Default.tsx index 23f7dad6da..d4a7fda321 100644 --- a/libs/remix-ui/remix-ai/src/lib/components/Default.tsx +++ b/libs/remix-ui/remix-ai/src/lib/components/Default.tsx @@ -7,14 +7,26 @@ export const Default = () => { return (
-
+
console.log('searchText not implememted')} - /> + > + +