mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-29 11:26:25 -05:00
Shortening refresh button for mobile.
This commit is contained in:
parent
1c5b277f24
commit
ae5d47fc21
3 changed files with 9 additions and 25 deletions
|
|
@ -589,12 +589,13 @@ export async function filesSearch(offset, limit, searchStr, mimetypes, model, ta
|
|||
|
||||
export async function refreshFiles(paths) {
|
||||
let response;
|
||||
if (paths && paths.constructor === Array) {
|
||||
if (Array.isArray(paths) && paths.length > 0) {
|
||||
// Refresh user-selected files/directories only.
|
||||
const body = {paths};
|
||||
console.debug(`Refreshing: ${paths}`);
|
||||
console.info(`Refreshing: ${paths}`);
|
||||
response = await apiPost(`${API_URI}/files/refresh`, body);
|
||||
} else {
|
||||
console.debug(`Refreshing all files`);
|
||||
console.info(`Refreshing all files`);
|
||||
response = await apiPost(`${API_URI}/files/refresh`);
|
||||
}
|
||||
return response;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue