update tooltip text

pull/5370/head
Joseph Izang 8 months ago committed by Aniket
parent a7895adf46
commit 40f07e681d
  1. 3
      apps/remix-ide/src/app/tabs/locales/en/home.json
  2. 20
      libs/remix-ui/home-tab/src/lib/components/homeTabFile.tsx

@ -68,6 +68,7 @@
"home.seeAllTutorials": "See all tutorials", "home.seeAllTutorials": "See all tutorials",
"home.maintainedByRemix": "Maintained by Remix", "home.maintainedByRemix": "Maintained by Remix",
"home.gitCloneTooltip": "Clone a Github repo to a new workspace", "home.gitCloneTooltip": "Clone a Github repo to a new workspace",
"home.gistTooltip": "Import gist to a workspace" "home.gistTooltip": "Import gist to a workspace",
"home.newFileTooltip": "Add a new file to a workspace"
} }

@ -146,16 +146,16 @@ function HomeTabFile({ plugin }: HomeTabFileProps) {
await plugin.call('filePanel', 'switchToWorkspace', { name: wName, isLocalHost: false }) await plugin.call('filePanel', 'switchToWorkspace', { name: wName, isLocalHost: false })
await plugin.call('filePanel', 'switchToWorkspace', { name: wName, isLocalHost: false }) // calling once is not working. await plugin.call('filePanel', 'switchToWorkspace', { name: wName, isLocalHost: false }) // calling once is not working.
const content = `// SPDX-License-Identifier: MIT const content = `// SPDX-License-Identifier: MIT
pragma solidity >=0.6.12 <0.9.0; pragma solidity >=0.6.12 <0.9.0;
contract HelloWorld { contract HelloWorld {
/** /**
* @dev Prints Hello World string * @dev Prints Hello World string
*/ */
function print() public pure returns (string memory) { function print() public pure returns (string memory) {
return "Hello World!"; return "Hello World!";
} }
} }
` `
if (createFile) { if (createFile) {
const { newPath } = await plugin.call('fileManager', 'writeFileNoRewrite', '/contracts/HelloWorld.sol', content) const { newPath } = await plugin.call('fileManager', 'writeFileNoRewrite', '/contracts/HelloWorld.sol', content)
@ -278,7 +278,7 @@ contract HelloWorld {
</label> </label>
<div className="d-flex flex-column"> <div className="d-flex flex-column">
<div className="d-flex flex-row"> <div className="d-flex flex-row">
<CustomTooltip placement={'top'} tooltipId="overlay-tooltip" tooltipClasses="text-nowrap" tooltipText={<FormattedMessage id="home.startCodingPlayground" />} 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" data-id="homeTabNewFile" style={{ width: 'fit-content' }} onClick={async () => await plugin.call('filePanel', 'createNewFile')}> <button className="btn btn-primary text-nowrap p-2 mr-2 border my-1" data-id="homeTabNewFile" style={{ width: 'fit-content' }} onClick={async () => await plugin.call('filePanel', 'createNewFile')}>
<FormattedMessage id="home.newFile" /> <FormattedMessage id="home.newFile" />
</button> </button>

Loading…
Cancel
Save