Skip to content

Commit

Permalink
Update font awesome, use vardumper layout
Browse files Browse the repository at this point in the history
  • Loading branch information
barryvdh committed Jul 21, 2017
1 parent 70831de commit e5257dc
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Based on \Symfony\Component\HttpKernel\DataCollector\RequestDataCollector by Fabien Potencier <fabien@symfony.com>
*
*/
class SymfonyRequestCollector extends DataCollector implements DataCollectorInterface, Renderable
class RequestCollector extends DataCollector implements DataCollectorInterface, Renderable
{
/** @var \Symfony\Component\HttpFoundation\Request $request */
protected $request;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* https://github.com/laravel/framework/blob/master/src/Illuminate/Foundation/Console/RoutesCommand.php
*
*/
class IlluminateRouteCollector extends DataCollector implements Renderable
class RouteCollector extends DataCollector implements Renderable
{
/**
* The router instance.
Expand Down
15 changes: 15 additions & 0 deletions src/JavascriptRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,24 @@ public function renderHead()
$html .= '<script type="text/javascript">jQuery.noConflict(true);</script>' . "\n";
}

$html .= $this->getInlineHtml();


return $html;
}

protected function getInlineHtml()
{
$html = '';

foreach (['head', 'css', 'js'] as $asset) {
foreach ($this->getAssets('inline_' . $asset) as $item) {
$html .= $item . "\n";
}
}

return $html;
}
/**
* Get the last modified time of any assets.
*
Expand Down
26 changes: 23 additions & 3 deletions src/LaravelDebugbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@
use Barryvdh\Debugbar\DataCollector\MultiAuthCollector;
use Barryvdh\Debugbar\DataCollector\QueryCollector;
use Barryvdh\Debugbar\DataCollector\SessionCollector;
use Barryvdh\Debugbar\DataCollector\SymfonyRequestCollector;
use Barryvdh\Debugbar\DataCollector\RequestCollector;
use Barryvdh\Debugbar\DataCollector\ViewCollector;
use Barryvdh\Debugbar\Storage\FilesystemStorage;
use DebugBar\Bridge\MonologCollector;
use DebugBar\Bridge\SwiftMailer\SwiftLogCollector;
use DebugBar\Bridge\SwiftMailer\SwiftMailCollector;
use DebugBar\DataCollector\ConfigCollector;
use DebugBar\DataCollector\DataCollectorInterface;
use DebugBar\DataCollector\ExceptionsCollector;
use DebugBar\DataCollector\MemoryCollector;
use DebugBar\DataCollector\MessagesCollector;
Expand Down Expand Up @@ -222,7 +223,7 @@ function ($view, $data = []) use ($debugbar) {

if (!$this->isLumen() && $this->shouldCollect('route')) {
try {
$this->addCollector($this->app->make('Barryvdh\Debugbar\DataCollector\IlluminateRouteCollector'));
$this->addCollector($this->app->make('Barryvdh\Debugbar\DataCollector\RouteCollector'));
} catch (\Exception $e) {
$this->addThrowable(
new Exception(
Expand Down Expand Up @@ -473,6 +474,25 @@ public function shouldCollect($name, $default = false)
return $this->app['config']->get('debugbar.collectors.' . $name, $default);
}

/**
* Adds a data collector
*
* @param DataCollectorInterface $collector
*
* @throws DebugBarException
* @return $this
*/
public function addCollector(DataCollectorInterface $collector)
{
parent::addCollector($collector);

if (method_exists($collector, 'useHtmlVarDumper')) {
$collector->useHtmlVarDumper();
}

return $this;
}

/**
* Handle silenced errors
*
Expand Down Expand Up @@ -626,7 +646,7 @@ public function modifyResponse(Request $request, Response $response)

if ($this->shouldCollect('symfony_request', true) && !$this->hasCollector('request')) {
try {
$this->addCollector(new SymfonyRequestCollector($request, $response, $sessionManager));
$this->addCollector(new RequestCollector($request, $response, $sessionManager));
} catch (\Exception $e) {
$this->addThrowable(
new Exception(
Expand Down
13 changes: 11 additions & 2 deletions src/Resources/laravel-debugbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,23 @@ a.phpdebugbar-restore-btn {
border-right-color: #ddd !important;
}

div.phpdebugbar code, div.phpdebugbar pre {
div.phpdebugbar code, div.phpdebugbar pre, div.phpdebugbar samp {
background: none;
font-family: monospace;
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 1em;
border: 0;
padding: 0;
}

div.phpdebugbar code, div.phpdebugbar pre {
color: #000;
}

div.phpdebugbar pre.sf-dump {
color: #a0a000;
outline: 0;
}

div.phpdebugbar-body {
border-top: none;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/vendor/font-awesome/style.css

Large diffs are not rendered by default.

0 comments on commit e5257dc

Please sign in to comment.