mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-05-18 13:24:37 -04:00
Allow deep link to extension configuration (#5449)
* Allow deep link to extension configuration Full screen * Support slider * Add aside_configure Fix https://github.com/FreshRSS/FreshRSS/pull/5449#issuecomment-1588089769
This commit is contained in:
committed by
GitHub
parent
3d9e0c47ec
commit
3fe68a3285
@@ -80,7 +80,7 @@ class FreshRSS_extension_Controller extends FreshRSS_ActionController {
|
||||
public function configureAction(): void {
|
||||
if (Minz_Request::paramBoolean('ajax')) {
|
||||
$this->view->_layout(null);
|
||||
} else {
|
||||
} elseif (Minz_Request::paramBoolean('slider')) {
|
||||
$this->indexAction();
|
||||
$this->view->_path('extension/index.phtml');
|
||||
}
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
<?php /** @var FreshRSS_View $this */ ?>
|
||||
<?php
|
||||
/** @var FreshRSS_View $this */
|
||||
if (!Minz_Request::paramBoolean('ajax')) {
|
||||
$this->partial('aside_configure');
|
||||
}
|
||||
?>
|
||||
<div class="post">
|
||||
<h2>
|
||||
<?= $this->extension->getName() ?> (<?= $this->extension->getVersion() ?>) —
|
||||
@@ -11,7 +16,7 @@
|
||||
<form id="form-extension" method="post">
|
||||
<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
|
||||
<div class="form-group form-actions">
|
||||
<div class="group-controls">
|
||||
<div class="group-controls">
|
||||
<button class="btn btn-attention confirm" form="form-extension" formaction="<?= _url('extension', 'remove', 'e', urlencode($this->extension->getName())) ?>"><?= _t('gen.action.remove') ?></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -164,6 +164,9 @@ function open_slider_listener(ev) {
|
||||
slider.classList.add('active');
|
||||
slider.scrollTop = 0;
|
||||
slider_content.innerHTML = this.response.body.innerHTML;
|
||||
slider_content.querySelectorAll('form').forEach(function (f) {
|
||||
f.insertAdjacentHTML('afterbegin', '<input type="hidden" name="slider" value="1" />');
|
||||
});
|
||||
context.ajax_loading = false;
|
||||
slider.dispatchEvent(freshrssSliderLoadEvent);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user