mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-04 05:39:57 -05:00
Zim/Kiwix (Wikipedia) feature
* A new zim module has been added, this module allows several things to interact with Zim files. * Allow searching of Zim files using libzim. * Allow downloading of Kiwix projects (wikipedia, wikibooks, etc) on a schedule which replaces the outdated files. * Creation of a new zim docker container which allows viewing of the Zim file contents. * This commit also adds move/rename/mkdir features in the File Browser. * File tags are preserved when moving/renaming.
This commit is contained in:
parent
cc5ab4e339
commit
03a2df217d
117 changed files with 6393 additions and 1100 deletions
|
|
@ -34,7 +34,7 @@ import {
|
|||
textEllipsis,
|
||||
useTitle
|
||||
} from "./Common";
|
||||
import {addTag, deleteArchives, postDownload, removeTag} from "../api";
|
||||
import {deleteArchives, postDownload, tagFileGroup, untagFileGroup} 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, useSearchArchives, useSearchDomain} from "../hooks/customHooks";
|
||||
|
|
@ -146,12 +146,12 @@ function ArchivePage() {
|
|||
}
|
||||
|
||||
const localAddTag = async (name) => {
|
||||
await addTag(archiveFile, name);
|
||||
await tagFileGroup(archiveFile, name);
|
||||
await fetchArchive();
|
||||
}
|
||||
|
||||
const localRemoveTag = async (name) => {
|
||||
await removeTag(archiveFile, name);
|
||||
await untagFileGroup(archiveFile, name);
|
||||
await fetchArchive();
|
||||
}
|
||||
|
||||
|
|
@ -359,7 +359,8 @@ function Archives() {
|
|||
const onDelete = async (e) => {
|
||||
e.preventDefault();
|
||||
setDeleteOpen(false);
|
||||
const archiveIds = archives.filter(i => selectedArchives.indexOf(i['path']) >= 0).map(i => i['archive']['id']);
|
||||
const archiveIds = archives.filter(i => selectedArchives.indexOf(i['primary_path']) >= 0)
|
||||
.map(i => i['archive']['id']);
|
||||
await deleteArchives(archiveIds);
|
||||
await fetchArchives();
|
||||
setSelectedArchives([]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue