mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-03 21:29:59 -05:00
Fixing bug where file search would issue twice on load.
This commit is contained in:
parent
bab10a0c96
commit
0b0e6346a7
13 changed files with 21775 additions and 20852 deletions
|
|
@ -6,9 +6,10 @@ import {
|
|||
CardMeta,
|
||||
Confirm,
|
||||
Container,
|
||||
Image,
|
||||
Dropdown,
|
||||
Input, Modal,
|
||||
Image,
|
||||
Input,
|
||||
Modal,
|
||||
PlaceholderHeader,
|
||||
PlaceholderLine,
|
||||
TableCell,
|
||||
|
|
@ -28,7 +29,8 @@ import {
|
|||
mimetypeColor,
|
||||
PageContainer,
|
||||
PreviewLink,
|
||||
SearchInput, SortButton,
|
||||
SearchInput,
|
||||
SortButton,
|
||||
TabLinks,
|
||||
textEllipsis,
|
||||
useTitle
|
||||
|
|
@ -37,7 +39,7 @@ import {addTag, deleteArchives, postDownload, removeTag} from "../api";
|
|||
import {Link, Route, Routes, useNavigate, useParams} from "react-router-dom";
|
||||
import Message from "semantic-ui-react/dist/commonjs/collections/Message";
|
||||
import {useArchive, useDomains, useQuery, useSearchArchives, useSearchDomain} from "../hooks/customHooks";
|
||||
import {FileCards, FileRowTagIcon, FilesView, SearchFilter} from "./Files";
|
||||
import {FileCards, FileRowTagIcon, FilesView} from "./Files";
|
||||
import Grid from "semantic-ui-react/dist/commonjs/collections/Grid";
|
||||
import _ from "lodash";
|
||||
import {Media, ThemeContext} from "../contexts/contexts";
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import {Button, Icon, Placeholder} from "./Theme";
|
|||
import {Checkbox, Confirm, PlaceholderLine, TableCell, TableFooter, TableHeaderCell, TableRow} from "semantic-ui-react";
|
||||
import {FileIcon, humanFileSize} from "./Common";
|
||||
import React, {useEffect} from "react";
|
||||
import {deleteFile, fetchFile} from "../api";
|
||||
import {deleteFile} from "../api";
|
||||
import _ from 'lodash';
|
||||
import {SortableTable} from "./SortableTable";
|
||||
import {useBrowseFiles} from "../hooks/customHooks";
|
||||
|
|
|
|||
|
|
@ -282,7 +282,7 @@ export function SearchLimitDropdown({limits = []}) {
|
|||
return <Dropdown fluid selection
|
||||
placeholder='Limit'
|
||||
options={limitOptions}
|
||||
value={parseInt(limit || limitOptions[0]['value'])}
|
||||
value={limit || limitOptions[0]['value']}
|
||||
onChange={(e, {value}) => setLimit(value)}
|
||||
/>
|
||||
}
|
||||
|
|
@ -439,8 +439,7 @@ export function FilesSearchView({
|
|||
{key: 'model', text: '3D Model', value: 'model'},
|
||||
];
|
||||
|
||||
const {searchFiles, totalPages, activePage, setPage} =
|
||||
useSearchFiles(24, emptySearch, model);
|
||||
const {searchFiles, totalPages, activePage, setPage} = useSearchFiles(24, emptySearch, model);
|
||||
|
||||
const {body, paginator, selectButton, viewButton, limitDropdown, tagQuerySelector} = FilesView(
|
||||
searchFiles,
|
||||
|
|
@ -470,7 +469,7 @@ export function FilesSearchView({
|
|||
<Grid.Column width={1}>{selectButton}</Grid.Column>}
|
||||
{showView &&
|
||||
<Grid.Column width={1}>{viewButton}</Grid.Column>}
|
||||
<Grid.Column width={4}>{limitDropdown}</Grid.Column>
|
||||
<Grid.Column width={2}>{limitDropdown}</Grid.Column>
|
||||
<Grid.Column width={1}>{tagQuerySelector}</Grid.Column>
|
||||
<Grid.Column width={1}><SearchFilter filters={filterOptions}/></Grid.Column>
|
||||
</Grid.Row>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import React, {useContext} from "react";
|
||||
import React from "react";
|
||||
import {NavLink} from "react-router-dom";
|
||||
import {Dropdown, Menu} from "semantic-ui-react";
|
||||
import {Media, StatusContext, ThemeContext} from "../contexts/contexts";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import React, {Fragment, useContext, useEffect, useState} from 'react';
|
||||
import React, {useContext, useEffect, useState} from 'react';
|
||||
import {Link, Route, Routes, useParams} from "react-router-dom";
|
||||
import {
|
||||
CardLink,
|
||||
|
|
@ -14,7 +14,8 @@ import {
|
|||
mimetypeColor,
|
||||
PageContainer,
|
||||
scrollToTop,
|
||||
SearchInput, SortButton,
|
||||
SearchInput,
|
||||
SortButton,
|
||||
TabLinks,
|
||||
textEllipsis,
|
||||
useTitle
|
||||
|
|
@ -26,7 +27,6 @@ import {
|
|||
CardHeader,
|
||||
Confirm,
|
||||
Container,
|
||||
Dropdown,
|
||||
Image,
|
||||
PlaceholderHeader,
|
||||
PlaceholderLine,
|
||||
|
|
@ -43,7 +43,6 @@ import {Button, Card, Header, Loader, Placeholder, Segment, Statistic, Statistic
|
|||
import {deleteVideos} from "../api";
|
||||
import {Media, ThemeContext} from "../contexts/contexts";
|
||||
import _ from "lodash";
|
||||
import {SearchDomain} from "./Archive";
|
||||
|
||||
export function VideoWrapper() {
|
||||
const {videoId} = useParams();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue