Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a <Delete Me> button to the Contract views (#133) and Provide feedback on contract with no storage (#125) #139

Closed
wants to merge 10 commits into from
12 changes: 11 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,15 @@

// Auto format files on save using Prettier:
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "esbenp.prettier-vscode",

//Adding the following code allows us to change the colors on the status bar at the bottom of the VS Code border to whatever we like
"workbench.colorCustomizations": {
"statusBar.background": "#1A1A1A",
"statusBar.noFolderBackground": "#212121",
"statusBar.debuggingBackground": "#263238",
"statusBarItem.prominentForeground": "#55eb34",

"statusBar.foreground": "#ce8416"
}
}
12 changes: 12 additions & 0 deletions src/panel/components/views/Contract.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,21 @@ export default function Contract({ viewState, postMessage }: Props) {
viewState.autoCompleteData.contractPaths[hash] ||
viewState.autoCompleteData.contractPaths[name] ||
[];

let statement;

if (name === "StdLib") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CryptoLib doesn't have any storage either

statement = "Note- these contracts do not contain any storage";
} else {
statement = "";
}

return (
<div style={{ padding: 10 }}>
<h1>{name}</h1>
<button> Click to Delete </button>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there logic that gets executed when this button is pushed?

<br></br>
<h2> {statement} </h2>
{!!description && (
<p style={{ paddingLeft: 20 }}>
<div style={{ fontWeight: "bold", marginBottom: 10, marginTop: 15 }}>
Expand Down