Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit 9404896

Browse files
author
mattpass
committed
Tweaks on tutorial display incl settings show if tabs open
1 parent d78821a commit 9404896

File tree

1 file changed

+26
-11
lines changed

1 file changed

+26
-11
lines changed

assets/js/icecoder.js

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5033,12 +5033,15 @@ var ICEcoder = {
50335033
},
50345034

50355035
viewTutorial: function(step, delay) {
5036-
var winW, winH;
5036+
let winW, winH, cM, cMDiff;
50375037

50385038
winW = window.innerWidth;
50395039
winH = window.innerHeight;
50405040

5041-
var steps = {
5041+
cM = this.getcMInstance();
5042+
cMDiff = this.getcMdiffInstance();
5043+
5044+
let steps = {
50425045
0: {
50435046
"width": 250,
50445047
"height": 55,
@@ -5059,26 +5062,26 @@ var ICEcoder = {
50595062
},
50605063
2: {
50615064
"width": 250,
5062-
"height": winH - 85,
5065+
"height": winH - 73,
50635066
"top": 50,
50645067
"left": 0,
50655068
"title": "File manager",
50665069
"message": "This is the file manager. Click a dir to open/close, double click a file to open it and right click on dirs/files to get relevant options. You can drag and drop too.",
50675070
"button": "next >"
50685071
},
50695072
3: {
5070-
"width": 45,
5071-
"height": 85,
5073+
"width": 43,
5074+
"height": 102,
50725075
"top": 50,
5073-
"left": 205,
5076+
"left": 195,
50745077
"title": "File manager options and plugins",
50755078
"message": "Here you can unlock/lock the file manager to collapse/expand it, refresh the file manager plus view and install plugins. (Also, move your mouse to left edge of file manager for quick access to the plugins).",
50765079
"button": "next >"
50775080
},
50785081
4: {
50795082
"width": 250,
50805083
"height": 35,
5081-
"top": winH - 35,
5084+
"top": winH - 30,
50825085
"left": 0,
50835086
"title": "Extra tools",
50845087
"message": "Get access to the terminal, output, database and Git interfaces here, displayed as an overlay to get the largest display, click option again to slide overlay out.",
@@ -5117,7 +5120,7 @@ var ICEcoder = {
51175120
"top": 70,
51185121
"left": 250,
51195122
"title": "System info",
5120-
"message": "This is general info about your server, paths, browser and more. Worth noting to ensure settings seem correct.",
5123+
"message": "This is general info about your server, paths, browser and more. Worth noting to ensure settings seem correct. Viewable when no tabs showing.",
51215124
"button": "next >"
51225125
},
51235126
9: {
@@ -5159,7 +5162,7 @@ var ICEcoder = {
51595162
get("infoMessageContainer").style.marginTop = -300 + "px";
51605163
// After 100ms show border and message text (still above screen)
51615164
setTimeout(function() {
5162-
get("infoBlackMask").style.border = "solid 10000px rgba(0,0,0,0.8)";
5165+
get("infoBlackMask").style.border = "solid 10000px rgba(0, 0, 0, 0.8)";
51635166
get("infoMessageContainer").style.opacity = "1";
51645167
}, 100);
51655168
// After requested delay, slide in message but account for logo
@@ -5171,12 +5174,24 @@ var ICEcoder = {
51715174
return;
51725175
}
51735176

5177+
if (8 === step) {
5178+
if (cM) {
5179+
cM.getWrapperElement().style.visibility = "hidden";
5180+
cMDiff.getWrapperElement().style.visibility = "hidden";
5181+
}
5182+
}
5183+
51745184
if (9 === step) {
5185+
if (cM) {
5186+
cM.getWrapperElement().style.visibility = "";
5187+
cMDiff.getWrapperElement().style.visibility = "";
5188+
}
51755189
if ("" === get("versionsDisplay").innerText) {
51765190
get("versionsDisplay").innerText = "12345 backups";
51775191
}
51785192
steps[9].width = get("versionsDisplay").innerText.length * 9;
51795193
}
5194+
51805195
if (10 === step) {
51815196
if ("12345 backups" === get("versionsDisplay").innerText) {
51825197
get("versionsDisplay").innerText = "";
@@ -5186,15 +5201,15 @@ var ICEcoder = {
51865201
// If we're going beyond the last step, we're finishing
51875202
if (11 < step) {
51885203
// Reset styles ready for next time
5189-
get("infoBlackMask").style.border = "solid 10000px rgba(0,0,0,0)";
5204+
get("infoBlackMask").style.border = "solid 10000px rgba(0, 0, 0, 0)";
51905205
get("infoMessageContainer").style.opacity = "0";
51915206
setTimeout(function() {
51925207
get("infoBlackMask").style.display = "none";
51935208
get("infoMessageContainer").style.display = "none";
51945209
}, 500);
51955210
// Mark tutorial as done in users settings and return
51965211
xhr = this.xhrObj();
5197-
xhr.open("POST",this.iceLoc+"/lib/settings.php?action=turnOffTutorialOnLogin&csrf="+this.csrf,true);
5212+
xhr.open("POST", this.iceLoc + "/lib/settings.php?action=turnOffTutorialOnLogin&csrf=" + this.csrf, true);
51985213
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
51995214
xhr.send();
52005215
}

0 commit comments

Comments
 (0)