Merge branch 'desktope2e-remixai' of https://github.com/ethereum/remix-project into desktope2e-remixai

pull/5100/head
STetsing 2 months ago
commit afe77908e3
  1. 17
      libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx
  2. 2
      libs/remix-ui/home-tab/src/lib/components/homeTabFile.tsx

@ -13,7 +13,11 @@ export type HomeTabFeaturedProps = {
function HomeTabFeatured(props:HomeTabFeaturedProps) { function HomeTabFeatured(props:HomeTabFeaturedProps) {
const themeFilter = useContext(ThemeContext) const themeFilter = useContext(ThemeContext)
const handleStartLearneth = async () => {
await props.plugin.appManager.activatePlugin(['LearnEth', 'solidityUnitTesting'])
props.plugin.verticalIcons.select('LearnEth')
_paq.push(['trackEvent', 'hometab', 'featuredSection', 'LearnEth'])
}
return ( return (
<div className="pt-1 pl-2" id="hTFeaturedeSection"> <div className="pt-1 pl-2" id="hTFeaturedeSection">
<div className="mb-2 remix_ui-carousel-container"> <div className="mb-2 remix_ui-carousel-container">
@ -66,9 +70,9 @@ function HomeTabFeatured(props:HomeTabFeaturedProps) {
</div> </div>
</div> </div>
<div className="mr-1 pr-1 d-flex align-items-center justify-content-center h-100"> <div className="mr-1 pr-1 d-flex align-items-center justify-content-center h-100">
<a href="https://remix-project.org" target="__blank"> <button className='btn' onClick={()=>handleStartLearneth()}>
<img src={'assets/img/remi-prof.webp'} className="remixui_carouselImage" alt=""></img> <img src={'assets/img/remi-prof.webp'} className="remixui_carouselImage" alt=""></img>
</a> </button>
<div className="h6 w-50 p-2 pl-4 align-self-center" style={{ flex: '1' }}> <div className="h6 w-50 p-2 pl-4 align-self-center" style={{ flex: '1' }}>
<h5> <h5>
<FormattedMessage id="home.learnEthPromoTitle" /> <FormattedMessage id="home.learnEthPromoTitle" />
@ -79,12 +83,7 @@ function HomeTabFeatured(props:HomeTabFeaturedProps) {
<span <span
className="remixui_home_text btn-sm btn-secondary mt-2 text-decoration-none mb-3" className="remixui_home_text btn-sm btn-secondary mt-2 text-decoration-none mb-3"
style={{ cursor: 'pointer' }} style={{ cursor: 'pointer' }}
onClick={async () => { onClick={()=>handleStartLearneth()}
await props.plugin.appManager.activatePlugin(['LearnEth', 'solidityUnitTesting'])
props.plugin.verticalIcons.select('LearnEth')
await props.plugin.call('LearnEth', 'home')
}
}
> >
<FormattedMessage id="home.learnEthPromoButton" /> <FormattedMessage id="home.learnEthPromoButton" />
</span> </span>

@ -169,7 +169,7 @@ function HomeTabFile({ plugin }: HomeTabFileProps) {
</label> </label>
<div className="d-flex flex-row flex-wrap"> <div className="d-flex flex-row flex-wrap">
<CustomTooltip placement={'top'} tooltipId="overlay-tooltip" tooltipClasses="text-nowrap" tooltipText={<FormattedMessage id="home.newFileTooltip" />} tooltipTextClasses="border bg-light text-dark p-1 pr-3"> <CustomTooltip placement={'top'} tooltipId="overlay-tooltip" tooltipClasses="text-nowrap" tooltipText={<FormattedMessage id="home.newFileTooltip" />} tooltipTextClasses="border bg-light text-dark p-1 pr-3">
<button className="btn btn-primary text-nowrap p-2 mr-2 border my-1 mb-2" data-id="homeTabNewFile" style={{ width: 'fit-content' }} onClick={async () => { <button className="btn text-nowrap p-2 mr-2 border my-1 mb-2" data-id="homeTabNewFile" style={{ width: 'fit-content' }} onClick={async () => {
_paq.push(['trackEvent', 'hometab', 'filesSection', 'newFile']) _paq.push(['trackEvent', 'hometab', 'filesSection', 'newFile'])
await plugin.call('menuicons', 'select', 'filePanel') await plugin.call('menuicons', 'select', 'filePanel')
await plugin.call('filePanel', 'createNewFile') await plugin.call('filePanel', 'createNewFile')

Loading…
Cancel
Save