-
-
Notifications
You must be signed in to change notification settings - Fork 775
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- remove unused admin methods - add activity on close bounty - fixed broken fa icons - updated tooltip design - added icon for expired fulfillment to inform user - set txn/address link based on token
- Loading branch information
1 parent
b6b38df
commit c778cd2
Showing
10 changed files
with
114 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,6 @@ const loadingState = { | |
}; | ||
|
||
document.result = bounty; | ||
// listen_for_web3_changes(); | ||
|
||
Vue.mixin({ | ||
methods: { | ||
|
@@ -44,6 +43,52 @@ Vue.mixin({ | |
_alert('Error fetching bounties. Please contact [email protected]', 'error'); | ||
}); | ||
}, | ||
getTransactionURL: function(token_name, txn) { | ||
let url; | ||
|
||
switch (token_name) { | ||
case 'ETC': | ||
url = `https://blockscout.com/etc/mainnet/tx/${txn}`; | ||
break; | ||
|
||
case 'cUSD': | ||
case 'cGLD': | ||
url = `https://alfajores-blockscout.celo-testnet.org/tx/${txn}`; | ||
break; | ||
|
||
case 'ZIL': | ||
url = `https://viewblock.io/zilliqa/tx/${txn}`; | ||
break; | ||
|
||
default: | ||
url = `https://etherscan.io/tx/${txn}`; | ||
|
||
} | ||
return url; | ||
}, | ||
getAddressURL: function(token_name, address) { | ||
let url; | ||
|
||
switch (token_name) { | ||
case 'ETC': | ||
url = `https://blockscout.com/etc/mainnet/address/${address}`; | ||
break; | ||
|
||
case 'cUSD': | ||
case 'cGLD': | ||
url = `https://alfajores-blockscout.celo-testnet.org/address/${address}`; | ||
break; | ||
|
||
case 'ZIL': | ||
url = `https://viewblock.io/zilliqa/address/${address}`; | ||
break; | ||
|
||
default: | ||
url = `https://etherscan.io/address/${address}`; | ||
} | ||
return url; | ||
}, | ||
|
||
syncBounty: function() { | ||
let vm = this; | ||
|
||
|
@@ -254,33 +299,6 @@ Vue.mixin({ | |
} | ||
} | ||
}, | ||
contactFunder: function() { | ||
let vm = this; | ||
let text = window.prompt('What would you like to say to the funder?', ''); | ||
|
||
if (text === null) { | ||
return; | ||
} | ||
document.location.href = `${vm.bounty.url}?admin_contact_funder=${text}`; | ||
}, | ||
snoozeeGitbot: function() { | ||
let vm = this; | ||
let text = window.prompt('How many days do you want to snooze?', ''); | ||
|
||
if (text === null) { | ||
return; | ||
} | ||
document.location.href = `${vm.bounty.url}?snooze=${text}`; | ||
}, | ||
overrideStatus: function() { | ||
let vm = this; | ||
let text = window.prompt('What new status (valid choices: "open", "started", "submitted", "done", "expired", "cancelled", "" to remove override )?', ''); | ||
|
||
if (text === null) { | ||
return; | ||
} | ||
document.location.href = `${vm.bounty.url}?admin_override_satatus=${text}`; | ||
}, | ||
hasAcceptedFulfillments: function() { | ||
let vm = this; | ||
|
||
|
@@ -370,13 +388,6 @@ Vue.mixin({ | |
activities.forEach(activity => { | ||
if (activity.metadata) { | ||
if (activity.metadata.new_bounty) { | ||
// ETH | ||
activity.metadata.new_bounty['token_value'] = activity.metadata.new_bounty.value_in_token / 10 ** decimals; | ||
if (activity.metadata.old_bounty) { | ||
activity.metadata.old_bounty['token_value'] = activity.metadata.old_bounty.value_in_token / 10 ** decimals; | ||
} | ||
} else { | ||
// cross-chain | ||
activity.metadata['token_value'] = activity.metadata.value_in_token / 10 ** decimals; | ||
} | ||
} | ||
|
@@ -502,7 +513,6 @@ var extend_expiration = function(bounty_pk, data) { | |
}; | ||
|
||
var show_interest_modal = function() { | ||
var self = this; | ||
var modals = $('#modalInterest'); | ||
let modalBody = $('#modalInterest .modal-content'); | ||
let modalUrl = `/interest/modal?redirect=${window.location.pathname}&pk=${document.result['pk']}`; | ||
|
@@ -529,9 +539,6 @@ var show_interest_modal = function() { | |
discord_username: $('#discord_username').length ? $('#discord_username').val() : null | ||
}).then(success => { | ||
if (success) { | ||
// $(self).attr('href', '/uninterested'); | ||
// $(self).find('span').text(gettext('Stop Work')); | ||
// $(self).parent().attr('title', '<div class="tooltip-info tooltip-sm">' + gettext('Notify the funder that you will not be working on this project') + '</div>'); | ||
appBounty.fetchBounty(); | ||
modals.bootstrapModal('hide'); | ||
|
||
|
@@ -579,17 +586,4 @@ const promisify = (inner) => | |
resolve(res); | ||
} | ||
}) | ||
); | ||
|
||
// async function waitBlock(txid) { | ||
// while (true) { | ||
// let receipt = web3.eth.getTransactionReceipt(txid); | ||
// if (receipt && receipt.contractAddress) { | ||
// console.log("Your contract has been deployed at http://testnet.etherscan.io/address/" + receipt.contractAddress); | ||
// console.log("Note that it might take 30 - 90 sceonds for the block to propagate befor it's visible in etherscan.io"); | ||
// break; | ||
// } | ||
// console.log("Waiting a mined block to include your contract... currently in block " + web3.eth.blockNumber); | ||
// await sleep(4000); | ||
// } | ||
// } | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.