forked from binary-com/binary-static
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from binary-com/master
Release to Production
- Loading branch information
Showing
12 changed files
with
85 additions
and
14 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
pjax_config_page("endpoint", function(){ | ||
return { | ||
onLoad: function() { | ||
$('#new_endpoint').on('click', function () { | ||
var server_url = $('#server_url').val(), | ||
app_id = $('#app_id').val(); | ||
if (Trim(server_url) !== '') localStorage.setItem('server_url', server_url); | ||
if (Trim(app_id) !== '') localStorage.setItem('app_id', app_id); | ||
window.location.reload(); | ||
}); | ||
$('#reset_endpoint').on('click', function () { | ||
localStorage.removeItem('server_url'); | ||
localStorage.removeItem('app_id'); | ||
window.location.reload(); | ||
}); | ||
} | ||
}; | ||
}); |
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 |
---|---|---|
@@ -1,11 +1,17 @@ | ||
/* | ||
* Configuration values needed in js codes | ||
* | ||
* | ||
* NOTE: | ||
* Please use the following command to avoid accidentally committing personal changes | ||
* git update-index --assume-unchanged src/javascript/config.js | ||
* | ||
*/ | ||
|
||
var app_id = '1'; | ||
var socket_url = 'wss://ws.binaryws.com/websockets/v3'; | ||
function getAppId() { | ||
return localStorage.getItem('app_id') ? localStorage.getItem('app_id') : | ||
/staging\.binary\.com/i.test(window.location.hostname) ? '1098' : '1'; | ||
} | ||
|
||
function getSocketURL() { | ||
return localStorage.getItem('server_url') ? 'wss://' + localStorage.getItem('server_url') + '/websockets/v3' : 'wss://ws.binaryws.com/websockets/v3'; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<div class="endpoint-config"> | ||
<h1>[% l('Change API Endpoint') %]</h1> | ||
<div class="grd-parent grd-row-padding"> | ||
<div class="rbox form"> | ||
<div class="rbox-wrap"> | ||
<fieldset> | ||
<legend>[% l('Details') %]</legend> | ||
<div class="grd-row-padding row clear"> | ||
<div class="grd-grid-4 form_label"> | ||
<label for="server_url">[% l('Server') %]</label> | ||
</div> | ||
<div class="grd-grid-8"> | ||
<input type="text" class="text" id="server_url" maxlength="30"></input> | ||
<p class="hint"> | ||
[% l('e.g. www.binaryqa36.com') %] | ||
</p> | ||
<p class="errorfield" id="error-server_url" style="display:none"></p> | ||
</div> | ||
</div> | ||
<div class="grd-row-padding row clear"> | ||
<div class="grd-grid-4 form_label"> | ||
<label for="app_id">[% l('OAuth App ID (Optional)') %]</label> | ||
</div> | ||
<div class="grd-grid-8"> | ||
<input type="text" class="text" id="app_id" maxlength="30"></input> | ||
<p class="hint"> | ||
[% l('e.g. id-HXSSH5AIQylFwsiUcXGqpXApvnFe') %] | ||
<br/> | ||
[% l('You have to register and get App ID before you can use different OAuth server for authentication. For more information refer to OAuth details on https://developers.binary.com/.') %] | ||
</p> | ||
<p class="errorfield" id="error-app_id" style="display:none"></p> | ||
</div> | ||
</div> | ||
</fieldset> | ||
<fieldset class="center-aligned" id="formlayout"> | ||
<div class="button" style="display:inline-block"> | ||
<button class="button" id="new_endpoint">[% l('Submit') %]</button> | ||
</div> | ||
<div class="button" style="display:inline-block"> | ||
<button class="button" id="reset_endpoint">[% l('Reset to Original Settings') %]</button> | ||
</div> | ||
</fieldset> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |