pull/5370/head
Stéphane Tetsing 6 months ago
parent 69590b1499
commit ba4d1374bc
  1. 2
      apps/remix-ide/src/app.js
  2. 17
      apps/remix-ide/src/app/plugins/remixAIPlugin.tsx
  3. 16
      libs/remix-ui/remix-ai/src/lib/components/Default.tsx
  4. 2
      libs/remix-ui/remix-ai/src/lib/components/RemixAI.tsx
  5. 6
      libs/remix-ui/remix-ai/src/lib/remix-ai.css

@ -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

@ -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 (
<div id="remixAITab">
<RemixAITab plugin={this}></RemixAITab>
</div>
<RemixAITab plugin={this}></RemixAITab>
)
}
}

@ -7,14 +7,26 @@ export const Default = () => {
return (
<div>
<div className="remix_ai_plugin_find_container">
<div className="remix_ai_plugin_search_container">
<input
type="text"
className="remix_ai_plugin_search-input"
placeholder="Search..."
value={searchText}
onChange={() => console.log('searchText not implememted')}
/>
></input>
<button
className="remix_ai_plugin_search_button text-ai pl-2 pr-0 py-0 d-flex"
onClick={() => console.log('searchText not implememted')}
>
<i
className="fa-solid fa-arrow-right"
style={{ color: 'black' }}
></i>
<span className="position-relative text-ai text-sm pl-1"
style={{fontSize: "x-small", alignSelf: "end"}}>Search</span>
</button>
</div>
<div className="remix_ai_plugin_find_container_internal">
<textarea

@ -6,7 +6,7 @@ export const RemixAITab = (props) => {
const plugin = props.plugin
return (
<>
<div id="remixAITab">
<div id="remixAITab pr-4 px-2 pb-4">
<Default></Default>
</div>
</>

@ -122,14 +122,14 @@
font-size: x-small;
}
.remix_ai_plugin_find_container {
.remix_ai_plugin_search_container {
display: flex;
flex-direction: row;
justify-content: center;
margin-top: 20px;
}
.remix_ai_plugin_find_container_internal {
.remix_ai_plugin_search_container_internal {
display: flex;
flex-direction: column;
flex-grow: 1;
@ -137,7 +137,7 @@
align-items: center;
}
.remix_ai_plugin_find_container_arrow {
.remix_ai_plugin_search_container_arrow {
display: flex !important;
align-items: center;
cursor: pointer !important;

Loading…
Cancel
Save