Skip to content

Commit

Permalink
Merge pull request #57 from vpietri/develop_ajax_loading
Browse files Browse the repository at this point in the history
Develop ajax loading
  • Loading branch information
vpietri authored Mar 27, 2024
2 parents 1756daf + 7950a38 commit 18682cb
Show file tree
Hide file tree
Showing 127 changed files with 3,398 additions and 1,874 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: vpietri
13 changes: 13 additions & 0 deletions Api/ServiceInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php


namespace ADM\QuickDevBar\Api;


interface ServiceInterface
{
/**
* @return array
*/
public function pullData();
}
15 changes: 7 additions & 8 deletions Block/Adminhtml/System/Config/Form/Fieldset/IsEnabled.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ class IsEnabled extends \Magento\Config\Block\System\Config\Form\Field
protected $_qdbHelper;

public function __construct(
\Magento\Backend\Block\Template\Context $context,
\ADM\QuickDevBar\Helper\Data $qdbHelper,
array $data = []
\Magento\Backend\Block\Template\Context $context,
\ADM\QuickDevBar\Helper\Data $qdbHelper,
array $data = []
) {
parent::__construct($context, $data);
$this->_qdbHelper = $qdbHelper;
Expand All @@ -26,20 +26,19 @@ public function __construct(
protected function _getElementHtml(AbstractElement $element)
{
$html = [];
if ($this->_qdbHelper->isToolbarAccessAllowed()) {
if ($this->_qdbHelper->isToolbarAccessAllowed(true)) {
$html[] = __('Yep');
} else {
$html[] = '<strong>' . __('Nope') .'</strong>';
if(!$this->_qdbHelper->isIpAuthorized()) {
if (!$this->_qdbHelper->isIpAuthorized()) {
$html[] = __('Your Ip "<i class="note">%1</i>" is not allowed, you should register it in the field below.', $this->_qdbHelper->getClientIp());
}
if(!$this->_qdbHelper->isUserAgentAuthorized()) {
$html[] = __('Your User Agent "<i class="note">%1</i>" is not allowed, you should add a user-agent pattern', $this->_qdbHelper->getUserAgent());
if (!$this->_qdbHelper->isUserAgentAuthorized()) {
$html[] = __('Your User Agent "<i class="note">%1</i>" is not allowed, you should add a user-agent pattern', $this->_qdbHelper->getUserAgent());
}
}


return implode('<br/>', $html);
}

}
36 changes: 0 additions & 36 deletions Block/Tab/Content/Block.php

This file was deleted.

36 changes: 0 additions & 36 deletions Block/Tab/Content/Collection.php

This file was deleted.

6 changes: 4 additions & 2 deletions Block/Tab/Content/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@ class Config extends \ADM\QuickDevBar\Block\Tab\Panel
public function __construct(
\Magento\Framework\View\Element\Template\Context $context,
\Magento\Framework\App\Config $appConfig,
\ADM\QuickDevBar\Helper\Data $qdbHelper,
\ADM\QuickDevBar\Helper\Register $qdbHelperRegister,
array $data = []
) {
$this->_appConfig = $appConfig;

parent::__construct($context, $data);
parent::__construct($context, $qdbHelper, $qdbHelperRegister, $data);
}

public function getTitleBadge()
{
return count($this->getConfigValues());
return $this->count($this->getConfigValues());
}

public function getConfigValues()
Expand Down
36 changes: 0 additions & 36 deletions Block/Tab/Content/Event.php

This file was deleted.

21 changes: 2 additions & 19 deletions Block/Tab/Content/Help.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,9 @@
class Help extends \ADM\QuickDevBar\Block\Tab\Panel
{

protected $_qdbHelper;

/**
* @param \Magento\Framework\View\Element\Template\Context $context
* @param \Magento\Framework\Json\EncoderInterface $jsonEncoder
* @param array $data
*/
public function __construct(
\Magento\Framework\View\Element\Template\Context $context,
\ADM\QuickDevBar\Helper\Data $qdbHelper,
array $data = []
) {
$this->_qdbHelper= $qdbHelper;

parent::__construct($context, $data);
}


public function getModuleVersion()
{
return $this->_qdbHelper->getModuleVersion($this->getModuleName());
return $this->helper->getModuleVersion($this->getModuleName());
}
}
}
Loading

0 comments on commit 18682cb

Please sign in to comment.