Skip to content

Commit

Permalink
Private Token & NFT Support
Browse files Browse the repository at this point in the history
  • Loading branch information
sakdeniz committed Dec 20, 2021
1 parent 532a446 commit 006153b
Show file tree
Hide file tree
Showing 12 changed files with 13,258 additions and 12,029 deletions.
2 changes: 1 addition & 1 deletion coins.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"data_dir_windows":"NavCoin4",
"data_dir_osx":"NavCoin4",
"data_dir_linux":".navcoin4",
"testnet_dir":"testnet3",
"testnet_dir":"testnet06nov2021",
"daemon_file_windows":"navcoind.exe",
"daemon_file_osx":"navcoind",
"daemon_file_linux":"navcoind",
Expand Down
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ function handleCommand(line)
if (os.type()==="Linux") Directory+="/";
if (bTestnet)
{
Directory+="testnet3";
Directory+="testnet06nov2021";
if (os.type()==="Windows_NT") Directory+="\\";
if (os.type()==="Darwin") Directory+="/";
if (os.type()==="Linux") Directory+="/";
Expand Down
165 changes: 71 additions & 94 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"v-tooltip": "^2.0.0-rc.33",
"vue": "^2.6.14",
"vue-clickaway": "^2.2.2",
"vue-json-edit": "^1.4.3",
"vue-notifyjs": "^0.4.3",
"vue-router": "^3.5.3",
"vuex": "^3.6.2"
Expand Down
25 changes: 25 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,31 @@ server=http.createServer(function (req, res)
{
client.walletPassphraseChange(post.old_password,post.new_password).then((retval) => sendResponse(res, 200,JSON.stringify(retval))).catch((e) => {sendError(res, 200,e);});
}
if (req.url=="/createtoken")
{
client.createtoken(post.name,post.symbol,post.max_supply).then((retval) => sendResponse(res, 200,JSON.stringify(retval))).catch((e) => {sendError(res, 200,e);});
}
if (req.url=="/minttoken")
{
client.minttoken(post.mint_token_id,post.mint_token_destination,post.mint_token_amount).then((retval) => sendResponse(res, 200,JSON.stringify(retval))).catch((e) => {sendError(res, 200,e);});
}
if (req.url=="/burntoken")
{
client.burntoken(post.mint_token_id,post.mint_token_amount).then((retval) => sendResponse(res, 200,JSON.stringify(retval))).catch((e) => {sendError(res, 200,e);});
}
if (req.url=="/createnft")
{
client.createnft(post.name,post.scheme,post.max_supply).then((retval) => sendResponse(res, 200,JSON.stringify(retval))).catch((e) => {sendError(res, 200,e);});
}
if (req.url=="/mintnft")
{
console.log(post);
client.mintnft(post.mint_token_id,post.mint_nft_id,post.mint_nft_destination,post.mint_nft_meta_data).then((retval) => sendResponse(res, 200,JSON.stringify(retval))).catch((e) => {sendError(res, 200,e);});
}
if (req.url=="/listtokens")
{
client.listtokens().then((retval) => sendResponse(res, 200,JSON.stringify(retval))).catch((e) => {sendError(res, 200,e);});
}
if (req.url=="/walletpassphrase")
{
client.walletPassphrase(post.passphrase,1073741824,post.bunlockforstaking).then((retval) => sendResponse(res, 200,JSON.stringify(retval))).catch((e) => {sendError(res, 200,e);});
Expand Down
12 changes: 12 additions & 0 deletions src/components/Dashboard/Layout/DashboardLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@
<i class="ion-code"></i>
<p>DAO</p>
</sidebar-link>
<sidebar-link v-if="coin.bool_support_community_fund=='1'" to="/admin/private-token">
<i class="ion-hammer"></i>
<p>Private Token</p>
</sidebar-link>
<sidebar-link v-if="coin.bool_support_community_fund=='1'" to="/admin/nft">
<i class="ion-image"></i>
<p>NFT Workshop</p>
</sidebar-link>
<sidebar-link v-if="coin.bool_support_community_fund=='1'" to="/admin/dotNAV">
<i class="ion-earth"></i>
<p>dotNAV</p>
</sidebar-link>
<!--<sidebar-link to="/admin/news">
<i class="ion-social-rss"></i>
<p>NEWS</p>
Expand Down
20 changes: 10 additions & 10 deletions src/components/Dashboard/Views/DAO.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,22 +142,22 @@
{{consultation}}
</pre>
</div>!-->
<span v-if="consultation.version==3" class="label ui default">
<span class="label ui default">
Min : {{consultation.min}}
</span>
<span v-if="consultation.version==3" class="label ui default">
<span class="label ui default">
Max : {{consultation.max}}
</span>
<span v-if="consultation.version==5" class="label ui default">
Max Selection : {{consultation.max}}
</span>
<span v-if="consultation.version==3 && consultation.state==0">
<span v-if="consultation.state==0">
<a class="ui green header" v-on:click="support(consultation.hash,true)"><i class="thumbs up outline icon" aria-hidden="true"></i></a>
<a class="ui red header" v-on:click="support(consultation.hash,false)"><i class="thumbs down outline icon" aria-hidden="true"></i></a>
</span>
</div>

<div v-for="(itm,index) in consultation.answers" v-if="consultation.version==3">
<!--<div v-for="(itm,index) in consultation.answers">
<div style="margin-bottom:15px;" v-if="consultation.state==1">
<a class="ui button success" v-on:click="vote_value(consultation,consultation.min,consultation.max)">Vote</a>
</div>
Expand All @@ -168,18 +168,18 @@
Option
</th>
<th style="width:100%">
Votes
Support
</th>
</tr>
</thead>
<tr v-for="(support, option) in itm" :key="support">
<td>{{option}}</td>
<td>{{support}}</td>
<tr>
<td>{{itm.answer}}</td>
<td>{{itm.support}}</td>
</tr>
</table>
</div>
</div>!-->

<table class="table table-bordered" v-if="consultation.version==1||consultation.version==5||consultation.version==13" >
<table class="table table-bordered">
<thead>
<tr>
<th nowrap v-if="consultation.state==0">
Expand Down
Loading

0 comments on commit 006153b

Please sign in to comment.