Compare commits

..

No commits in common. "be0731cfbac0c75c13c69267f6f8a1e620440f26" and "e64118a2a10751381e0cb9ea70ce00f3c9bc5b48" have entirely different histories.

5 changed files with 10 additions and 35 deletions

View file

@ -72,14 +72,6 @@ async function loadHooks() {
}
}
app.get("/", async (req, res) => {
res.status(200);
res.set({
"Content-Type": "text/html; charset=utf-8",
});
res.send("");
});
app.get("/player", async (req, res) => {
let url = req.query.url || null;
@ -277,7 +269,6 @@ app.post("/*path", async (req, res) => {
"application/json",
"application/x-www-form-urlencoded",
"multipart/form-data",
"x-unknown/unknown"
];
const isSupported = supportedContentTypes.includes(
@ -296,7 +287,7 @@ app.post("/*path", async (req, res) => {
let apiResponse: null | Response = null;
const apiHeaders: ANIXART_HEADERST = {
"User-Agent": ANIXART_HEADERS["User-Agent"],
"Content-Type": req.headers["content-type"] || "application/json",
"Content-Type": req.headers["content-type"] || "application/json"
};
if (
@ -323,7 +314,7 @@ app.post("/*path", async (req, res) => {
body: new URLSearchParams(req.body),
});
break;
default:
case "application/json":
apiResponse = await fetch(url.toString(), {
method: "POST",
headers: apiHeaders,

View file

@ -58,7 +58,6 @@ export const ENDPOINTS = {
profileFavorites: `${API_PREFIX}/search/favorites`,
profiles: `${API_PREFIX}/search/profiles`,
releases: `${API_PREFIX}/search/releases`,
collections: `${API_PREFIX}/search/collections`,
},
statistic: {
addHistory: `${API_PREFIX}/history/add`,

View file

@ -28,12 +28,10 @@ export const CollectionLink = (props: any) => {
icon_name="material-symbols--favorite"
name_2={props.favorites_count}
/>
{props.comment_count && (
<Chip
icon_name="material-symbols--comment"
name_2={props.comment_count}
/>
)}
<Chip
icon_name="material-symbols--comment"
name_2={props.comment_count}
/>
{props.is_private && (
<div className="flex items-center justify-center bg-yellow-400 rounded-sm">
<span className="w-3 px-4 py-2.5 text-white sm:px-4 sm:py-3 xl:px-6 xl:py-4 iconify mdi--lock"></span>

View file

@ -61,13 +61,8 @@ const whereMapping = [
auth: true,
},
{
id: "collections_all",
label: "Всех Коллекциях",
auth: false,
},
{
id: "collections_fav",
label: "Своих Коллекциях",
id: "collections",
label: "Коллекциях",
auth: true,
},
];
@ -184,7 +179,6 @@ export function SearchPage() {
url.searchParams.set("query", query);
url.searchParams.set("params", JSON.stringify(params));
router.replace(url.toString());
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [query]);
const getKey = (pageIndex: number, previousPageData: any) => {
@ -220,10 +214,7 @@ export function SearchPage() {
case "favorites":
url = `${ENDPOINTS.search.profileFavorites}/${pageIndex}`;
break;
case "collections_all":
url = `${ENDPOINTS.search.collections}/${pageIndex}`;
break;
case "collections_fav":
case "collections":
url = `${ENDPOINTS.search.profileFavoriteCollection}/${pageIndex}`;
break;
}
@ -394,7 +385,7 @@ export function SearchPage() {
content.length > 0 ?
params.where == "profiles" ?
<UserSection content={content} />
: ["collections_all", "collections_fav"].includes(params.where) ?
: params.where == "collections" ?
<CollectionsSection content={content} />
: <ReleaseSection content={content} />
: <div className="flex flex-col items-center justify-center min-w-full gap-4 mt-12 text-xl">

View file

@ -1,9 +1,5 @@
# 3.8.0
## Добавлено
- Поиск среди всех коллекций
## Изменено
- Фильтры на странице поиска были перемещены рядом с полем ввода