From 51baeff86c8a15c9199e840e79f9e033214767c1 Mon Sep 17 00:00:00 2001
From: dhiya
Date: Fri, 12 Jan 2024 10:38:03 +0800
Subject: [PATCH 1/6] update css for show tab debugbar
---
admin/css/debug-toolbar/toolbar.scss | 56 ++++++++++++++++++++++++++
system/Debug/Toolbar/Views/toolbar.css | 54 +++++++++++++++++++++++++
2 files changed, 110 insertions(+)
diff --git a/admin/css/debug-toolbar/toolbar.scss b/admin/css/debug-toolbar/toolbar.scss
index 5d809874ebee..2cfc16a4eae0 100644
--- a/admin/css/debug-toolbar/toolbar.scss
+++ b/admin/css/debug-toolbar/toolbar.scss
@@ -467,6 +467,18 @@
@import '_theme-light';
}
+// show tab
+#ci-database.debug-bar-dblock,
+#ci-files.debug-bar-dblock,
+#ci-routes.debug-bar-dblock,
+#ci-events.debug-bar-dblock,
+#ci-history.debug-bar-dblock,
+#ci-vars.debug-bar-dblock,
+#ci-config.debug-bar-dblock,
+#ci-timeline.debug-bar-dblock
+{
+ display: block;
+}
// LAYOUT HELPERS
// ========================================================================== */
@@ -510,3 +522,47 @@
.debug-bar-noverflow {
overflow: hidden;
}
+
+.debug-bar-dtableRow{
+ display: table-row;
+ }
+
+.debug-bar-dinlineBlock{
+ display: inline-block;
+}
+
+.debug-bar-pointer{
+ cursor: pointer;
+}
+
+.debug-bar-mleft4{
+ margin-left: 4px;
+}
+
+.level-0{
+ --level: 0;
+}
+
+.level-1{
+ --level: 1;
+}
+
+.level-2{
+ --level: 2;
+}
+
+.level-3{
+ --level: 3;
+}
+
+.level-4{
+ --level: 4;
+}
+
+.level-5{
+ --level: 5;
+}
+
+.level-6{
+ --level: 6;
+}
diff --git a/system/Debug/Toolbar/Views/toolbar.css b/system/Debug/Toolbar/Views/toolbar.css
index 8a302b4019e9..bc35e4b07623 100644
--- a/system/Debug/Toolbar/Views/toolbar.css
+++ b/system/Debug/Toolbar/Views/toolbar.css
@@ -764,6 +764,16 @@
background-color: #FDC894;
color: #434343;
}
+#ci-database.debug-bar-dblock,
+#ci-files.debug-bar-dblock,
+#ci-routes.debug-bar-dblock,
+#ci-events.debug-bar-dblock,
+#ci-history.debug-bar-dblock,
+#ci-vars.debug-bar-dblock,
+#ci-config.debug-bar-dblock,
+#ci-timeline.debug-bar-dblock {
+ display: block;
+}
.debug-bar-width30 {
width: 30%;
@@ -804,3 +814,47 @@
.debug-bar-noverflow {
overflow: hidden;
}
+
+.debug-bar-dtableRow {
+ display: table-row;
+}
+
+.debug-bar-dinlineBlock {
+ display: inline-block;
+}
+
+.debug-bar-pointer {
+ cursor: pointer;
+}
+
+.debug-bar-mleft4 {
+ margin-left: 4px;
+}
+
+.level-0 {
+ --level: 0;
+}
+
+.level-1 {
+ --level: 1;
+}
+
+.level-2 {
+ --level: 2;
+}
+
+.level-3 {
+ --level: 3;
+}
+
+.level-4 {
+ --level: 4;
+}
+
+.level-5 {
+ --level: 5;
+}
+
+.level-6 {
+ --level: 6;
+}
From e48a4f33ed418b4b85918259a4297263ae71b51a Mon Sep 17 00:00:00 2001
From: dhiya
Date: Fri, 12 Jan 2024 10:40:15 +0800
Subject: [PATCH 2/6] remove inline style debugbar,welcome_message for CSP
---
app/Views/welcome_message.php | 33 +++++--
system/Debug/Toolbar.php | 8 +-
system/Debug/Toolbar/Views/_database.tpl | 4 +-
system/Debug/Toolbar/Views/toolbar.js | 95 +++++++++++++++------
system/Debug/Toolbar/Views/toolbar.tpl.php | 32 +++----
system/Debug/Toolbar/Views/toolbarloader.js | 5 +-
6 files changed, 123 insertions(+), 54 deletions(-)
diff --git a/app/Views/welcome_message.php b/app/Views/welcome_message.php
index 6d5da23f1224..c391dc83bb85 100644
--- a/app/Views/welcome_message.php
+++ b/app/Views/welcome_message.php
@@ -150,6 +150,28 @@
.further h2:first-of-type {
padding-top: 0;
}
+ .f1 {
+ fill: none;
+ stroke: #000;
+ stroke-linejoin: round;
+ stroke-width: 32px;
+ }
+
+ .f2 {
+ fill: none;
+ stroke: #000;
+ stroke-linecap: round;
+ stroke-linejoin: round;
+ stroke-width: 32px;
+ }
+
+ .f3 {
+ fill: none;
+ stroke: #000;
+ stroke-linecap: round;
+ stroke-miterlimit: 10;
+ stroke-width: 32px;
+ }
footer {
background-color: rgba(221, 72, 20, .8);
text-align: center;
@@ -206,7 +228,7 @@
-
+
Discuss
@@ -274,7 +296,7 @@
target="_blank">chat on Slack !
-
+
Contribute
@@ -309,7 +331,8 @@
-
@@ -124,7 +124,7 @@
$items) : ?>
-
+
= $heading ?>
@@ -148,7 +148,7 @@
-
+
Session User Data
@@ -174,7 +174,7 @@
Request ( = $vars['request'] ?> )
-
+
$_GET
@@ -191,7 +191,7 @@
-
+
$_POST
@@ -208,7 +208,7 @@
-
+
Headers
@@ -225,7 +225,7 @@
-
+
Cookies
@@ -246,7 +246,7 @@
-
+
Headers
diff --git a/system/Debug/Toolbar/Views/toolbarloader.js b/system/Debug/Toolbar/Views/toolbarloader.js
index 7e5914354481..75caefa6c104 100644
--- a/system/Debug/Toolbar/Views/toolbarloader.js
+++ b/system/Debug/Toolbar/Views/toolbarloader.js
@@ -74,8 +74,11 @@ function newXHR() {
let h2 = document.querySelector('#ci-history > h2');
if (h2) {
- h2.innerHTML = 'History
You have new debug data. ';
+ h2.innerHTML = 'History
You have new debug data. ';
document.querySelector('a[data-tab="ci-history"] > span > .badge').className += ' active';
+ document.getElementById('ci-history-update').addEventListener('click',function(){
+ loadDoc(debugbarTime);
+ },false)
}
}
}
From 1a53368101beb4ab6ba1fcd113aaddbbf3839f58 Mon Sep 17 00:00:00 2001
From: dhiya
Date: Fri, 12 Jan 2024 22:25:04 +0800
Subject: [PATCH 3/6] fix changes SCSS files did not match the expected CSS
output
---
system/Debug/Toolbar/Views/toolbar.css | 1 +
1 file changed, 1 insertion(+)
diff --git a/system/Debug/Toolbar/Views/toolbar.css b/system/Debug/Toolbar/Views/toolbar.css
index bc35e4b07623..19f58e4642bc 100644
--- a/system/Debug/Toolbar/Views/toolbar.css
+++ b/system/Debug/Toolbar/Views/toolbar.css
@@ -764,6 +764,7 @@
background-color: #FDC894;
color: #434343;
}
+
#ci-database.debug-bar-dblock,
#ci-files.debug-bar-dblock,
#ci-routes.debug-bar-dblock,
From 1f0284641de78572aced140895e59d021e89547a Mon Sep 17 00:00:00 2001
From: dhiya
Date: Sat, 20 Jan 2024 21:45:10 +0800
Subject: [PATCH 4/6] update style & js
---
admin/css/debug-toolbar/toolbar.scss | 27 ++++----
app/Views/welcome_message.php | 2 +-
system/Debug/Toolbar.php | 4 +-
system/Debug/Toolbar/Views/toolbar.css | 14 ++---
system/Debug/Toolbar/Views/toolbar.js | 70 ++++++++++-----------
system/Debug/Toolbar/Views/toolbarloader.js | 4 +-
6 files changed, 60 insertions(+), 61 deletions(-)
diff --git a/admin/css/debug-toolbar/toolbar.scss b/admin/css/debug-toolbar/toolbar.scss
index 2cfc16a4eae0..e32b037dd648 100644
--- a/admin/css/debug-toolbar/toolbar.scss
+++ b/admin/css/debug-toolbar/toolbar.scss
@@ -475,8 +475,7 @@
#ci-history.debug-bar-dblock,
#ci-vars.debug-bar-dblock,
#ci-config.debug-bar-dblock,
-#ci-timeline.debug-bar-dblock
-{
+#ci-timeline.debug-bar-dblock {
display: block;
}
@@ -523,46 +522,46 @@
overflow: hidden;
}
-.debug-bar-dtableRow{
+.debug-bar-dtableRow {
display: table-row;
- }
+}
-.debug-bar-dinlineBlock{
+.debug-bar-dinlineBlock {
display: inline-block;
}
-.debug-bar-pointer{
+.debug-bar-pointer {
cursor: pointer;
}
-.debug-bar-mleft4{
+.debug-bar-mleft4 {
margin-left: 4px;
}
-.level-0{
+.debug-bar-level-0 {
--level: 0;
}
-.level-1{
+.debug-bar-level-1 {
--level: 1;
}
-.level-2{
+.debug-bar-level-2 {
--level: 2;
}
-.level-3{
+.debug-bar-level-3 {
--level: 3;
}
-.level-4{
+.debug-bar-level-4 {
--level: 4;
}
-.level-5{
+.debug-bar-level-5 {
--level: 5;
}
-.level-6{
+.debug-bar-level-6 {
--level: 6;
}
diff --git a/app/Views/welcome_message.php b/app/Views/welcome_message.php
index c391dc83bb85..88cde01cc3ba 100644
--- a/app/Views/welcome_message.php
+++ b/app/Views/welcome_message.php
@@ -332,7 +332,7 @@