Skip to content

Commit be4c4b8

Browse files
author
mydicebot
committed
190409
1 parent c0003b6 commit be4c4b8

File tree

4 files changed

+38
-31
lines changed

4 files changed

+38
-31
lines changed

src/api/controllers/apiController.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,12 @@ exports.checkerr = async function(req, res) {
334334
}
335335
};
336336

337+
exports.callback = async function(req, res) {
338+
let code = req.query.code;
339+
console.log(code);
340+
return res.status(200).json({'ret':false});
341+
};
342+
337343
async function getFiles(filePath,ext){
338344
let paths = [];
339345
return new Promise(( resolve, reject ) => {

src/api/routes/api.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ module.exports = function(app) {
3939
app.get('/:site/del', [createDice,checkScript], api.del);
4040
app.post('/:site/upload', [createDice,checkScript], api.upload);
4141
app.get('/:site/checkerr', [createDice,checkScript], api.checkerr);
42+
app.get('/mydicebot/callback', [createDice,checkScript], api.callback);
4243
app.get('/checkerr', [createDice,checkScript], api.checkerr);
4344
};
4445

src/views/info.pug

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ block content
123123

124124
var bot_iframe = {
125125
view:"iframe",
126-
src:"//mydicebot.com"
126+
src:"https://mydicebot.com"
127127
};
128128

129129
var faq_iframe = {
@@ -183,7 +183,7 @@ block content
183183

184184
var bet_datatable;
185185

186-
if(!webix.env.mobile) {
186+
if(!webix.env.touch) {
187187
bet_datatable = {
188188
id: "bet_datatable",
189189
view: "datatable",
@@ -221,19 +221,19 @@ block content
221221
//- minHeight: 500,
222222
width: 400,
223223
cells: [
224-
{
225-
header: "BOT",
226-
body: {
227-
id: "site_form",
228-
view: "form",
229-
padding: 4,
230-
//- minHeight: 500,
231-
width: 0,
232-
elements: [
233-
bot_iframe
234-
]
235-
}
236-
},
224+
<!--{-->
225+
<!--header: "BOT",-->
226+
<!--body: {-->
227+
<!--id: "site_form",-->
228+
<!--view: "form",-->
229+
<!--padding: 4,-->
230+
<!--//- minHeight: 500,-->
231+
<!--width: 0,-->
232+
<!--elements: [-->
233+
<!--bot_iframe-->
234+
<!--]-->
235+
<!--}-->
236+
<!--},-->
237237
{
238238
header: "MANUAL",
239239
body: {
@@ -691,7 +691,7 @@ block content
691691
bet_house_edge_selection,
692692
reset_session_button,
693693
switch_site_button,
694-
ads,
694+
<!--ads,-->
695695
]
696696
};
697697

@@ -711,7 +711,7 @@ block content
711711
]
712712
};
713713

714-
if(!webix.env.mobile) {
714+
if(!webix.env.touch) {
715715
webix.ui(
716716
{
717717
id: "bet_layout",
@@ -935,7 +935,7 @@ block content
935935
var mobiles = ['bet_total_stats', 'bet_current_stats', 'bet_current_stats2', 'bet_datatable', 'misc_items_form'];
936936

937937
webix.extend($$("bet_chart"), webix.ProgressBar);
938-
if(webix.env.mobile) {
938+
if(webix.env.touch ) {
939939
mobiles.forEach(function(element) {
940940
console.log(element);
941941
webix.extend($$(element), webix.ProgressBar);
@@ -1099,7 +1099,7 @@ block content
10991099
type:"icon",
11001100
delay:3000
11011101
});
1102-
if(webix.env.mobile) {
1102+
if(webix.env.touch) {
11031103
mobiles.forEach(function(element) {
11041104
$$(element).showProgress({
11051105
type:"icon",
@@ -1120,7 +1120,7 @@ block content
11201120
$$("script_bet_strategy_list").enable();
11211121
$$("script_bet_strategy_list").refresh();
11221122
$$("bet_chart").hideProgress();
1123-
if(webix.env.mobile) {
1123+
if(webix.env.touch) {
11241124
mobiles.forEach(function(element) {
11251125
$$(element).hideProgress();
11261126
});
@@ -1245,7 +1245,7 @@ block content
12451245
type:"icon",
12461246
delay:3000
12471247
});
1248-
if(webix.env.mobile) {
1248+
if(webix.env.touch) {
12491249
mobiles.forEach(function(element) {
12501250
$$(element).showProgress({
12511251
type:"icon",
@@ -1269,7 +1269,7 @@ block content
12691269
isLoop = outError(ret);
12701270
}
12711271
$$("bet_chart").hideProgress();
1272-
if(webix.env.mobile) {
1272+
if(webix.env.touch) {
12731273
mobiles.forEach(function(element) {
12741274
$$(element).hideProgress();
12751275
});
@@ -1360,7 +1360,7 @@ block content
13601360
type:"icon",
13611361
delay:3000
13621362
});
1363-
if(webix.env.mobile) {
1363+
if(webix.env.touch) {
13641364
mobiles.forEach(function(element) {
13651365
$$(element).showProgress({
13661366
type:"icon",
@@ -1388,7 +1388,7 @@ block content
13881388
isLoop = outError(ret);
13891389
}
13901390
$$("bet_chart").hideProgress();
1391-
if(webix.env.mobile) {
1391+
if(webix.env.touch) {
13921392
mobiles.forEach(function(element) {
13931393
$$(element).hideProgress();
13941394
});
@@ -1439,7 +1439,7 @@ block content
14391439
type:"icon",
14401440
delay:3000
14411441
});
1442-
if(webix.env.mobile) {
1442+
if(webix.env.touch) {
14431443
mobiles.forEach(function(element) {
14441444
$$(element).showProgress({
14451445
type:"icon",
@@ -1451,7 +1451,7 @@ block content
14511451
let ret = result.json();
14521452
//console.log(ret);
14531453
$$("bet_chart").hideProgress();
1454-
if(webix.env.mobile) {
1454+
if(webix.env.touch) {
14551455
mobiles.forEach(function(element) {
14561456
$$(element).hideProgress();
14571457
});
@@ -1464,7 +1464,7 @@ block content
14641464
type:"icon",
14651465
delay:3000
14661466
});
1467-
if(webix.env.mobile) {
1467+
if(webix.env.touch) {
14681468
mobiles.forEach(function(element) {
14691469
$$(element).showProgress({
14701470
type:"icon",
@@ -1475,7 +1475,7 @@ block content
14751475
webix.ajax().get('refresh?currency='+$$("bet_currency_selection").getText().toLowerCase()).then(function (result) {
14761476
let ret = result.json();
14771477
$$("bet_chart").hideProgress();
1478-
if(webix.env.mobile) {
1478+
if(webix.env.touch) {
14791479
mobiles.forEach(function(element) {
14801480
$$(element).hideProgress();
14811481
});
@@ -1597,13 +1597,13 @@ block content
15971597
}
15981598
})();
15991599
function focusFunction() {
1600-
if(webix.env.mobile) {
1600+
if(webix.env.touch) {
16011601
let layout = $$("mobile_toolbar").getParentView();
16021602
layout.hide();
16031603
}
16041604
}
16051605
function onblurFunction() {
1606-
if(webix.env.mobile) {
1606+
if(webix.env.touch) {
16071607
let layout = $$("mobile_toolbar").getParentView();
16081608
layout.show();
16091609
}

src/views/login.pug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ block content
336336
}
337337
);
338338

339-
if(webix.env.mobile) {
339+
if(webix.env.touch) {
340340
$$("mydicebot_official_site_info").hide();
341341
$$("ads_iframe").hide();
342342
$$("login_resizer").hide();

0 commit comments

Comments
 (0)