Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion server/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ exports.dbTables = [
['address', 'TEXT'],
['rpc_user', 'TEXT'],
['rpc_password', 'TEXT'],
['info', 'TEXT']
['info', 'TEXT'],
['site', 'TEXT'],
['explorer', 'TEXT'],
['twitter', 'TEXT'],
['telegram', 'TEXT'],
['discord', 'TEXT']
]
},
{
Expand Down
26 changes: 23 additions & 3 deletions server/views/pages/admin/main.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,29 @@
<input class="textinput textInput form-control" id="coin-hold" maxlength="10" name="hold" type="text" placeholder="0.002" required>
</div>
<div class="form-group">
<label class="col-form-label" for="coin-hold">Coin Page</label>
<input class="textinput textInput form-control" id="coin-page" maxlength="1000" name="infopage" type="text" placeholder="http://bitcointalk.org" required>
</div>
<label class="col-form-label" for="coin-page">BitcoinTalk Page</label>
<input class="textinput textInput form-control" id="coin-page" maxlength="1000" name="infopage" type="text" placeholder="http://bitcointalk.org" required>
</div>
<div class="form-group">
<label class="col-form-label" for="coin-site">Website Page</label>
<input class="textinput textInput form-control" id="coin-site" maxlength="1000" name="site" type="text" placeholder="website coin" required>
</div>
<div class="form-group">
<label class="col-form-label" for="coin-explorer">Explorer Page</label>
<input class="textinput textInput form-control" id="coin-explorer" maxlength="1000" name="explorer" type="text" placeholder="explorer coin" required>
</div>
<div class="form-group">
<label class="col-form-label" for="coin-twitter">Twitter Page</label>
<input class="textinput textInput form-control" id="coin-twitter" maxlength="1000" name="twitter" type="text" placeholder=" twitter project" required>
</div>
<div class="form-group">
<label class="col-form-label" for="coin-telegram">Telegram Page</label>
<input class="textinput textInput form-control" id="coin-telegram" maxlength="1000" name="telegram" type="text" placeholder="Telegram project" required>
</div>
<div class="form-group">
<label class="col-form-label" for="coin-discord">Discord Page</label>
<input class="textinput textInput form-control" id="coin-discord" maxlength="1000" name="discord" type="text" placeholder="Discord project" required>
</div>
<div class="form-group form-check">
<label class="form-check-label">
<input id="coin-visible" type="checkbox" class="form-check-input">
Expand Down
51 changes: 51 additions & 0 deletions server/views/pages/private_js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,53 @@ $('#coin-page').change(e => {
$('#coin-info').val(JSON.stringify(info));
});

///////////////////////////////////

$('#coin-site').change(e => {
var info = {};
try {info = JSON.parse($('#coin-info').val())}catch(e){}

info['site'] = $('#coin-site').val();

$('#coin-info').val(JSON.stringify(info));
});
//////////////////////////
$('#coin-explorer').change(e => {
var info = {};
try {info = JSON.parse($('#coin-info').val())}catch(e){}

info['explorer'] = $('#coin-explorer').val();

$('#coin-info').val(JSON.stringify(info));
});
////////////////////////
$('#coin-twitter').change(e => {
var info = {};
try {info = JSON.parse($('#coin-info').val())}catch(e){}

info['twitter'] = $('#coin-twitter').val();

$('#coin-info').val(JSON.stringify(info));
});
/////////////////////
$('#coin-telegram').change(e => {
var info = {};
try {info = JSON.parse($('#coin-info').val())}catch(e){}

info['telegram'] = $('#coin-telegram').val();

$('#coin-info').val(JSON.stringify(info));
});
///////////////////
$('#coin-discord').change(e => {
var info = {};
try {info = JSON.parse($('#coin-info').val())}catch(e){}

info['discord'] = $('#coin-discord').val();

$('#coin-info').val(JSON.stringify(info));
});
/////////////////////////////////
$('#coin-minconf').change(e => {
if (!isInt($('#coin-minconf').val()))
return;
Expand Down Expand Up @@ -454,6 +500,11 @@ function UpdateAdminCoins(data, client_request)
$('#coin-minconf').val(info['minconf'] || "");
$('#coin-hold').val(info['hold'] || "");
$('#coin-page').val(info['page'] || "");
$('#coin-site').val(info['site'] || "");
$('#coin-explorer').val(info['explorer'] || "");
$('#coin-twitter').val(info['twitter'] || "");
$('#coin-telegram').val(info['telegram'] || "");
$('#coin-discord').val(info['discord'] || "");
}

$("#coins-select option[value='"+currentCoin+"']").prop('selected', true);
Expand Down
10 changes: 8 additions & 2 deletions static_pages/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,18 @@ function UpdateMCFromLB()

function AddCoinInfo(info)
{
if (!info.result || !info.result.coin_info || !info.result.coin_info.page)
if (!info.result || !info.result.coin_info || !info.result.coin_info.page || !info.result.coin_info.site || !info.result.coin_info.explorer || !info.result.coin_info.twitter || !info.result.coin_info.telegram || !info.result.coin_info.discord)
return;

$('#coin_legend').text(g_CurrentPair);

const p1 = $('<p><strong>Forum</strong> ANN: <a target="_blank" href="'+(info.result.coin_info.page || "")+'">'+g_CurrentPair+' @ bitcointalk</a></p>');
const p1 = $('<strong>Info '+g_CurrentPair+':</strong>'+
' <a target="_blank" href="'+(info.result.coin_info.site || "")+'"><img class="img-fluid" src="https://w7.pngwing.com/pngs/357/433/png-transparent-computer-icons-website-web-design-logo-grey-thumbnail.png" height="20" width="20"></a>'+
' <a target="_blank" href="'+(info.result.coin_info.explorer || "")+'"><img class="img-fluid" src="https://www.freeiconspng.com/uploads/website-icon-11.png" height="20" width="20"></a>'+
' <a target="_blank" href="'+(info.result.coin_info.page || "")+'"><img class="img-fluid" src="https://logodownload.org/wp-content/uploads/2017/06/bitcoin-logo-5-1.png" height="20" width="20"></a>'+
' <a target="_blank" href="'+(info.result.coin_info.twitter || "")+'"><img class="img-fluid" src="https://toppng.com/uploads/preview/transparent-background-twitter-logo-11549680611xgjb22i2ts.png" height="20" width="20"></a>'+
' <a target="_blank" href="'+(info.result.coin_info.telegram || "")+'"><img class="img-fluid" src="https://www.freepnglogos.com/uploads/telegram-logo-png-0.png" height="20" width="20"></a>'+
' <a target="_blank" href="'+(info.result.coin_info.discord || "")+'"><img class="img-fluid" src="https://www.freepnglogos.com/uploads/discord-logo-png/discord-will-provide-official-verification-esports-team-4.png" height="20" width="20"></a>');
$('#coin_info').empty().append(p1);
}

Expand Down