32 Commits

Author SHA1 Message Date
Emmanuel Engelhart
95914e46a8 Use https:// to downlaod the favicon online 2021-02-04 12:57:35 +01:00
luddens
3b300f90e5 translate settingsmanager html page 2020-04-07 15:40:07 +02:00
luddens
fb582627dc translate contentmanager html page 2020-04-07 15:39:48 +02:00
Kelson
a279b8fc21 Title, not File name (label) 2019-12-15 10:05:13 +01:00
Kelson
8628edf393 Remove useless trailing spaces 2019-12-15 10:04:13 +01:00
luddens
ac59676bf7 add books sorting
Use a new api of listBooksIds

Click on a column header sets the "activeSort" variable with the sort's type
and the "sortOrderAsc" to true or false according to ascending or descending
sort. These variables are used to set css classes and to set the m_sortBy
ContentManager's member and m_sortOrderAsc ContentManager's member which are
used to get the books id's list sorted.
2019-07-24 16:23:18 +02:00
luddens
b72dc743a7 play/pause/cancel button new design 2019-06-12 14:46:52 +02:00
luddens
7cfc92c80f add options in context menu 2019-05-13 15:42:32 +02:00
luddens
949d50866c Split ContentManager.html into 3 files (html, css, js) 2019-05-13 13:58:18 +02:00
luddens
badcbe7320 multi-click download button start only 1 download 2019-05-13 11:44:13 +02:00
luddens
0e2c2e5c5c add cancelBook 2019-05-13 11:44:11 +02:00
luddens
f5b7ce2c2c pause and resume button 2019-05-13 11:31:38 +02:00
luddens
1714d8ca5a add a load icon during the remote library's update's request
add a div with the loading's animation. When the contentManager sends the
remote library's update's request, it emits a "true" displayLoadIcon signal
that remove the class "do-not-display" and it emits a "false" displayLoadIcon
signal when it has to display the local library.
2019-05-02 16:16:53 +02:00
luddens
a5c4beb612 erase book in a right-click context menu
Foreach "summary" element that represents a book, Vue.js binds its id with
the book's id.

When a "contextmenu" event (right-click) is emitted, it saves the mouse's
coordinates to set the contextmenu's position and display it if the cursor
is on a book.

The "displayMenu(book)" function displays the contextmenu if the "book"
parameter isn't null. It handles which options to show too (for now there is
the "delete" option only).

The delete option calls "eraseBook(book)" that uses
"getBookFromMousePosition()" to know which book has to be deleted.

"getBookFromMousePosition(info)" gets all elements at the mouse's
position, selects a "summary" element which has the "book-summary" class if
there is one, to get the book requested thanks to the id bind by Vue.js and
return it.
2019-05-02 10:54:55 +02:00
luddens
2848fc1e43 delete books with simple ui
add a column at the book's list's table with "delete" button. This ui
is temporary.

On click, this button sends the id of the selected book at the
ContentManager class which gets book by this id, and erases all files
in relationship with this book on the computer.
2019-05-02 10:49:56 +02:00
Matthieu Gautier
aa8f7cb3dd Do not display all books at once.
When there is a lot of book it can take some time to display all books.
Even more, when displaying ALL books, I face the kiwix-desktop freezing.

So let's display only 20 books and if the user scroll to the end of
the displayed books, display 20 more books.

The limits is made at rendering, this allow us to not change all the
logic behind (request, filtering, ...)
2019-03-06 18:07:35 +01:00
Matthieu Gautier
4b9cc80f66 Do not do an extra request to search book in the remote library.
When doing a search in the library, we know for sure that the result will
be a subset of the library we have (without query). So we can do the
search locally (through the books we already have in cache) instead of
doing another request.
2018-12-11 12:08:22 +01:00
Matthieu Gautier
f0e61d31bf Do not do too many request as we try the search in the contentManager.
Wait 200ms before doing the request. It will avoid contentManager to do
too many (and useless) requests.
2018-12-10 15:17:55 +01:00
Matthieu Gautier
3007d1a9f6 Update style to visualize clickable items. 2018-12-02 17:11:00 +01:00
Matthieu Gautier
0b1296cc86 Implement search in the contentManager. 2018-12-02 17:09:39 +01:00
Matthieu Gautier
67d56f1d03 Remove contentManager pagination.
The pagination was added as a workaround to a too slow display of
the content.

Now that with commit 4cbf001 we are displaying the icons async, the
pagination is no more usefull.
2018-11-30 16:01:27 +01:00
Matthieu Gautier
4cbf001de4 Use real url for icon in the contentManager instead of data url.
The update of book info are made somehow sync. (They are async, but
somehow, the view update hangout).

Getting the favicon content is pretty long and it seems that the view
(and getting remote content) take a long time.

By using a real url, QWebViewEngine handle everything nicely and it speed
up everything.
2018-11-13 18:32:18 +01:00
Matthieu Gautier
f81061f1f4 The max page should be nbPages-1, not nbPages. 2018-11-02 17:08:40 +01:00
Matthieu Gautier
d72dc72a21 Better style for contentManager. 2018-10-26 13:43:40 +02:00
Matthieu Gautier
1022136697 Move the contentManagare sidebar into a specific widget. 2018-10-18 16:45:47 +02:00
Matthieu Gautier
3410252837 Make the contentManager the only interface from C++ to js/html.
Move all methods used by contentManager html into the contentManager class.
We do not export anymore the kiwixapp, the library or the downloader.
As the downloader was use only to export the methods to html, we can
remove it (and use kiwix::Downloader).
2018-10-18 15:22:08 +02:00
Matthieu Gautier
235b82166e Add a bit of styling.
Still need a lot of works
2018-10-17 14:47:09 +02:00
Matthieu Gautier
7a83a1038d Handle downloading of remote books. 2018-10-17 11:16:57 +02:00
Matthieu Gautier
2923b19478 Display the size of the zim book in the contentManager. 2018-10-17 11:10:17 +02:00
Matthieu Gautier
f39254a6f1 Move the creation of a dict from a list of values in a specific function. 2018-10-17 11:01:27 +02:00
Matthieu Gautier
9ce41c06af Open book from the contentManager. 2018-10-17 11:01:21 +02:00
Matthieu Gautier
a6f8bbd6e5 Add a first version of the contentManager. 2018-10-17 11:00:09 +02:00