From 53cdbad35b014dd0af2e611f74ea470e9347c72d Mon Sep 17 00:00:00 2001 From: mattpass Date: Sun, 23 Aug 2020 09:11:40 +0100 Subject: [PATCH] Updated bug report system --- assets/css/bug-report.css | 10 ++++++++++ assets/js/icecoder.js | 22 +++++++++++++++++----- lang/english.php | 5 +++++ lib/bug-files-check.php | 26 +++++++++++++------------- lib/bug-report.php | 28 ++++++++++++++++++++++++++++ 5 files changed, 73 insertions(+), 18 deletions(-) create mode 100644 assets/css/bug-report.css create mode 100644 lib/bug-report.php diff --git a/assets/css/bug-report.css b/assets/css/bug-report.css new file mode 100644 index 0000000..7089b7e --- /dev/null +++ b/assets/css/bug-report.css @@ -0,0 +1,10 @@ +body {overflow: hidden; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +h1 {font-size: 36px; font-weight: normal; color: #888; margin-bottom: 20px} +.bug-report {background-color: #1c1c19; color: #fff; padding: 20px} +pre {font-family: monospace} diff --git a/assets/js/icecoder.js b/assets/js/icecoder.js index 4fa87c1..edd716b 100644 --- a/assets/js/icecoder.js +++ b/assets/js/icecoder.js @@ -3594,6 +3594,12 @@ var ICEcoder = { this.showHide('show',get('blackMask')); }, + // Show the auto-logout warning screen + bugReportScreen: function() { + get('mediaContainer').innerHTML = ''; + this.showHide('show',get('blackMask')); + }, + // Show the plugins manager pluginsManager: function() { get('mediaContainer').innerHTML = ''; @@ -3909,11 +3915,12 @@ var ICEcoder = { } if(this.bugReportStatus=="bugs") { // Close bug-report without saving previousFiles and without confirming close if we made changes on the bug report - var bugReportOpenFilePos = this.openFiles.indexOf(this.bugReportPath.replace(/\|/g,"/")); - if (bugReportOpenFilePos > -1) { - this.closeTab(bugReportOpenFilePos+1,'dontSetPV','dontAsk'); - } - this.openFile(this.bugReportPath); + // var bugReportOpenFilePos = this.openFiles.indexOf(this.bugReportPath.replace(/\|/g,"/")); + // if (bugReportOpenFilePos > -1) { + // this.closeTab(bugReportOpenFilePos+1,'dontSetPV','dontAsk'); + // } + // this.openFile(this.bugReportPath); + this.bugReportScreen(); this.bugFilesSizesSeen = this.bugFilesSizesActual; } }, @@ -3956,6 +3963,11 @@ var ICEcoder = { statusArray['result'] == "ok" ? "#080" : statusArray['result'] == "bugs" ? "#b00" : "#f80"; // if the result is 'error' or another value + get('bugIcon').title = + statusArray['result'] == "off" ? "Bug reporting not active" : + statusArray['result'] == "ok" ? "No new errors found" : + statusArray['result'] == "bugs" ? "New bugs found, click to view" : + "Unable to find bug log file specified"; // Setup error ic.bugReportStatus = statusArray['result']; if (ic.bugFilesSizesSeen[0]=="null") { ic.bugFilesSizesSeen = statusArray['filesSizesSeen']; diff --git a/lang/english.php b/lang/english.php index 9500a5e..1d71c14 100644 --- a/lang/english.php +++ b/lang/english.php @@ -121,6 +121,11 @@ $text = [ "Found in" => "Found in:", ], + "bug-report" => + [ + "Bug Report" => "Bug Report", + ], + "file-control" => [ "Sorry, bad filename..." => "Sorry, bad filename provided. Check the dev tools console for more info?", diff --git a/lib/bug-files-check.php b/lib/bug-files-check.php index 7ad6c37..8a25ddc 100644 --- a/lib/bug-files-check.php +++ b/lib/bug-files-check.php @@ -1,14 +1,16 @@ serializedFileData("set", $docRoot . $ICEcoderDir . "/data/bug-report.php", serialize($output)); + } } // Get dir name tmp dir's parent @@ -108,7 +108,7 @@ $status = array( "files" => $files, "filesSizesSeen" => $filesSizesSeen, "maxLines" => $maxLines, - "bugReportPath" => "|" . $dataLoc . "|data|bug-report.log", + "bugReportPath" => $dataLoc . "|data|bug-report.php", "result" => $result ); diff --git a/lib/bug-report.php b/lib/bug-report.php new file mode 100644 index 0000000..6dba611 --- /dev/null +++ b/lib/bug-report.php @@ -0,0 +1,28 @@ + + + + + + ICEcoder <?php echo $ICEcoder["versionNo"];?> bug logs + + + + + + + + +

+
+serializedFileData("get", $docRoot . $ICEcoderDir . "/data/bug-report.php"));
+?>
+
+ + + +