Skip to content

Commit

Permalink
Add radspec and fix updateWidget
Browse files Browse the repository at this point in the history
- Added more detailed radspec to addWidget & updateWidget
- Used links to IPFS for radspec
- Commented saveWidget code so updateWidget works
  • Loading branch information
Quazia committed Jun 6, 2019
1 parent 758ad80 commit 2aba6f2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions app/src/components/panel/PanelContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ const PanelContent = ({
closePanel,
ipfsAddr,
position,
saveWidget,
// Widget re-ordering currently disabled
// saveWidget,
}) => {
const [unsavedText, setUnsavedText] = useState(content)
const [screenIndex, setScreenIndex] = useState(0)
Expand Down Expand Up @@ -66,7 +67,8 @@ const PanelContent = ({
}
}
}, [savedIpfsAddr, savePending])

/*
Widget re-ordering currently disabled
useEffect(() => {
if (ipfsAddr && savePending) {
saveWidget(ipfsAddr, 0).subscribe(
Expand All @@ -82,7 +84,7 @@ const PanelContent = ({
}
setUnsavedText(content)
}, [content, savedIpfsAddr, savePending])

*/
const handleChange = _screenIndex => {
setScreenIndex(_screenIndex)
}
Expand Down
4 changes: 2 additions & 2 deletions contracts/HomePage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ contract HomePage is AragonApp {
}

/**
* @notice Add a widget's IPFS hash to the registry
* @notice Add a widget to the registry https://ipfs.infura.io/ipfs/`_addr`
* @param _addr IPFS hash of the widget's data
*/
function addWidget(string _addr) external auth(ADD_ROLE) {
Expand All @@ -49,7 +49,7 @@ contract HomePage is AragonApp {
}

/**
* @notice Update a widget's IPFS hash
* @notice Update widget `_priority` to https://ipfs.infura.io/ipfs/`_addr`
* @param _priority Index of the widget
* @param _addr IPFS hash of the widget's data
*/
Expand Down

0 comments on commit 2aba6f2

Please sign in to comment.