-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8bd559e
commit 40e43e0
Showing
7 changed files
with
159 additions
and
45 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
module.exports = { | ||
|
||
friendlyName: 'Get all the tokens', | ||
description: 'Return the list of the tokens.', | ||
|
||
inputs: { | ||
'limit': { | ||
type: 'number', | ||
example: 10, | ||
description: 'The nquery to execute.', | ||
required: false, | ||
defaultsTo: 10, | ||
}, | ||
'page': { | ||
type: 'number', | ||
example: 2, | ||
description: 'The nquery to execute.', | ||
required: false, | ||
defaultsTo: 0, | ||
}, | ||
'bounty': { | ||
type: 'number', | ||
example: 2, | ||
description: 'The nquery to execute.', | ||
required: true, | ||
}, | ||
}, | ||
|
||
fn: async function (inputs, exits) { | ||
console.log(inputs) | ||
var knex = await sails.helpers.db.getknex(); | ||
var base = knex.select('*').from('dapp_bounties_network').where('bounty_id', inputs.bounty); | ||
var results = await base.paginate(inputs['limit'], inputs['page'], true); | ||
results.count = results.total; | ||
return exits.success(results); | ||
|
||
} | ||
|
||
}; |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
parasails.registerPage('page_dapp_bounties_bounty', { | ||
|
||
data: { | ||
columns: [ | ||
'timestamp', | ||
'bounty_id', | ||
'type', | ||
], | ||
options: { | ||
filterable: false, | ||
perPageValues: [25, 50, 100, 500], | ||
perPage: 25, | ||
headings: { | ||
'timestamp': 'Date', | ||
'bounty_id': 'Bounty', | ||
} | ||
} | ||
}, | ||
|
||
beforeMount: function() { | ||
console.log('before monted') | ||
}, | ||
|
||
mounted: function() { | ||
console.log("Successfully mounted") | ||
}, | ||
|
||
methods: { | ||
|
||
} | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<div id="page_dapp_bounties_bounty" class="container " style="margin-top: 20px; margin-bottom: 20px; "> | ||
<div class="card" style="padding: 20px;"> | ||
<h3 class="title"><img src="/images/dapps/bounties.png" style="height: 0.8em; margin-right: 20px;"></img>The Bounties Network</h3> | ||
<p>The <strong>Bounties Network</strong> empowers humans to incentivize and self-organize, from freelancing to grassroots social action, and anything in between. Whether it's for research, content translation, or video production, The Bounties Network lets you create projects, collaborate, and get paid for doing great work in any domain.</p> | ||
<hr> | ||
<h3 class="title is-4">Activity</h3> | ||
<v-server-table url="/api/dapp/bounties/activity" :columns="columns" :options="options"> | ||
<center slot="timestamp" slot-scope="props"> | ||
<from-now :timestamp="props.row.timestamp"></from-now> | ||
</center> | ||
<center slot="bounty_id" slot-scope="props"> | ||
<bounty-link :bounty_id="props.row.bounty_id"></bounty-link> | ||
</center> | ||
<center slot="type" slot-scope="props"> | ||
<p v-if="props.row.type =='BountyIssued'" style="color: #000000">Bounty Issued</p> | ||
<p v-if="props.row.type =='ContributionAdded'"><span style="color: #000000">Contribution Added</span> by <address_etherscan_link :address="props.row.topic_1"></address_etherscan_link></p> | ||
<p v-if="props.row.type =='BountyActivated'" style="color: #000000">Bounty Activated</p> | ||
<p v-if="props.row.type =='BountyFulfilled'" ><span style="color: #1e88e5">Bounty Fulfilled</span> by <address_etherscan_link :address="props.row.topic_1"></address_etherscan_link></p> | ||
<p v-if="props.row.type =='FulfillmentAccepted'" ><span style="color: #558b2f">Fulfillment Accepted</span> by <address_etherscan_link :address="props.row.topic_1"></address_etherscan_link></p> | ||
<p v-if="props.row.type =='PaymentIncreased'" style="color: #000000">Payment Increased</p> | ||
<p v-if="props.row.type =='BountyKilled'" style="color: #000000">Bounty Killed</p> | ||
<p v-if="props.row.type =='BountyChanged'" style="color: #000000">Bounty Changed</p> | ||
<p v-if="props.row.type =='IssuerTransferred'" style="color: #000000">Issuer Transferred</p> | ||
<p v-if="props.row.type =='DeadlineExtended'" style="color: #000000">Deadline Extended</p> | ||
</center> | ||
<center slot="name" slot-scope="props"> | ||
<strong>{{props.row.name}}</strong> ({{props.row.symbol}}) | ||
</center> | ||
|
||
</v-server-table> | ||
</div> | ||
</div> |
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