FileBrowser files can be tagged. A Tag icon is displayed on each file row in the browser.

This commit is contained in:
Roland 2023-04-01 11:52:41 -06:00
parent 655e944960
commit ae2b6daa33
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
29 changed files with 356 additions and 219 deletions

View file

@ -531,37 +531,6 @@ export const useDownloads = () => {
return {onceDownloads, recurringDownloads, fetchDownloads}
}
export const useDownloaders = () => {
const [on, setOn] = useState(null);
const [downloaders, setDownloaders] = useState(null);
const fetchDownloaders = async () => {
try {
let data = await getDownloaders();
setDownloaders(data['downloaders']);
setOn(!data['manager_disabled']);
} catch (e) {
console.error(e);
}
}
useEffect(() => {
fetchDownloaders();
}, []);
const localSetDownloads = async (on) => {
setOn(null);
if (on) {
await startDownloads();
} else {
await killDownloads();
}
await fetchDownloaders();
}
return {on, setOn, downloaders, setDownloads: localSetDownloads};
}
export const useThrottle = () => {
const [on, setOn] = useState(null);
@ -669,12 +638,6 @@ export const useStatus = () => {
setStatus(s);
} catch (e) {
console.error(e);
toast({
type: 'error',
title: 'Unexpected server response',
description: 'Could not get server status',
time: 5000,
});
}
}