showFullMessage('GitHub', 'github URL', ['https://github.com/0xcert/ethereum-erc721/src/contracts/tokens/nf-token-metadata.sol', 'https://github.com/OpenZeppelin/openzeppelin-solidity/blob/67bca857eedf99bf44a4b6a0fc5b5ed553135316/contracts/access/Roles.sol'])}>GitHub
diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx
index cd6b6fb81c..ea6775af7f 100644
--- a/libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx
+++ b/libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx
@@ -1,18 +1,62 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
-import React, { useEffect, useState, useRef } from 'react'
+import React, { useEffect, useState, useRef, useContext } from 'react'
+import { ThemeContext, themes } from '../themeContext'
+import Carousel from 'react-multi-carousel'
+import WorkspaceTemplate from './workspaceTemplate'
+import 'react-multi-carousel/lib/styles.css'
+import CustomNavButtons from './customNavButtons'
+declare global {
+ interface Window {
+ _paq: any
+ }
+}
+const _paq = window._paq = window._paq || [] //eslint-disable-line
+
+interface HomeTabGetStartedProps {
+ plugin: any
+}
+
+function HomeTabGetStarted ({plugin}: HomeTabGetStartedProps) {
+ const themeFilter = useContext(ThemeContext)
-function HomeTabGetStarted () {
- const [state, setState] = useState<{
- searchInput: string
- }>({
- searchInput: ''
- })
+ const createWorkspace = async (templateName) => {
+ await plugin.appManager.activatePlugin('filePanel')
+
+ await plugin.call('filePanel', 'createWorkspace', templateName + "_workspace", templateName)
+ console.log("templateName ", templateName)
+ plugin.verticalIcons.select('filePanel')
+ _paq.push(['trackEvent', 'homeGetStarted', templateName])
+ }
return (
-
-
Get Started- Project Templatea
-
-
+
+
Get Started- Project Templates
+
+
+ }
+ arrows={false}
+ swipeable={false}
+ draggable={true}
+ showDots={false}
+ responsive={{ desktop: { breakpoint: { max: 3000, min: 1024 }, items: 5} }}
+ renderButtonGroupOutside={true}
+ ssr={true} // means to render carousel on server-side.
+ keyBoardControl={true}
+ containerClass="carousel-container"
+ deviceType={"desktop"}
+ itemClass="w-100"
+ >
+ createWorkspace("blank")} />
+ createWorkspace("remixDefault")} />
+ createWorkspace("ozerc20")} />
+ createWorkspace("ozerc721")} />
+ createWorkspace("zeroxErc20")} />
+ createWorkspace("")} />
+
+
+
)
}
diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx
index dd589a061e..e3cd793775 100644
--- a/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx
+++ b/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx
@@ -1,19 +1,24 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
-import React, { useEffect, useState, useRef } from 'react'
+// eslint-disable-next-line @nrwl/nx/enforce-module-boundaries
+import BasicLogo from 'libs/remix-ui/vertical-icons-panel/src/lib/components/BasicLogo'
+import { ThemeContext } from '../themeContext'
+import React, { useEffect, useState, useRef, useContext } from 'react'
+import { OverlayTrigger, Tooltip } from 'react-bootstrap'// eslint-disable-line
-function HomeTabTitle () {
- const [state, setState] = useState<{
- searchInput: string
- }>({
- searchInput: ''
- })
+function HomeTabTitle() {
useEffect(() => {
document.addEventListener("keyup", (e) => handleSearchKeyDown(e))
return () => {
document.removeEventListener("keyup", handleSearchKeyDown)
}
}, [])
+ const [state, setState] = useState<{
+ searchDisable: boolean
+ }>({
+ searchDisable: true
+ })
+ const themeFilter = useContext(ThemeContext)
const searchInputRef = useRef(null)
const remiAudioEl = useRef(null)
@@ -24,16 +29,18 @@ function HomeTabTitle () {
if (e.target !== searchInputRef.current) return
if (e.key === "Enter") {
openLink()
+ searchInputRef.current.value = ""
+ } else {
+ console.log("handleSearchKeyDown")
setState(prevState => {
- return { ...prevState, searchInput: '' }
+ return { ...prevState, searchDisable: searchInputRef.current.value === "" }
})
- searchInputRef.current.value = ""
}
}
const openLink = (url = "") => {
if (url === "") {
- window.open("https://remix-ide.readthedocs.io/en/latest/search.html?q=" + state.searchInput + "&check_keywords=yes&area=default", '_blank')
+ window.open("https://remix-ide.readthedocs.io/en/latest/search.html?q=" + searchInputRef.current.value + "&check_keywords=yes&area=default", '_blank')
} else {
window.open(url, '_blank')
}
@@ -42,7 +49,9 @@ function HomeTabTitle () {
return (
-
playRemi() } alt="">
+
playRemi()} style={{ filter: themeFilter.filter}} >
+
+
- Remix
+ Remix
- openLink("https://www.youtube.com/channel/UCjTUPyFEr2xDGN6Cg8nKDaA")}
- className="h-100 btn fab fa-youtube">
-
- openLink("https://twitter.com/EthereumRemix")}
- className="h-100 pl-2 btn fab fa-twitter">
-
- openLink(" https://www.linkedin.com/company/ethereum-remix/")}
- className="h-100 pl-2 btn fab fa-linkedin-in">
-
+
+ Remix Youtube Playlist
+
+ }>
+ openLink("https://www.youtube.com/channel/UCjTUPyFEr2xDGN6Cg8nKDaA")}
+ className="h-100 btn fab fa-youtube">
+
+
+
+
+ Remix Twitter Profile
+
+ }>
+ openLink("https://twitter.com/EthereumRemix")}
+ className="h-100 pl-2 btn fab fa-twitter">
+
+
+
+
+ Remix Linkedin Profile
+
+ }>
+ openLink("https://www.linkedin.com/company/ethereum-remix/")}
+ className="h-100 pl-2 btn fa fa-linkedin">
+
+
+
+
+ Remix Medium Posts
+
+ }>
+ openLink("https://medium.com/remix-ide")}
+ className="h-100 pl-2 btn fab fa-medium">
+
+
+
+
+ Remix Gitter channel
+
+ }>
+ openLink("https://gitter.im/ethereum/remix")}
+ className="h-100 pl-2 btn fab fa-gitter">
+
+
-
The Native IDE for Solidity Development.
+
The Native IDE for Web3 Development.
{
- setState(prevState => {
- return { ...prevState, searchInput: event.target.value.trim() }
- })
- }}
type="text"
className="border form-control border-right-0"
id="searchInput"
@@ -90,9 +136,9 @@ function HomeTabTitle () {
/>
openLink() }
- disabled={state.searchInput === ""}
- style={{width: "3rem"}}
+ onClick={(e) => openLink()}
+ disabled={state.searchDisable}
+ style={{ width: "3rem" }}
>
diff --git a/libs/remix-ui/home-tab/src/lib/components/pluginButton.tsx b/libs/remix-ui/home-tab/src/lib/components/pluginButton.tsx
index 87e8978903..9f944679d3 100644
--- a/libs/remix-ui/home-tab/src/lib/components/pluginButton.tsx
+++ b/libs/remix-ui/home-tab/src/lib/components/pluginButton.tsx
@@ -15,6 +15,7 @@ interface PluginButtonProps {
function PluginButton ({ imgPath, envID, envText, callback, l2, description, remixMaintained }: PluginButtonProps) {
const themeFilter = useContext(ThemeContext)
+ console.log("themeFilter ", themeFilter)
return (
{
useEffect(() => {
plugin.call('theme', 'currentTheme').then((theme) => {
// update theme quality. To be used for for images
+ console.log("currentTheme on ", theme.quality )
setState(prevState => {
return { ...prevState, themeQuality: theme.quality === 'dark' ? themes.dark : themes.light }
})
@@ -76,19 +77,19 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {
return (
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
)
}
diff --git a/libs/remix-ui/vertical-icons-panel/src/lib/components/BasicLogo.tsx b/libs/remix-ui/vertical-icons-panel/src/lib/components/BasicLogo.tsx
index a470ce8541..6c0b41331d 100644
--- a/libs/remix-ui/vertical-icons-panel/src/lib/components/BasicLogo.tsx
+++ b/libs/remix-ui/vertical-icons-panel/src/lib/components/BasicLogo.tsx
@@ -1,12 +1,20 @@
import React from 'react'
+interface BasicLogoProps {
+ classList?: string,
+ solid?: boolean
+}
-function BasicLogo () {
- return (
-
-
-
-
- )
+function BasicLogo ({classList = "", solid = true}: BasicLogoProps) {
+ if (solid) {
+ return (
+
+
+
+
+ )
+ } else {
+ return ( )
+ }
}
-export default BasicLogo
+export default BasicLogo
\ No newline at end of file
diff --git a/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.tsx b/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.tsx
index 3d4413eb4d..9d45b6f335 100644
--- a/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.tsx
+++ b/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.tsx
@@ -31,8 +31,6 @@ const RemixUiVerticalIconsPanel = ({
const [activateScroll, dispatchScrollAction] = useReducer(verticalScrollReducer, initialState)
const [theme, setTheme] = useState('dark')
-
-
const evaluateScrollability = () => {
dispatchScrollAction({
type: 'resize',