Skip to content

Commit

Permalink
Return copy button to left buttons group (#1680)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikn69 authored Oct 18, 2024
1 parent 6a79909 commit f5c4011
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
5 changes: 1 addition & 4 deletions src/Resources/laravel-debugbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,7 @@ ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item .phpdebugbar-widget
max-width: 100%;
}

ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item .phpdebugbar-widgets-copy-clipboard,
ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item .phpdebugbar-widgets-duration,
ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item .phpdebugbar-widgets-stmt-id,
ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item .phpdebugbar-widgets-memory {
Expand Down Expand Up @@ -925,10 +926,6 @@ pre.phpdebugbar-widgets-code-block ul.phpdebugbar-widgets-numbered-code li {
}
}

div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-copy-clipboard {
float: none !important;
}

.phpdebugbar-widgets-bg-measure .phpdebugbar-widgets-value {
height: 2px !important;
}
Expand Down
11 changes: 6 additions & 5 deletions src/Resources/queries/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,11 @@
.attr('data-duplicate', false)
.append($('<strong />').addClass(csscls('sql name')).text(statement.sql));
} else {
const $code = $('<code />').html(PhpDebugBar.Widgets.highlight(statement.sql, 'sql')).addClass(csscls('sql'));
const $code = $('<code />').html(PhpDebugBar.Widgets.highlight(statement.sql, 'sql')).addClass(csscls('sql'));
$li.attr('data-connection', statement.connection)
.attr('data-duplicate', this.duplicateQueries.has(statement))
.append($code);

if (statement.show_copy) {
$('<span title="Copy to clipboard" />')
.addClass(csscls('copy-clipboard'))
Expand All @@ -242,11 +246,8 @@
$(event.target).removeClass(csscls('copy-clipboard-check'));
}, 2000)
}
}).appendTo($code);
}).appendTo($li);
}
$li.attr('data-connection', statement.connection)
.attr('data-duplicate', this.duplicateQueries.has(statement))
.append($code);
}

if (statement.width_percent) {
Expand Down

0 comments on commit f5c4011

Please sign in to comment.