Populate autocomplete in background

This commit is contained in:
Squidly271 2022-02-25 11:38:35 -05:00
parent 116bb6d10c
commit 9d8fe37043
4 changed files with 9 additions and 4 deletions

Binary file not shown.

View File

@ -1036,7 +1036,7 @@ function getContent(init,category,description,newApp,startupDisplay) {
}
function populateAutoComplete() {
post({action:'populateAutoComplete'},function(result) {
postNoSpin({action:'populateAutoComplete'},function(result) {
searchBoxAwesomplete.list = result.autocomplete;
searchBoxAwesomplete.maxItems = 20;
searchBoxAwesomplete.minChars = 3;

View File

@ -1,8 +1,8 @@
e09e3baad003519ebba28645b59c818c ./Apps.page
01467dead67839af9e0c6715ecc3d3e0 ./Apps.page
4e55f7483b661af21a25b677179baffe ./CA_notices.page
c7c6da0a4a4a7ac33f387ea178319bae ./ca_settings.page
ed2883d6c44c19304c431079596a1731 ./default.cfg
bcc506ac33d97fd3643adc7626bf4996 ./include/exec.php
ec7960c5cf3f6fedb4a7e582114fe1fd ./include/exec.php
51a726cbd05fecf5ec30000b29581de7 ./include/helpers.php
d827ebdf8c29aa6a9818df043a37721e ./include/paths.php
532fffdf939594c143e679da02bd841e ./javascript/libraries.js
@ -14,6 +14,7 @@ be74e770cdc8938200fc29580be4e3a1 ./scripts/installMultiPlugin.php
f1e435bc2543dd7a9f6495fbc2533f2b ./scripts/installUpdate.php
5846421e95b475e1156c3f68164ccc4f ./scripts/languageInstall.sh
d4770cba925e913500e0085b79267d3e ./scripts/notices.php
c9503c1e9a5e96c0f6023ecfdf4ffe7e ./scripts/PluginAPI.php
a1401a0bed89c182b69f0c7508282c1f ./scripts/pluginInstall.php
e19c8f05c687dcf03ea0ba2ed7099a6e ./scripts/showStatistics.php
4425f8fd4ef662a7dc65cee01de3e419 ./scripts/updatePLG.sh

View File

@ -1533,7 +1533,11 @@ function removePrivateApp() {
function populateAutoComplete() {
global $caPaths, $caSettings;
$templates = readJsonFile($caPaths['community-templates-info']);
while ( ! $templates ) {
$templates = readJsonFile($caPaths['community-templates-info']);
if ( ! $templates )
sleep(1);
}
$autoComplete = array_map(function($x){return str_replace(":","",tr($x['Cat']));},readJsonFile($caPaths['categoryList']));
foreach ($templates as $template) {
if ( $template['RepoTemplate'] )