diff --git a/.gitignore b/.gitignore index 4ac341b..742012c 100644 --- a/.gitignore +++ b/.gitignore @@ -34,4 +34,5 @@ emsdk plugins/*.so plugins/enableList.json # make -public \ No newline at end of file +public +phigros \ No newline at end of file diff --git a/make b/make index 67da55e..8755289 100755 --- a/make +++ b/make @@ -10,14 +10,14 @@ echo -e "${YELLOW}Compiling Sonolus Server using g++...${WHITE}" g++ main.cpp -o sonolus\ -ldl -lpthread -lcrypto -lssl -ljsoncpp -std=c++14 -g -w \ -DENABLE_SONOLUS -DENABLE_MYSQL -lmysqlclient -DENABLE_SQLITE -lsqlite3 -DENABLE_CURL -lcurl -DENABLE_ZIP -lzip -echo -e "${YELLOW}Compiling libsonolush using g++...${WHITE}" -g++ plugins/libsonolush/libsonolush.cpp -o plugins/libsonolush.so \ - -g -std=c++17 -fPIC -shared -w\ - -DENABLE_SONOLUS -DENABLE_MYSQL -DENABLE_SQLITE -DENABLE_CURL -DENABLE_ZIP -echo -e "${YELLOW}Compiling libonedrive using g++...${WHITE}" -g++ plugins/libonedrive/libonedrive.cpp -o plugins/libonedrive.so \ - -ldl -lpthread -lcrypto -lssl -ljsoncpp -std=c++17 -fPIC -shared -g -w\ - -DENABLE_SONOLUS -DENABLE_MYSQL -DENABLE_SQLITE -DENABLE_CURL -DENABLE_ZIP +# echo -e "${YELLOW}Compiling libsonolush using g++...${WHITE}" +# g++ plugins/libsonolush/libsonolush.cpp -o plugins/libsonolush.so \ +# -g -std=c++17 -fPIC -shared -w\ +# -DENABLE_SONOLUS -DENABLE_MYSQL -DENABLE_SQLITE -DENABLE_CURL -DENABLE_ZIP +# echo -e "${YELLOW}Compiling libonedrive using g++...${WHITE}" +# g++ plugins/libonedrive/libonedrive.cpp -o plugins/libonedrive.so \ +# -ldl -lpthread -lcrypto -lssl -ljsoncpp -std=c++17 -fPIC -shared -g -w\ +# -DENABLE_SONOLUS -DENABLE_MYSQL -DENABLE_SQLITE -DENABLE_CURL -DENABLE_ZIP echo -e "${YELLOW}Done.${WHITE}" echo -e "" echo -e "You can type \`./sonolus serve\` to start your server." diff --git a/phigros b/phigros deleted file mode 160000 index 46727c0..0000000 --- a/phigros +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 46727c099a03f163f1cf3ce8587cf7ed0b2caf7a diff --git a/web/gui/ItemSearch.h b/web/gui/ItemSearch.h index 25b6d7c..6d9f8c1 100644 --- a/web/gui/ItemSearch.h +++ b/web/gui/ItemSearch.h @@ -34,22 +34,22 @@ auto GUISearch = [](client_conn conn, http_request request, param argv) { argList["page.title"] = "{{language.search}} | " + appConfig["server.title"].asString(); argList["html.navbar"] = fetchNavBar("{{language.search}}").output(); string searchOptions = ""; searchOptions += "

{{language.quick}}

"; - searchOptions += fetchSectionSearch(fetchSearchText("quick_keywords", "{{language.KEYWORDS}}", "{{language.KEYWORDS_PLACEHOLDER}}", args["quick_keywords"], "", 0, 0).output(), "/" + argv[0] + "/list", "quick").output(); + searchOptions += fetchSectionSearch(fetchSearchText("quick_keywords", "{{language.KEYWORDS}}", "{{language.KEYWORDS_PLACEHOLDER}}", "\"" + args["quick_keywords"] + "\"", "", 0, 0).output(), "/" + argv[0] + "/list", "quick").output(); for (int i = 0; i < Searches.size(); i++) { searchOptions += "

" + Searches[i]["title"].asString() + "

"; string sections = ""; string type = Searches[i]["type"].asString(); for (int j = 0; j < Searches[i]["options"].size(); j++) { auto item = Searches[i]["options"][j]; string query = item["query"].asString(); if (item["type"].asString() == "text") sections += fetchSearchText( - type + "_" + query, item["name"].asString(), item["placeholder"].asString(), "\"" + args[type + "_" + query] + "\"", "", 0, 0).output(); + type + "_" + query, item["name"].asString(), item["placeholder"].asString(), "\"" + args[type + "_" + query] + "\"", "\"\"", 0, 0).output(); if (item["type"].asString() == "toggle") sections += fetchSearchToggle( - type + "_" + query, item["name"].asString(), args[type + "_" + query].c_str(), "", 0, 0).output(); + type + "_" + query, item["name"].asString(), args[type + "_" + query].c_str(), "0", 0, 0).output(); if (item["type"].asString() == "slider") sections += fetchSearchSlider( - type + "_" + query, item["name"].asString(), args[type + "_" + query].c_str(), "", item["min"].asInt(), item["max"].asInt(), item["step"].asInt(), 0, 0).output(); + type + "_" + query, item["name"].asString(), args[type + "_" + query].c_str(), "0", item["min"].asInt(), item["max"].asInt(), item["step"].asInt(), 0, 0).output(); if (item["type"].asString() == "select") { vector values = {}; for (int k = 0; k < item["values"].size(); k++) values.push_back(item["values"][k].asString()); - sections += fetchSearchSelect(type + "_" + query, item["name"].asString(), values, args[type + "_" + query].c_str(), "", 0, 0).output(); + sections += fetchSearchSelect(type + "_" + query, item["name"].asString(), values, args[type + "_" + query].c_str(), "0", 0, 0).output(); } } searchOptions += fetchSectionSearch(sections, "/" + argv[0] + "/list", type).output(); } argList["html.searchOptions"] = searchOptions;