From 6219fb136fc41fe98419cd1a6ae0ba872df66285 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Wed, 4 Sep 2024 14:48:37 +0100 Subject: [PATCH 01/16] change title to agreed text --- .../plugins/templates-selection/templates-selection-plugin.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.tsx b/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.tsx index b2f5c593c2..138ac3a7a4 100644 --- a/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.tsx +++ b/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.tsx @@ -147,7 +147,7 @@ export class TemplatesSelectionPlugin extends ViewPlugin { ['ERC721', 'secondary'], ['ERC1155', 'primary'], ]} - title='Template explorer' + title='Workspace Templates' description="Select a template to create a workspace or to add it to current workspace" > { From 0200a73882276eca295918d2fbabf2a4e6a80c7e Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Wed, 4 Sep 2024 15:13:25 +0100 Subject: [PATCH 02/16] update text in templates.ts. update tooltips. update hambuger --- .../plugins/templates-selection/templates.ts | 52 +++++++++---------- .../src/app/tabs/locales/en/filePanel.json | 4 +- .../lib/components/workspace-hamburger.tsx | 10 ++++ 3 files changed, 39 insertions(+), 27 deletions(-) diff --git a/apps/remix-ide/src/app/plugins/templates-selection/templates.ts b/apps/remix-ide/src/app/plugins/templates-selection/templates.ts index 169aae0277..2ea38759b1 100644 --- a/apps/remix-ide/src/app/plugins/templates-selection/templates.ts +++ b/apps/remix-ide/src/app/plugins/templates-selection/templates.ts @@ -14,24 +14,24 @@ export const templates = (intl, plugin) => { value: "ozerc20", displayName: "ERC20", tagList: ["ERC20", "Solidity"], - description: 'A simple ERC20 project' + description: 'A simple ERC20 Project' }, { value: "ozerc721", displayName: "ERC721 (NFT)", tagList: ["ERC721", "Solidity"], - description: 'A simple ERC721 (aka NFT) project' + description: 'A simple ERC721 (aka NFT) Project' }, { value: "ozerc1155", tagList: ["Solidity"], displayName: "ERC1155", - description: 'A simple ERC1155 (multi token) project' + description: 'A simple ERC1155 (multi token) Project' }, { value: "ozerc20", displayName: "ERC20", - description: "A standard interface for fungible tokens", + description: "A Standard Interface for fungible Tokens", tagList: ["Solidity"], opts: { mintable: true @@ -50,7 +50,7 @@ export const templates = (intl, plugin) => { value: "ozerc1155", displayName: "ERC1155", tagList: ["Solidity"], - description: "A standard interface for contracts that manage multiple token types", + description: "A Standard Interface for Contracts that manage Multiple Token types", opts: { mintable: true } @@ -58,7 +58,7 @@ export const templates = (intl, plugin) => { { value: "ozerc20", displayName: "ERC20", - description: "A standard interface for fungible tokens", + description: "A Standard Interface for fungible Tokens", tagList: ["Solidity", "ERC20"], opts: { mintable: true, @@ -78,7 +78,7 @@ export const templates = (intl, plugin) => { { value: "ozerc1155", displayName: "ERC1155", - description: "A standard interface for contracts that manage multiple token types", + description: "A Standard Interface for Contracts that Manage multiple Token types", opts: { mintable: true, burnable: true @@ -88,7 +88,7 @@ export const templates = (intl, plugin) => { { value: "ozerc20", displayName: "ERC20", - description: "A standard interface for fungible tokens", + description: "A Standard Interface for fungible Tokens", opts: { mintable: true, pausable: true @@ -108,7 +108,7 @@ export const templates = (intl, plugin) => { { value: "ozerc1155", displayName: "ERC1155", - description: "A standard interface for contracts that manage multiple token types", + description: "A Standard Interface for Contracts that manage Multiple Token types", tagList: ["ERC20"], opts: { mintable: true, @@ -123,7 +123,7 @@ export const templates = (intl, plugin) => { { value: "ozerc20", displayName: "ERC20", - description: "A standard interface for fungible tokens", + description: "A Standard Interface for fungible Tokens", opts: { upgradeable: 'uups' }, @@ -141,7 +141,7 @@ export const templates = (intl, plugin) => { { value: "ozerc1155", displayName: "ERC1155", - description: "A standard interface for contracts that manage multiple token types", + description: "A Standard Interface for Contracts that manage Multiple Token types", opts: { upgradeable: 'uups' }, @@ -150,7 +150,7 @@ export const templates = (intl, plugin) => { { value: "ozerc20", displayName: "ERC20", - description: "A standard interface for fungible tokens", + description: "A Standard Interface for fungible Tokens", opts: { upgradeable: 'uups', mintable: true @@ -170,7 +170,7 @@ export const templates = (intl, plugin) => { { value: "ozerc1155", displayName: "ERC1155", - description: "A standard interface for contracts that manage multiple token types", + description: "A Standard Interface for Contracts that manage Multiple Token types", opts: { upgradeable: 'uups', mintable: true @@ -180,7 +180,7 @@ export const templates = (intl, plugin) => { { value: "ozerc20", displayName: "ERC20", - description: "A standard interface for fungible tokens", + description: "A Standard Interface for fungible Tokens", opts: { upgradeable: 'uups', mintable: true, @@ -202,7 +202,7 @@ export const templates = (intl, plugin) => { { value: "ozerc1155", displayName: "ERC1155", - description: "A standard interface for contracts that manage multiple token types", + description: "A Standard Interface for Contracts that manage Multiple Token types", opts: { upgradeable: 'uups', mintable: true, @@ -213,7 +213,7 @@ export const templates = (intl, plugin) => { { value: "ozerc20", displayName: "ERC20", - description: "A standard interface for fungible tokens", + description: "A Standard Interface for fungible Tokens", opts: { upgradeable: 'uups', mintable: true, @@ -235,7 +235,7 @@ export const templates = (intl, plugin) => { { value: "ozerc1155", displayName: "ERC1155", - description: "A standard interface for contracts that manage multiple token types", + description: "A Standard Interface for Contracts that manage Multiple Token types", opts: { upgradeable: 'uups', mintable: true, @@ -246,7 +246,7 @@ export const templates = (intl, plugin) => { { value: "ozerc1155", displayName: "ERC1155", - description: "A standard interface for contracts that manage multiple token types", + description: "A Standard Interface for Contracts that manage Multiple Token types", opts: { upgradeable: 'uups', mintable: true, @@ -259,12 +259,12 @@ export const templates = (intl, plugin) => { }, { name: "Cookbook", - tooltip: "Cookbook is a smart contract search tool. Click here to open cookbook and browse contracts.", + tooltip: "Cookbook is a Smart Contract Search Tool. Click here to open Cookbook and browse Contracts.", onClick: async () => { await plugin.call('manager', 'activatePlugin', 'cookbookdev') plugin.call('menuicons', 'showContent', 'cookbookdev') }, - onClickLabel: 'Open cookbook plugin', + onClickLabel: 'Open Cookbook Plugin', items: [ { value: "token-sale", displayName: 'Token Sale' }, { value: "simple-nft-sale", displayName: 'Simple Nft Sale' }, @@ -280,7 +280,7 @@ export const templates = (intl, plugin) => { { name: "OxProject", items: [ - { value: "zeroxErc20", displayName: "ERC20", tagList: ["ERC20", "Solidity"], description: "A standard interface for fungible tokens by 0xProject" } + { value: "zeroxErc20", displayName: "ERC20", tagList: ["ERC20", "Solidity"], description: "A standard Interface for fungible Tokens by 0xProject" } ] }, { @@ -292,9 +292,9 @@ export const templates = (intl, plugin) => { { name: "Circom ZKP", items: [ - { value: "semaphore", tagList: ["ZKP"], displayName: intl.formatMessage({ id: 'filePanel.semaphore' }), description: 'Run a ZK Semaphore circom circuit.' }, - { value: "hashchecker", tagList: ["ZKP"], displayName: intl.formatMessage({ id: 'filePanel.hashchecker' }), description: 'Run a ZK Hash checker circom circuit.' }, - { value: "rln", tagList: ["ZKP"], displayName: intl.formatMessage({ id: 'filePanel.rln' }), description: 'Run a Rate Limiting Nullifier circom circuit.' } + { value: "semaphore", tagList: ["ZKP"], displayName: intl.formatMessage({ id: 'filePanel.semaphore' }), description: 'Run a ZK Semaphore Circom Circuit.' }, + { value: "hashchecker", tagList: ["ZKP"], displayName: intl.formatMessage({ id: 'filePanel.hashchecker' }), description: 'Run a ZK Hash checker Circom Circuit.' }, + { value: "rln", tagList: ["ZKP"], displayName: intl.formatMessage({ id: 'filePanel.rln' }), description: 'Run a Rate Limiting Nullifier Circom Circuit.' } ] }, { @@ -304,7 +304,7 @@ export const templates = (intl, plugin) => { value: "sindriScripts", tagList: ["ZKP"], displayName: intl.formatMessage({ id: 'filePanel.addscriptsindri' }), - description: 'Use the Sindri API to compile and generate proof.' + description: 'Use the Sindri API to Compile and Generate Proof.' }, ], }, @@ -373,4 +373,4 @@ export const templates = (intl, plugin) => { IsArtefact: true } ] -} \ No newline at end of file +} diff --git a/apps/remix-ide/src/app/tabs/locales/en/filePanel.json b/apps/remix-ide/src/app/tabs/locales/en/filePanel.json index affee6c134..b776e76866 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/filePanel.json +++ b/apps/remix-ide/src/app/tabs/locales/en/filePanel.json @@ -2,6 +2,7 @@ "filePanel.displayName": "File explorer", "filePanel.workspace": "WORKSPACES", "filePanel.create": "Create", + "filePanel.createBlank":"Create Blank", "filePanel.create.desktop": "Create Project", "filePanel.clone": "Clone", "filePanel.download": "Download", @@ -9,7 +10,8 @@ "filePanel.restore": "Restore", "filePanel.name": "Name", "filePanel.save": "Save", - "filePanel.workspace.create": "Create Workspace", + "filePanel.workspace.create": "Create Workspace using Templates", + "filePanel.workspace.createBlank": "Create Blank Workspace", "filePanel.workspace.create.desktop": "Create project in new folder", "filePanel.workspace.rename": "Rename Workspace", "filePanel.workspace.save_workspace": "Save Workspace", diff --git a/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx b/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx index 95de007539..03dcc6cb1a 100644 --- a/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx +++ b/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx @@ -36,6 +36,16 @@ export function HamburgerMenu(props: HamburgerMenuProps) { }} platforms={[appPlatformTypes.web]} > + { + props.createWorkspace() + props.hideIconsMenu(!showIconsMenu) + }} + platforms={[appPlatformTypes.web]} + > Date: Wed, 4 Sep 2024 15:23:17 +0100 Subject: [PATCH 03/16] create logic and markup for blank workspace --- .../src/lib/components/createModal.tsx | 51 +++++++++++++++++++ .../workspace/src/lib/remix-ui-workspace.tsx | 6 +++ 2 files changed, 57 insertions(+) create mode 100644 libs/remix-ui/workspace/src/lib/components/createModal.tsx diff --git a/libs/remix-ui/workspace/src/lib/components/createModal.tsx b/libs/remix-ui/workspace/src/lib/components/createModal.tsx new file mode 100644 index 0000000000..81b9d24a08 --- /dev/null +++ b/libs/remix-ui/workspace/src/lib/components/createModal.tsx @@ -0,0 +1,51 @@ +import React from 'react' +import { FormattedMessage } from 'react-intl' + +export const createModalMessage = async ( + defaultName: string, + gitConfigNotSet: boolean, + onChangeTemplateName: (name: string) => void, + onChangeInitGit: (name: string) => void) => { + + return ( + <> + + onChangeTemplateName(e.target.value)} + onInput={(e) => onChangeTemplateName((e.target as any).value)} + /> +
+ onChangeInitGit(e.target.value)} + onInput={(e) => onChangeInitGit((e.target as any).value)} + /> + +
+ {gitConfigNotSet ? ( +
+ +
+ ) : ( + <> + )} + + ) +} diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index f6bf6d4184..287691cdb2 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -335,6 +335,12 @@ export function Workspace() { ) } + const createBlankWorkspace = async () => { + global.modal( + + ) + } + const saveSampleCodeWorkspace = () => { const workspaceName = global.plugin.getAvailableWorkspaceName('code-sample') global.modal( From 45b9a37d10315cb1b591dd49d75d08bdd174e0c0 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Wed, 4 Sep 2024 16:22:14 +0100 Subject: [PATCH 04/16] implement blank workspace logic --- .../src/lib/components/workspace-hamburger.tsx | 3 ++- .../workspace/src/lib/remix-ui-workspace.tsx | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx b/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx index 03dcc6cb1a..0dad148999 100644 --- a/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx +++ b/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx @@ -7,6 +7,7 @@ import { WorkspaceMetadata } from '../types' export interface HamburgerMenuProps { selectedWorkspace: WorkspaceMetadata createWorkspace: () => void + createBlankWorkspace: () => Promise renameCurrentWorkspace: () => void downloadCurrentWorkspace: () => void deleteCurrentWorkspace: () => void @@ -41,7 +42,7 @@ export function HamburgerMenu(props: HamburgerMenuProps) { fa="far fa-plus" hideOption={hideWorkspaceOptions} actionOnClick={() => { - props.createWorkspace() + props.createBlankWorkspace() props.hideIconsMenu(!showIconsMenu) }} platforms={[appPlatformTypes.web]} diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index 287691cdb2..96a74ed5dc 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -18,6 +18,7 @@ import { AppContext, appPlatformTypes, platformContext } from '@remix-ui/app' import { ElectronMenu } from './components/electron-menu' import { ElectronWorkspaceName } from './components/electron-workspace-name' import { branch, GitHubUser, gitUIPanels, userEmails } from '@remix-ui/git' +import { createModalMessage } from './components/createModal' const _paq = (window._paq = window._paq || []) @@ -335,9 +336,23 @@ export function Workspace() { ) } + const [counter, setCounter] = useState(0) const createBlankWorkspace = async () => { + const username = await global.plugin.call('settings', 'get', 'settings/github-user-name') + const email = await global.plugin.call('settings', 'get', 'settings/github-email') + const gitNotSet = !username || !email + const defaultName = await global.plugin.call('filePanel', 'getAvailableWorkspaceName', 'blank') + let workspace = defaultName + let gitInit = false + setCounter((previous) => { + return previous + 1 + }) global.modal( - + intl.formatMessage({ id: 'filePanel.workspace.createBlank' }), + await createModalMessage(`blank - 1`, gitNotSet, (value) => { workspace = value }, (value) => gitInit = false), + intl.formatMessage({ id: 'filePanel.ok' }), + () => global.dispatchCreateWorkspace(`blank - ${counter}`, 'blank', false), + intl.formatMessage({ id: 'filePanel.cancel' }) ) } @@ -932,6 +947,7 @@ export function Workspace() { Date: Tue, 10 Sep 2024 14:10:59 +0100 Subject: [PATCH 05/16] made changes as per @ryestew & @LianaHus --- .../workspace/src/lib/components/workspace-hamburger.tsx | 8 ++++---- libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx b/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx index 0dad148999..860ac4042e 100644 --- a/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx +++ b/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx @@ -28,21 +28,21 @@ export function HamburgerMenu(props: HamburgerMenuProps) { return ( <> { - props.createWorkspace() + props.createBlankWorkspace() props.hideIconsMenu(!showIconsMenu) }} platforms={[appPlatformTypes.web]} > { - props.createBlankWorkspace() + props.createWorkspace() props.hideIconsMenu(!showIconsMenu) }} platforms={[appPlatformTypes.web]} diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index 96a74ed5dc..8db36e36a0 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -349,7 +349,7 @@ export function Workspace() { }) global.modal( intl.formatMessage({ id: 'filePanel.workspace.createBlank' }), - await createModalMessage(`blank - 1`, gitNotSet, (value) => { workspace = value }, (value) => gitInit = false), + await createModalMessage(`blank - ${counter}`, gitNotSet, (value) => { workspace = value }, (value) => gitInit = false), intl.formatMessage({ id: 'filePanel.ok' }), () => global.dispatchCreateWorkspace(`blank - ${counter}`, 'blank', false), intl.formatMessage({ id: 'filePanel.cancel' }) From e253a27233062a0c92cb9e2579c9396e00dc962d Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Wed, 11 Sep 2024 10:06:26 +0100 Subject: [PATCH 06/16] fix label for hamburger menu --- apps/remix-ide/src/app/tabs/locales/en/filePanel.json | 1 + .../workspace/src/lib/components/workspace-hamburger-item.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/tabs/locales/en/filePanel.json b/apps/remix-ide/src/app/tabs/locales/en/filePanel.json index b776e76866..549b7d00c0 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/filePanel.json +++ b/apps/remix-ide/src/app/tabs/locales/en/filePanel.json @@ -2,6 +2,7 @@ "filePanel.displayName": "File explorer", "filePanel.workspace": "WORKSPACES", "filePanel.create": "Create", + "filePanel.createLabel": "Create using Template", "filePanel.createBlank":"Create Blank", "filePanel.create.desktop": "Create Project", "filePanel.clone": "Clone", diff --git a/libs/remix-ui/workspace/src/lib/components/workspace-hamburger-item.tsx b/libs/remix-ui/workspace/src/lib/components/workspace-hamburger-item.tsx index 25622b3c9a..f5df61691a 100644 --- a/libs/remix-ui/workspace/src/lib/components/workspace-hamburger-item.tsx +++ b/libs/remix-ui/workspace/src/lib/components/workspace-hamburger-item.tsx @@ -32,7 +32,7 @@ export function HamburgerMenuItem(props: HamburgerMenuItemProps) { > - + {props.kind === 'create' ? :} From e5379b120967b9bf22635a8215239a17feba67bc Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Wed, 11 Sep 2024 16:28:01 +0100 Subject: [PATCH 07/16] blank workspace counter starts from 1 --- libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index 8db36e36a0..2e035ac018 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -336,7 +336,7 @@ export function Workspace() { ) } - const [counter, setCounter] = useState(0) + const [counter, setCounter] = useState(1) const createBlankWorkspace = async () => { const username = await global.plugin.call('settings', 'get', 'settings/github-user-name') const email = await global.plugin.call('settings', 'get', 'settings/github-email') From dd1b7e5d48549a403dab534d3c0000d5c92c6c36 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Wed, 4 Sep 2024 14:48:37 +0100 Subject: [PATCH 08/16] change title to agreed text --- .../plugins/templates-selection/templates-selection-plugin.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.tsx b/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.tsx index b2f5c593c2..138ac3a7a4 100644 --- a/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.tsx +++ b/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.tsx @@ -147,7 +147,7 @@ export class TemplatesSelectionPlugin extends ViewPlugin { ['ERC721', 'secondary'], ['ERC1155', 'primary'], ]} - title='Template explorer' + title='Workspace Templates' description="Select a template to create a workspace or to add it to current workspace" > { From 0d8a761112bdea9958afa316abe9b91f43c846ac Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Wed, 4 Sep 2024 15:13:25 +0100 Subject: [PATCH 09/16] update text in templates.ts. update tooltips. update hambuger --- .../plugins/templates-selection/templates.ts | 52 +++++++++---------- .../src/app/tabs/locales/en/filePanel.json | 4 +- .../lib/components/workspace-hamburger.tsx | 10 ++++ 3 files changed, 39 insertions(+), 27 deletions(-) diff --git a/apps/remix-ide/src/app/plugins/templates-selection/templates.ts b/apps/remix-ide/src/app/plugins/templates-selection/templates.ts index 169aae0277..2ea38759b1 100644 --- a/apps/remix-ide/src/app/plugins/templates-selection/templates.ts +++ b/apps/remix-ide/src/app/plugins/templates-selection/templates.ts @@ -14,24 +14,24 @@ export const templates = (intl, plugin) => { value: "ozerc20", displayName: "ERC20", tagList: ["ERC20", "Solidity"], - description: 'A simple ERC20 project' + description: 'A simple ERC20 Project' }, { value: "ozerc721", displayName: "ERC721 (NFT)", tagList: ["ERC721", "Solidity"], - description: 'A simple ERC721 (aka NFT) project' + description: 'A simple ERC721 (aka NFT) Project' }, { value: "ozerc1155", tagList: ["Solidity"], displayName: "ERC1155", - description: 'A simple ERC1155 (multi token) project' + description: 'A simple ERC1155 (multi token) Project' }, { value: "ozerc20", displayName: "ERC20", - description: "A standard interface for fungible tokens", + description: "A Standard Interface for fungible Tokens", tagList: ["Solidity"], opts: { mintable: true @@ -50,7 +50,7 @@ export const templates = (intl, plugin) => { value: "ozerc1155", displayName: "ERC1155", tagList: ["Solidity"], - description: "A standard interface for contracts that manage multiple token types", + description: "A Standard Interface for Contracts that manage Multiple Token types", opts: { mintable: true } @@ -58,7 +58,7 @@ export const templates = (intl, plugin) => { { value: "ozerc20", displayName: "ERC20", - description: "A standard interface for fungible tokens", + description: "A Standard Interface for fungible Tokens", tagList: ["Solidity", "ERC20"], opts: { mintable: true, @@ -78,7 +78,7 @@ export const templates = (intl, plugin) => { { value: "ozerc1155", displayName: "ERC1155", - description: "A standard interface for contracts that manage multiple token types", + description: "A Standard Interface for Contracts that Manage multiple Token types", opts: { mintable: true, burnable: true @@ -88,7 +88,7 @@ export const templates = (intl, plugin) => { { value: "ozerc20", displayName: "ERC20", - description: "A standard interface for fungible tokens", + description: "A Standard Interface for fungible Tokens", opts: { mintable: true, pausable: true @@ -108,7 +108,7 @@ export const templates = (intl, plugin) => { { value: "ozerc1155", displayName: "ERC1155", - description: "A standard interface for contracts that manage multiple token types", + description: "A Standard Interface for Contracts that manage Multiple Token types", tagList: ["ERC20"], opts: { mintable: true, @@ -123,7 +123,7 @@ export const templates = (intl, plugin) => { { value: "ozerc20", displayName: "ERC20", - description: "A standard interface for fungible tokens", + description: "A Standard Interface for fungible Tokens", opts: { upgradeable: 'uups' }, @@ -141,7 +141,7 @@ export const templates = (intl, plugin) => { { value: "ozerc1155", displayName: "ERC1155", - description: "A standard interface for contracts that manage multiple token types", + description: "A Standard Interface for Contracts that manage Multiple Token types", opts: { upgradeable: 'uups' }, @@ -150,7 +150,7 @@ export const templates = (intl, plugin) => { { value: "ozerc20", displayName: "ERC20", - description: "A standard interface for fungible tokens", + description: "A Standard Interface for fungible Tokens", opts: { upgradeable: 'uups', mintable: true @@ -170,7 +170,7 @@ export const templates = (intl, plugin) => { { value: "ozerc1155", displayName: "ERC1155", - description: "A standard interface for contracts that manage multiple token types", + description: "A Standard Interface for Contracts that manage Multiple Token types", opts: { upgradeable: 'uups', mintable: true @@ -180,7 +180,7 @@ export const templates = (intl, plugin) => { { value: "ozerc20", displayName: "ERC20", - description: "A standard interface for fungible tokens", + description: "A Standard Interface for fungible Tokens", opts: { upgradeable: 'uups', mintable: true, @@ -202,7 +202,7 @@ export const templates = (intl, plugin) => { { value: "ozerc1155", displayName: "ERC1155", - description: "A standard interface for contracts that manage multiple token types", + description: "A Standard Interface for Contracts that manage Multiple Token types", opts: { upgradeable: 'uups', mintable: true, @@ -213,7 +213,7 @@ export const templates = (intl, plugin) => { { value: "ozerc20", displayName: "ERC20", - description: "A standard interface for fungible tokens", + description: "A Standard Interface for fungible Tokens", opts: { upgradeable: 'uups', mintable: true, @@ -235,7 +235,7 @@ export const templates = (intl, plugin) => { { value: "ozerc1155", displayName: "ERC1155", - description: "A standard interface for contracts that manage multiple token types", + description: "A Standard Interface for Contracts that manage Multiple Token types", opts: { upgradeable: 'uups', mintable: true, @@ -246,7 +246,7 @@ export const templates = (intl, plugin) => { { value: "ozerc1155", displayName: "ERC1155", - description: "A standard interface for contracts that manage multiple token types", + description: "A Standard Interface for Contracts that manage Multiple Token types", opts: { upgradeable: 'uups', mintable: true, @@ -259,12 +259,12 @@ export const templates = (intl, plugin) => { }, { name: "Cookbook", - tooltip: "Cookbook is a smart contract search tool. Click here to open cookbook and browse contracts.", + tooltip: "Cookbook is a Smart Contract Search Tool. Click here to open Cookbook and browse Contracts.", onClick: async () => { await plugin.call('manager', 'activatePlugin', 'cookbookdev') plugin.call('menuicons', 'showContent', 'cookbookdev') }, - onClickLabel: 'Open cookbook plugin', + onClickLabel: 'Open Cookbook Plugin', items: [ { value: "token-sale", displayName: 'Token Sale' }, { value: "simple-nft-sale", displayName: 'Simple Nft Sale' }, @@ -280,7 +280,7 @@ export const templates = (intl, plugin) => { { name: "OxProject", items: [ - { value: "zeroxErc20", displayName: "ERC20", tagList: ["ERC20", "Solidity"], description: "A standard interface for fungible tokens by 0xProject" } + { value: "zeroxErc20", displayName: "ERC20", tagList: ["ERC20", "Solidity"], description: "A standard Interface for fungible Tokens by 0xProject" } ] }, { @@ -292,9 +292,9 @@ export const templates = (intl, plugin) => { { name: "Circom ZKP", items: [ - { value: "semaphore", tagList: ["ZKP"], displayName: intl.formatMessage({ id: 'filePanel.semaphore' }), description: 'Run a ZK Semaphore circom circuit.' }, - { value: "hashchecker", tagList: ["ZKP"], displayName: intl.formatMessage({ id: 'filePanel.hashchecker' }), description: 'Run a ZK Hash checker circom circuit.' }, - { value: "rln", tagList: ["ZKP"], displayName: intl.formatMessage({ id: 'filePanel.rln' }), description: 'Run a Rate Limiting Nullifier circom circuit.' } + { value: "semaphore", tagList: ["ZKP"], displayName: intl.formatMessage({ id: 'filePanel.semaphore' }), description: 'Run a ZK Semaphore Circom Circuit.' }, + { value: "hashchecker", tagList: ["ZKP"], displayName: intl.formatMessage({ id: 'filePanel.hashchecker' }), description: 'Run a ZK Hash checker Circom Circuit.' }, + { value: "rln", tagList: ["ZKP"], displayName: intl.formatMessage({ id: 'filePanel.rln' }), description: 'Run a Rate Limiting Nullifier Circom Circuit.' } ] }, { @@ -304,7 +304,7 @@ export const templates = (intl, plugin) => { value: "sindriScripts", tagList: ["ZKP"], displayName: intl.formatMessage({ id: 'filePanel.addscriptsindri' }), - description: 'Use the Sindri API to compile and generate proof.' + description: 'Use the Sindri API to Compile and Generate Proof.' }, ], }, @@ -373,4 +373,4 @@ export const templates = (intl, plugin) => { IsArtefact: true } ] -} \ No newline at end of file +} diff --git a/apps/remix-ide/src/app/tabs/locales/en/filePanel.json b/apps/remix-ide/src/app/tabs/locales/en/filePanel.json index affee6c134..b776e76866 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/filePanel.json +++ b/apps/remix-ide/src/app/tabs/locales/en/filePanel.json @@ -2,6 +2,7 @@ "filePanel.displayName": "File explorer", "filePanel.workspace": "WORKSPACES", "filePanel.create": "Create", + "filePanel.createBlank":"Create Blank", "filePanel.create.desktop": "Create Project", "filePanel.clone": "Clone", "filePanel.download": "Download", @@ -9,7 +10,8 @@ "filePanel.restore": "Restore", "filePanel.name": "Name", "filePanel.save": "Save", - "filePanel.workspace.create": "Create Workspace", + "filePanel.workspace.create": "Create Workspace using Templates", + "filePanel.workspace.createBlank": "Create Blank Workspace", "filePanel.workspace.create.desktop": "Create project in new folder", "filePanel.workspace.rename": "Rename Workspace", "filePanel.workspace.save_workspace": "Save Workspace", diff --git a/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx b/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx index 95de007539..03dcc6cb1a 100644 --- a/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx +++ b/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx @@ -36,6 +36,16 @@ export function HamburgerMenu(props: HamburgerMenuProps) { }} platforms={[appPlatformTypes.web]} > + { + props.createWorkspace() + props.hideIconsMenu(!showIconsMenu) + }} + platforms={[appPlatformTypes.web]} + > Date: Wed, 4 Sep 2024 15:23:17 +0100 Subject: [PATCH 10/16] create logic and markup for blank workspace --- .../src/lib/components/createModal.tsx | 51 +++++++++++++++++++ .../workspace/src/lib/remix-ui-workspace.tsx | 6 +++ 2 files changed, 57 insertions(+) create mode 100644 libs/remix-ui/workspace/src/lib/components/createModal.tsx diff --git a/libs/remix-ui/workspace/src/lib/components/createModal.tsx b/libs/remix-ui/workspace/src/lib/components/createModal.tsx new file mode 100644 index 0000000000..81b9d24a08 --- /dev/null +++ b/libs/remix-ui/workspace/src/lib/components/createModal.tsx @@ -0,0 +1,51 @@ +import React from 'react' +import { FormattedMessage } from 'react-intl' + +export const createModalMessage = async ( + defaultName: string, + gitConfigNotSet: boolean, + onChangeTemplateName: (name: string) => void, + onChangeInitGit: (name: string) => void) => { + + return ( + <> + + onChangeTemplateName(e.target.value)} + onInput={(e) => onChangeTemplateName((e.target as any).value)} + /> +
+ onChangeInitGit(e.target.value)} + onInput={(e) => onChangeInitGit((e.target as any).value)} + /> + +
+ {gitConfigNotSet ? ( +
+ +
+ ) : ( + <> + )} + + ) +} diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index f6bf6d4184..287691cdb2 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -335,6 +335,12 @@ export function Workspace() { ) } + const createBlankWorkspace = async () => { + global.modal( + + ) + } + const saveSampleCodeWorkspace = () => { const workspaceName = global.plugin.getAvailableWorkspaceName('code-sample') global.modal( From 07962422a6e74e4569fd40a8374e26e0e101ea82 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Wed, 4 Sep 2024 16:22:14 +0100 Subject: [PATCH 11/16] implement blank workspace logic --- .../src/lib/components/workspace-hamburger.tsx | 3 ++- .../workspace/src/lib/remix-ui-workspace.tsx | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx b/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx index 03dcc6cb1a..0dad148999 100644 --- a/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx +++ b/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx @@ -7,6 +7,7 @@ import { WorkspaceMetadata } from '../types' export interface HamburgerMenuProps { selectedWorkspace: WorkspaceMetadata createWorkspace: () => void + createBlankWorkspace: () => Promise renameCurrentWorkspace: () => void downloadCurrentWorkspace: () => void deleteCurrentWorkspace: () => void @@ -41,7 +42,7 @@ export function HamburgerMenu(props: HamburgerMenuProps) { fa="far fa-plus" hideOption={hideWorkspaceOptions} actionOnClick={() => { - props.createWorkspace() + props.createBlankWorkspace() props.hideIconsMenu(!showIconsMenu) }} platforms={[appPlatformTypes.web]} diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index 287691cdb2..96a74ed5dc 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -18,6 +18,7 @@ import { AppContext, appPlatformTypes, platformContext } from '@remix-ui/app' import { ElectronMenu } from './components/electron-menu' import { ElectronWorkspaceName } from './components/electron-workspace-name' import { branch, GitHubUser, gitUIPanels, userEmails } from '@remix-ui/git' +import { createModalMessage } from './components/createModal' const _paq = (window._paq = window._paq || []) @@ -335,9 +336,23 @@ export function Workspace() { ) } + const [counter, setCounter] = useState(0) const createBlankWorkspace = async () => { + const username = await global.plugin.call('settings', 'get', 'settings/github-user-name') + const email = await global.plugin.call('settings', 'get', 'settings/github-email') + const gitNotSet = !username || !email + const defaultName = await global.plugin.call('filePanel', 'getAvailableWorkspaceName', 'blank') + let workspace = defaultName + let gitInit = false + setCounter((previous) => { + return previous + 1 + }) global.modal( - + intl.formatMessage({ id: 'filePanel.workspace.createBlank' }), + await createModalMessage(`blank - 1`, gitNotSet, (value) => { workspace = value }, (value) => gitInit = false), + intl.formatMessage({ id: 'filePanel.ok' }), + () => global.dispatchCreateWorkspace(`blank - ${counter}`, 'blank', false), + intl.formatMessage({ id: 'filePanel.cancel' }) ) } @@ -932,6 +947,7 @@ export function Workspace() { Date: Tue, 10 Sep 2024 14:10:59 +0100 Subject: [PATCH 12/16] made changes as per @ryestew & @LianaHus --- .../workspace/src/lib/components/workspace-hamburger.tsx | 8 ++++---- libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx b/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx index 0dad148999..860ac4042e 100644 --- a/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx +++ b/libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx @@ -28,21 +28,21 @@ export function HamburgerMenu(props: HamburgerMenuProps) { return ( <> { - props.createWorkspace() + props.createBlankWorkspace() props.hideIconsMenu(!showIconsMenu) }} platforms={[appPlatformTypes.web]} > { - props.createBlankWorkspace() + props.createWorkspace() props.hideIconsMenu(!showIconsMenu) }} platforms={[appPlatformTypes.web]} diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index 96a74ed5dc..8db36e36a0 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -349,7 +349,7 @@ export function Workspace() { }) global.modal( intl.formatMessage({ id: 'filePanel.workspace.createBlank' }), - await createModalMessage(`blank - 1`, gitNotSet, (value) => { workspace = value }, (value) => gitInit = false), + await createModalMessage(`blank - ${counter}`, gitNotSet, (value) => { workspace = value }, (value) => gitInit = false), intl.formatMessage({ id: 'filePanel.ok' }), () => global.dispatchCreateWorkspace(`blank - ${counter}`, 'blank', false), intl.formatMessage({ id: 'filePanel.cancel' }) From 4fd1cf569619fba477d90db81400a47fa6f67538 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Wed, 11 Sep 2024 10:06:26 +0100 Subject: [PATCH 13/16] fix label for hamburger menu --- apps/remix-ide/src/app/tabs/locales/en/filePanel.json | 1 + .../workspace/src/lib/components/workspace-hamburger-item.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/tabs/locales/en/filePanel.json b/apps/remix-ide/src/app/tabs/locales/en/filePanel.json index b776e76866..549b7d00c0 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/filePanel.json +++ b/apps/remix-ide/src/app/tabs/locales/en/filePanel.json @@ -2,6 +2,7 @@ "filePanel.displayName": "File explorer", "filePanel.workspace": "WORKSPACES", "filePanel.create": "Create", + "filePanel.createLabel": "Create using Template", "filePanel.createBlank":"Create Blank", "filePanel.create.desktop": "Create Project", "filePanel.clone": "Clone", diff --git a/libs/remix-ui/workspace/src/lib/components/workspace-hamburger-item.tsx b/libs/remix-ui/workspace/src/lib/components/workspace-hamburger-item.tsx index 25622b3c9a..f5df61691a 100644 --- a/libs/remix-ui/workspace/src/lib/components/workspace-hamburger-item.tsx +++ b/libs/remix-ui/workspace/src/lib/components/workspace-hamburger-item.tsx @@ -32,7 +32,7 @@ export function HamburgerMenuItem(props: HamburgerMenuItemProps) { > - + {props.kind === 'create' ? :} From 0a47c67f639764f312ce22f874b677837214a94b Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Wed, 11 Sep 2024 16:28:01 +0100 Subject: [PATCH 14/16] blank workspace counter starts from 1 --- libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index 8db36e36a0..2e035ac018 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -336,7 +336,7 @@ export function Workspace() { ) } - const [counter, setCounter] = useState(0) + const [counter, setCounter] = useState(1) const createBlankWorkspace = async () => { const username = await global.plugin.call('settings', 'get', 'settings/github-user-name') const email = await global.plugin.call('settings', 'get', 'settings/github-email') From 31689aaac09445889b608636ffc5ec4dc94de85a Mon Sep 17 00:00:00 2001 From: ryestew Date: Wed, 11 Sep 2024 23:40:19 -0400 Subject: [PATCH 15/16] update text to follow a standardized case style --- .../plugins/templates-selection/templates.ts | 227 +++++++++--------- .../src/app/tabs/locales/en/filePanel.json | 4 +- 2 files changed, 117 insertions(+), 114 deletions(-) diff --git a/apps/remix-ide/src/app/plugins/templates-selection/templates.ts b/apps/remix-ide/src/app/plugins/templates-selection/templates.ts index 2ea38759b1..41573f3c37 100644 --- a/apps/remix-ide/src/app/plugins/templates-selection/templates.ts +++ b/apps/remix-ide/src/app/plugins/templates-selection/templates.ts @@ -3,7 +3,7 @@ export const templates = (intl, plugin) => { { name: "Generic", items: [ - { value: "remixDefault", tagList: ["Solidity"], displayName: intl.formatMessage({ id: 'filePanel.basic' }), description: 'A default project' }, + { value: "remixDefault", tagList: ["Solidity"], displayName: intl.formatMessage({ id: 'filePanel.basic' }), description: 'The default project' }, { value: "blank", displayName: intl.formatMessage({ id: 'filePanel.blank' }), IsArtefact: true, description: 'A blank project' } ] }, @@ -14,102 +14,102 @@ export const templates = (intl, plugin) => { value: "ozerc20", displayName: "ERC20", tagList: ["ERC20", "Solidity"], - description: 'A simple ERC20 Project' + description: 'A simple fungible token contract' }, { - value: "ozerc721", - displayName: "ERC721 (NFT)", - tagList: ["ERC721", "Solidity"], - description: 'A simple ERC721 (aka NFT) Project' + value: "ozerc20", + displayName: "ERC20", + description: "An ERC20 contract with:", + tagList: ["Solidity"], + opts: { + mintable: true + } }, { - value: "ozerc1155", - tagList: ["Solidity"], - displayName: "ERC1155", - description: 'A simple ERC1155 (multi token) Project' + value: "ozerc20", + displayName: "ERC20", + description: "An ERC20 contract with:", + tagList: ["Solidity", "ERC20"], + opts: { + mintable: true, + burnable: true + }, }, { value: "ozerc20", displayName: "ERC20", - description: "A Standard Interface for fungible Tokens", - tagList: ["Solidity"], + description: "An ERC20 contract with:", opts: { - mintable: true - } + mintable: true, + pausable: true + }, + tagList: ["ERC20", "Solidity"] }, { value: "ozerc721", - displayName: "ERC721 (NFT)", - description: "Non-fungible Token Standard", - tagList: ["Solidity", "ERC721"], - opts: { - mintable: true - } + displayName: "ERC721", + tagList: ["ERC721", "Solidity"], + description: 'A simple non-fungible token (NFT) contract' }, { - value: "ozerc1155", - displayName: "ERC1155", - tagList: ["Solidity"], - description: "A Standard Interface for Contracts that manage Multiple Token types", + value: "ozerc721", + displayName: "ERC721", + description: "An ERC721 contract with:", + tagList: ["Solidity", "ERC721"], opts: { mintable: true } }, { - value: "ozerc20", - displayName: "ERC20", - description: "A Standard Interface for fungible Tokens", - tagList: ["Solidity", "ERC20"], + value: "ozerc721", + displayName: "ERC721 (NFT)", + description: "An ERC721 contract with:", opts: { mintable: true, burnable: true }, + tagList: ["ERC721", "Solidity"] }, { value: "ozerc721", displayName: "ERC721 (NFT)", - description: "Non-fungible Token Standard", + description: "An ERC721 contract with:", opts: { mintable: true, - burnable: true + pausable: true }, tagList: ["ERC721", "Solidity"] }, { value: "ozerc1155", + tagList: ["Solidity"], displayName: "ERC1155", - description: "A Standard Interface for Contracts that Manage multiple Token types", - opts: { - mintable: true, - burnable: true - }, - tagList: ["ERC1155", "Solidity"] + description: 'A simple multi token contract' }, { - value: "ozerc20", - displayName: "ERC20", - description: "A Standard Interface for fungible Tokens", + value: "ozerc1155", + displayName: "ERC1155", + tagList: ["Solidity"], + description: "An ERC1155 contract with:", opts: { - mintable: true, - pausable: true - }, - tagList: ["ERC20", "Solidity"] + mintable: true + } }, { - value: "ozerc721", - displayName: "ERC721 (NFT)", - description: "Non-fungible Token Standard", + value: "ozerc1155", + displayName: "ERC1155", + description: "An ERC1155 contract with:", opts: { mintable: true, - pausable: true + burnable: true }, - tagList: ["ERC721", "Solidity"] + tagList: ["ERC1155", "Solidity"] }, { value: "ozerc1155", displayName: "ERC1155", - description: "A Standard Interface for Contracts that manage Multiple Token types", - tagList: ["ERC20"], + description: "An ERC1155 contract with:", + tagList: ["ERC1155"], opts: { mintable: true, pausable: true @@ -122,120 +122,120 @@ export const templates = (intl, plugin) => { items: [ { value: "ozerc20", - displayName: "ERC20", - description: "A Standard Interface for fungible Tokens", + displayName: "UUPS ERC20", + description: "A simple ERC20 contract using the Universal Upgradeable Proxy Standard (UUPS) pattern", opts: { upgradeable: 'uups' }, tagList: ["ERC20", "Solidity"] }, { - value: "ozerc721", - displayName: "ERC721 (NFT)", - description: "Non-fungible Token Standard", + value: "ozerc20", + displayName: "UUPS ERC20", + description: "UUSP ERC20 contract with:", opts: { - upgradeable: 'uups' + upgradeable: 'uups', + mintable: true }, - tagList: ["ERC721", "Solidity"] + tagList: ["ERC20", "Solidity"] }, { - value: "ozerc1155", - displayName: "ERC1155", - description: "A Standard Interface for Contracts that manage Multiple Token types", + value: "ozerc20", + displayName: "UUPS ERC20", + description: "UUSP ERC20 contract with:", opts: { - upgradeable: 'uups' + upgradeable: 'uups', + mintable: true, + burnable: true }, - tagList: ["ERC1155", "Solidity"] + tagList: ["ERC20", "Solidity"] }, { value: "ozerc20", - displayName: "ERC20", - description: "A Standard Interface for fungible Tokens", + displayName: "UUPS ERC20", + description: "UUSP ERC20 contract with:", opts: { upgradeable: 'uups', - mintable: true + mintable: true, + pausable: true }, tagList: ["ERC20", "Solidity"] }, { value: "ozerc721", - displayName: "ERC721 (NFT)", - description: "Non-fungible Token Standard", + displayName: "UUPS ERC721", + description: "A simple UUPS ERC721 contract", opts: { - upgradeable: 'uups', - mintable: true + upgradeable: 'uups' }, tagList: ["ERC721", "Solidity"] }, { - value: "ozerc1155", - displayName: "ERC1155", - description: "A Standard Interface for Contracts that manage Multiple Token types", + value: "ozerc721", + displayName: "UUPS ERC721", + description: "UUPS ERC721 contract with:", opts: { upgradeable: 'uups', mintable: true }, - tagList: ["ERC1155", "Solidity"] + tagList: ["ERC721", "Solidity"] }, { - value: "ozerc20", - displayName: "ERC20", - description: "A Standard Interface for fungible Tokens", + value: "ozerc721", + displayName: "UUPS ERC721 (NFT)", + description: "Non-fungible Token Standard", opts: { upgradeable: 'uups', mintable: true, burnable: true }, - tagList: ["ERC20", "Solidity"] + tagList: ["ERC721", "Solidity"] }, { value: "ozerc721", - displayName: "ERC721 (NFT)", - description: "Non-fungible Token Standard", + displayName: "UUPS ERC721 (NFT)", + description: "UUPS ERC721 with: ", opts: { upgradeable: 'uups', mintable: true, - burnable: true + pausable: true }, tagList: ["ERC721", "Solidity"] }, { value: "ozerc1155", - displayName: "ERC1155", - description: "A Standard Interface for Contracts that manage Multiple Token types", + displayName: "UUPS ERC1155", + description: "A simple multi token contract using the UUPS pattern", opts: { - upgradeable: 'uups', - mintable: true, - burnable: true + upgradeable: 'uups' }, tagList: ["ERC1155", "Solidity"] }, { - value: "ozerc20", - displayName: "ERC20", - description: "A Standard Interface for fungible Tokens", + value: "ozerc1155", + displayName: "UUPS ERC1155", + description: "UUPS ERC1155 with:", opts: { upgradeable: 'uups', - mintable: true, - pausable: true + mintable: true }, - tagList: ["ERC20", "Solidity"] + tagList: ["ERC1155", "Solidity"] }, { - value: "ozerc721", - displayName: "ERC721 (NFT)", - description: "Non-fungible Token Standard", + value: "ozerc1155", + displayName: "UUPS ERC1155", + description: "UUPS ERC1155 with:", opts: { upgradeable: 'uups', mintable: true, - pausable: true + burnable: true }, - tagList: ["ERC721", "Solidity"] + tagList: ["ERC1155", "Solidity"] }, { value: "ozerc1155", - displayName: "ERC1155", - description: "A Standard Interface for Contracts that manage Multiple Token types", + displayName: "UUPS ERC1155", + description: "UUPS ERC1155 with:", opts: { upgradeable: 'uups', mintable: true, @@ -245,8 +245,8 @@ export const templates = (intl, plugin) => { }, { value: "ozerc1155", - displayName: "ERC1155", - description: "A Standard Interface for Contracts that manage Multiple Token types", + displayName: "UUPS ERC1155", + description: "UUPS ERC1155 with:", opts: { upgradeable: 'uups', mintable: true, @@ -274,27 +274,30 @@ export const templates = (intl, plugin) => { { value: "nft-staking-with-infinite-rewards", displayName: 'Nft Staking with infinite rewards' }, { value: "basic-dao", displayName: 'Basic DAO' }, { value: "soulbound-nft", displayName: 'Soulbound Nft' }, - { value: "multi-collection-nft-with-burnable-nfts-and-pausable-transfers", displayName: 'Multi collection nft with burnable nfts and pausable transfers' }, + { value: "multi-collection-nft-with-burnable-nfts-and-pausable-transfers", displayName: 'Multi collection NFT', description: "Multi collection NFT with:", opts: { + burnable: true, + pausable: true + }, }, ] }, { name: "OxProject", items: [ - { value: "zeroxErc20", displayName: "ERC20", tagList: ["ERC20", "Solidity"], description: "A standard Interface for fungible Tokens by 0xProject" } + { value: "zeroxErc20", displayName: "ERC20", tagList: ["ERC20", "Solidity"], description: "A fungible token contract by 0xProject" } ] }, { name: "Gnosis Safe", items: [ - { value: "gnosisSafeMultisig", tagList: ["Solidity"], displayName: intl.formatMessage({ id: 'filePanel.multiSigWallet' }), description: 'Deploy or Customize the Gnosis Safe.' } + { value: "gnosisSafeMultisig", tagList: ["Solidity"], displayName: intl.formatMessage({ id: 'filePanel.multiSigWallet' }), description: 'Deploy or customize the Gnosis Safe.' } ] }, { name: "Circom ZKP", items: [ - { value: "semaphore", tagList: ["ZKP"], displayName: intl.formatMessage({ id: 'filePanel.semaphore' }), description: 'Run a ZK Semaphore Circom Circuit.' }, - { value: "hashchecker", tagList: ["ZKP"], displayName: intl.formatMessage({ id: 'filePanel.hashchecker' }), description: 'Run a ZK Hash checker Circom Circuit.' }, - { value: "rln", tagList: ["ZKP"], displayName: intl.formatMessage({ id: 'filePanel.rln' }), description: 'Run a Rate Limiting Nullifier Circom Circuit.' } + { value: "semaphore", tagList: ["ZKP"], displayName: intl.formatMessage({ id: 'filePanel.semaphore' }), description: 'Semaphore protocol for casting a message as a provable group member' }, + { value: "hashchecker", tagList: ["ZKP"], displayName: intl.formatMessage({ id: 'filePanel.hashchecker' }), description: 'Hash checker Circom circuit' }, + { value: "rln", tagList: ["ZKP"], displayName: intl.formatMessage({ id: 'filePanel.rln' }), description: 'Rate Limiting Nullifier Circom circuit' } ] }, { @@ -304,7 +307,7 @@ export const templates = (intl, plugin) => { value: "sindriScripts", tagList: ["ZKP"], displayName: intl.formatMessage({ id: 'filePanel.addscriptsindri' }), - description: 'Use the Sindri API to Compile and Generate Proof.' + description: 'Use the Sindri API to compile and generate proofs' }, ], }, @@ -334,12 +337,12 @@ export const templates = (intl, plugin) => { value: "contractCreate2Factory", tagList: ["Solidity"], displayName: intl.formatMessage({ id: 'filePanel.addcreate2solidityfactory' }), - description: 'Factory for deploying a Contract using the CREATE2 opcode.' + description: 'Factory for deploying a contract using the CREATE2 opcode' }, { value: "contractDeployerScripts", displayName: intl.formatMessage({ id: 'filePanel.addscriptdeployer' }), - description: 'Script for deploying a Contract using the CREATE2 opcode.' + description: 'Script for deploying a contract using the CREATE2 opcode' } ] }, @@ -358,16 +361,16 @@ export const templates = (intl, plugin) => { items: [ { value: "runJsTestAction", displayName: intl.formatMessage({ id: 'filePanel.tssoltestghaction' }), - description: 'A Mocha Chai Test Workflow in a GitHub CI.' + description: 'A Mocha Chai test workflow in a GitHub CI.' }, { value: "runSolidityUnittestingAction", displayName: intl.formatMessage({ id: 'filePanel.solghaction' }), - description: 'Run a Solidity Unittest Workflow in a GitHub CI.' + description: 'Run a Solidity unit test workflow in a GitHub CI.' }, { value: "runSlitherAction", displayName: intl.formatMessage({ id: 'filePanel.slitherghaction' }), - description: 'Run a Slither Security Analysis in a GitHub CI.' + description: 'Run a Slither security analysis in a GitHub CI.' } ], IsArtefact: true diff --git a/apps/remix-ide/src/app/tabs/locales/en/filePanel.json b/apps/remix-ide/src/app/tabs/locales/en/filePanel.json index 549b7d00c0..378869138f 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/filePanel.json +++ b/apps/remix-ide/src/app/tabs/locales/en/filePanel.json @@ -2,7 +2,7 @@ "filePanel.displayName": "File explorer", "filePanel.workspace": "WORKSPACES", "filePanel.create": "Create", - "filePanel.createLabel": "Create using Template", + "filePanel.createLabel": "Create Using Template", "filePanel.createBlank":"Create Blank", "filePanel.create.desktop": "Create Project", "filePanel.clone": "Clone", @@ -11,7 +11,7 @@ "filePanel.restore": "Restore", "filePanel.name": "Name", "filePanel.save": "Save", - "filePanel.workspace.create": "Create Workspace using Templates", + "filePanel.workspace.create": "Create Workspace using template", "filePanel.workspace.createBlank": "Create Blank Workspace", "filePanel.workspace.create.desktop": "Create project in new folder", "filePanel.workspace.rename": "Rename Workspace", From a7b36434270e4398982193600b9fe318e2d90a5a Mon Sep 17 00:00:00 2001 From: ryestew Date: Thu, 12 Sep 2024 10:08:22 -0400 Subject: [PATCH 16/16] fix linting error --- apps/remix-ide/src/app/plugins/templates-selection/templates.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/plugins/templates-selection/templates.ts b/apps/remix-ide/src/app/plugins/templates-selection/templates.ts index 41573f3c37..1a70bcd906 100644 --- a/apps/remix-ide/src/app/plugins/templates-selection/templates.ts +++ b/apps/remix-ide/src/app/plugins/templates-selection/templates.ts @@ -274,7 +274,7 @@ export const templates = (intl, plugin) => { { value: "nft-staking-with-infinite-rewards", displayName: 'Nft Staking with infinite rewards' }, { value: "basic-dao", displayName: 'Basic DAO' }, { value: "soulbound-nft", displayName: 'Soulbound Nft' }, - { value: "multi-collection-nft-with-burnable-nfts-and-pausable-transfers", displayName: 'Multi collection NFT', description: "Multi collection NFT with:", opts: { + { value: "multi-collection-nft-with-burnable-nfts-and-pausable-transfers", displayName: 'Multi collection NFT', description: "Multi collection NFT with:", opts: { burnable: true, pausable: true }, },