From 7cfff04add766857ee0fb428845379fa95f2dcb4 Mon Sep 17 00:00:00 2001 From: Marco Dickert Date: Tue, 12 May 2020 13:22:28 +0200 Subject: [PATCH] Make refresh and search configurable Signed-off-by: Marco Dickert --- build/libifm.php | 40 ++++++++++++++++++++++++++++++---------- ifm.php | 40 ++++++++++++++++++++++++++++++---------- src/ifm.js | 15 ++++++++++----- src/main.php | 11 ++++++++++- src/templates/app.html | 4 ++++ 5 files changed, 84 insertions(+), 26 deletions(-) diff --git a/build/libifm.php b/build/libifm.php index 33b3264..82beceb 100644 --- a/build/libifm.php +++ b/build/libifm.php @@ -40,6 +40,7 @@ class IFM { "rename" => 1, "zipnload" => 1, "createarchive" => 1, + "search" => 1, // gui controls "showlastmodified" => 0, @@ -51,7 +52,8 @@ class IFM { "showhiddenfiles" => 1, "showpath" => 0, "contextmenu" => 1, - "disable_mime_detection" => 0 + "disable_mime_detection" => 0, + "showrefresh" => 1 ); private $config = array(); @@ -97,6 +99,8 @@ class IFM { $this->config['showhiddenfiles'] = getenv('IFM_GUI_SHOWHIDDENFILES') !== false ? intval( getenv('IFM_GUI_SHOWHIDDENFILES') ) : $this->config['showhiddenfiles'] ; $this->config['showpath'] = getenv('IFM_GUI_SHOWPATH') !== false ? intval( getenv('IFM_GUI_SHOWPATH') ) : $this->config['showpath'] ; $this->config['contextmenu'] = getenv('IFM_GUI_CONTEXTMENU') !== false ? intval( getenv('IFM_GUI_CONTEXTMENU') ) : $this->config['contextmenu'] ; + $this->config['search'] = getenv('IFM_API_SEARCH') !== false ? intval( getenv('IFM_API_SEARCH') ) : $this->config['search'] ; + $this->config['showrefresh'] = getenv('IFM_GUI_REFRESH') !== false ? intval( getenv('IFM_GUI_REFRESH') ) : $this->config['showrefresh'] ; // optional settings if( getenv('IFM_SESSION_LIFETIME') !== false ) @@ -140,8 +144,12 @@ f00bar;