{(state.recentWorkspaces[0] || state.recentWorkspaces[1] || state.recentWorkspaces[2]) && (
-
-
-
-
-
-
- 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
-
-
importFromGist()}>
+
+
+
+
+
+
+ } tooltipTextClasses="border bg-light text-dark p-1 pr-3">
+ await plugin.call('filePanel', 'createNewFile')}>
+
+
+
+ } tooltipTextClasses="border bg-light text-dark p-1 pr-3">
+
+
+
+
+ {
+ event.stopPropagation()
+ plugin.verticalIcons.select('filePanel')
+ uploadFile(event.target)
+ }}
+ multiple
+ />
+
+
+ showFullMessage('Ipfs', 'ipfs hash', ['ipfs://QmQQfBMkpDgmxKzYaoAtqfaybzfgGm9b2LWYyT56Chv6xH'], 'ipfs://')}>
+ IPFS
+
+ 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'])}>
+ Git Clone
+
+ importFromGist()}>
Gist
-
- showFullMessage('Ipfs', 'ipfs hash', ['ipfs://QmQQfBMkpDgmxKzYaoAtqfaybzfgGm9b2LWYyT56Chv6xH'], 'ipfs://')}>
- IPFS
-
-
- showFullMessage('Https', 'http/https raw content', ['https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/token/ERC20/ERC20.sol'])
- }
- >
+
+
+
+ showFullMessage('Https', 'http/https raw content', ['https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/token/ERC20/ERC20.sol'])
+ }
+ >
HTTPS
-
+
+
+
+
+ } tooltipTextClasses="border bg-light text-dark p-1 pr-3">
+ connectToLocalhost()}>
+
+
+
+
+
>
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 e7629edea1..a986cebbfb 100644
--- a/libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx
+++ b/libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx
@@ -1,13 +1,12 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
-import React, { useEffect, useRef, useContext } from 'react'
+import React, { useEffect, useRef, useContext, SyntheticEvent, useState } from 'react'
import { useIntl, FormattedMessage } from 'react-intl'
-import { TEMPLATE_NAMES,TEMPLATE_METADATA } from '@remix-ui/workspace'
+import { TEMPLATE_NAMES, TEMPLATE_METADATA } from '@remix-ui/workspace'
import { ThemeContext } from '../themeContext'
-import Carousel from 'react-multi-carousel'
import WorkspaceTemplate from './workspaceTemplate'
import 'react-multi-carousel/lib/styles.css'
-import CustomNavButtons from './customNavButtons'
import { appPlatformTypes, platformContext } from '@remix-ui/app'
+import { CustomTooltip } from '@remix-ui/helper'
declare global {
interface Window {
@@ -19,12 +18,65 @@ interface HomeTabGetStartedProps {
plugin: any
}
+type WorkspaceTemplate = {
+ gsID: string
+ workspaceTitle: string
+ description: string
+ projectLogo: string
+ templateName: string
+}
+
+const workspaceTemplates: WorkspaceTemplate[] = [
+ {
+ gsID: 'sUTLogo',
+ workspaceTitle: 'Start Coding',
+ description: 'Create a new project using this template.',
+ projectLogo: 'assets/img/remixverticaltextLogo.png',
+ templateName: 'remixDefault',
+ },
+ {
+ gsID: 'sUTLogo',
+ workspaceTitle: 'Circom',
+ description: 'Create a new ZK Project with Circom using this template.',
+ projectLogo: 'assets/img/circom.webp',
+ templateName: 'semaphore',
+ },
+ {
+ gsID: 'sUTLogo',
+ workspaceTitle: 'Uniswap',
+ description: 'Create a new MultiSig wallet using this template.',
+ projectLogo: 'assets/img/gnosissafeLogo.png',
+ templateName: 'uniswapV4Template',
+ },
+ {
+ gsID: 'sUTLogo',
+ workspaceTitle: 'ERC20',
+ description: 'Create a new ERC20 token using this template.',
+ projectLogo: 'assets/img/oxprojectLogo.png',
+ templateName: 'ozerc20',
+ },
+ {
+ gsID: 'sUTLogo',
+ workspaceTitle: 'NFT / ERC721',
+ description: 'Create a new ERC721 token using this template.',
+ projectLogo: 'assets/img/openzeppelinLogo.png',
+ templateName: 'ozerc721',
+ },
+ {
+ gsID: 'sUTLogo',
+ workspaceTitle: 'MultiSig',
+ description: 'Create a new MultiSig wallet using this template.',
+ projectLogo: 'assets/img/gnosissafeLogo.png',
+ templateName: 'gnosisSafeMultisig',
+ },
+]
+
function HomeTabGetStarted({ plugin }: HomeTabGetStartedProps) {
const platform = useContext(platformContext)
const themeFilter = useContext(ThemeContext)
+ const intl = useIntl()
const carouselRef = useRef
({})
const carouselRefDiv = useRef(null)
- const intl = useIntl()
useEffect(() => {
document.addEventListener('wheel', handleScroll)
@@ -61,8 +113,7 @@ function HomeTabGetStarted({ plugin }: HomeTabGetStartedProps) {
}
const createWorkspace = async (templateName) => {
-
- if (platform === appPlatformTypes.desktop){
+ if (platform === appPlatformTypes.desktop) {
await plugin.call('remix-templates', 'loadTemplateInNewWindow', templateName)
return
}
@@ -92,90 +143,45 @@ function HomeTabGetStarted({ plugin }: HomeTabGetStartedProps) {
return (
-
+
-
+
- }
- arrows={false}
- swipeable={false}
- draggable={true}
- showDots={false}
- responsive={{
- superLargeDesktop: {
- breakpoint: { max: 4000, min: 3000 },
- items: 5
- },
- desktop: {
- breakpoint: { max: 3000, min: 1024 },
- items: 5,
- partialVisibilityGutter: 0
- }
- }}
- renderButtonGroupOutside={true}
- ssr={true} // means to render carousel on server-side.
- keyBoardControl={true}
- containerClass="carousel-container"
- deviceType={'desktop'}
- itemClass="w-100"
- >
- createWorkspace("gnosisSafeMultisig")}
- />
- createWorkspace("zeroxErc20")}
- />
- createWorkspace('ozerc20')}
- />
- createWorkspace("ozerc721")}
- />
- createWorkspace("ozerc1155")}
- />
- createWorkspace("remixDefault")}
- />
-
+
+
+ {workspaceTemplates.slice(0, 3).map((template, index) => (
+
+ {
+ createWorkspace(template.templateName)
+ }}
+ data-id={`homeTabGetStarted${template.templateName}`}
+ >
+ {template.workspaceTitle}
+
+
+ ))}
+
+
+ {workspaceTemplates.slice(3, workspaceTemplates.length).map((template, index) => (
+
+ {
+ createWorkspace(template.templateName)
+ }}
+ data-id={`homeTabGetStarted${template.workspaceTitle}`}
+ >
+ {template.workspaceTitle}
+
+
+ ))}
+
+
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 3581a9fa55..721efa5512 100644
--- a/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx
+++ b/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx
@@ -3,8 +3,55 @@
import React, { useEffect, useState, useRef, useContext } from 'react'
import { FormattedMessage, useIntl } from 'react-intl'
import { CustomTooltip } from '@remix-ui/helper'
+import { Placement } from 'react-bootstrap/esm/Overlay'
const _paq = (window._paq = window._paq || []) // eslint-disable-line
+type HometabIconSection = {
+ textToolip: JSX.Element
+ urlLink: string
+ iconClass: 'fa-youtube'|'fa-x-twitter'|'fa-linkedin'|'fa-medium'|'fa-discord'
+ placement: Placement
+ matomoTrackingEntry: string[]
+}
+
+const iconButtons: HometabIconSection[] = [
+ {
+ textToolip: ,
+ matomoTrackingEntry: ['trackEvent', 'hometab', 'socialMedia', 'youtube'],
+ urlLink: 'https://www.youtube.com/channel/UCjTUPyFEr2xDGN6Cg8nKDaA',
+ iconClass: 'fa-youtube',
+ placement: 'top'
+ },
+ {
+ textToolip: ,
+ matomoTrackingEntry: ['trackEvent', 'hometab', 'socialMedia', 'twitter'],
+ urlLink: 'https://twitter.com/EthereumRemix',
+ iconClass: 'fa-x-twitter',
+ placement: 'top'
+ },
+ {
+ textToolip: ,
+ matomoTrackingEntry: ['trackEvent', 'hometab', 'socialmedia', 'linkedin'],
+ urlLink: 'https://www.linkedin.com/company/ethereum-remix/',
+ iconClass: 'fa-linkedin',
+ placement: 'top'
+ },
+ {
+ textToolip: ,
+ matomoTrackingEntry: ['trackEvent', 'hometab', 'socialmedia', 'medium'],
+ urlLink: 'https://medium.com/remix-ide',
+ iconClass: 'fa-medium',
+ placement: 'top'
+ },
+ {
+ textToolip: ,
+ matomoTrackingEntry: ['trackEvent', 'hometab', 'socialmedia', 'discord'],
+ urlLink: 'https://discord.gg/mh9hFCKkEq',
+ iconClass: 'fa-discord',
+ placement: 'top'
+ }
+]
+
function HomeTabTitle() {
useEffect(() => {
document.addEventListener('keyup', (e) => handleSearchKeyDown(e))
@@ -64,82 +111,25 @@ function HomeTabTitle() {