- Button are not limited in size to contain all the text.
- Zoom factor is correctly positioned.
- Download directory is display without border, left aligned.
Update a bit the "about.html" text to not split sentences in several parts
and allow translator to translate the whole sentence at once.
Change the template format to use `{{}}` to be closer than mustache
templating system we already use in kiwix-lib.
Fix#399
`GIT_VERSION` and `BUILD_DATE` are only displayed to the user.
It was useful pre-release to identify the exact version of the build in
bug report.
Now than, we are now releasing kiwix-desktop, we don't need the
`BUILD_DATE` and we must use the exact version instead of the git version.
Fix#476
New field "download path" in the settings page.
To start a download it now uses the download path stored in the settings. Use the new api
of https://github.com/kiwix/kiwix-lib/pull/310 to work.
The SettingsManager class has a new member m_zoomFactor with a getter and
a setter. Its value is set at launch and saved with the QSettings.
There is a new field in the settings page where the zoom factor can be
changed, it is multiplied by 100 to be displayed as a percentage.
Each time a file is opened, the zoomfactor of the view is set with the
member m_zoomFactor of the SettingsManager class.
Add an input in the settings page which allows the user to change the Kiwix
server port.
The SettingsManager sets the value(s) of the settings in the setSettings()
method at the start of the app. This method for now sets a default value
but it will use a config file later too.
The setKiwixServerPort() method is called when the user indicates a valid
port. It sets the m_kiwixServerPort member and emit the portChanged() signal
which is connected in the LocalKiwixServer class to update the m_port member.
The server port is now always set before its launch in the runOrStopServer method.
The LocalKiwixServer::openInBrowser() now uses the mp_server->getPort() to
always use the right port. In fact if the user changes the port in the
settings while the server is running the m_port member doesn't match anymore
the port used by the running server so the openInBrowser will use a wrong port.
The KiwixApp class uses now the SettingsManager::getKiwixServerPort() method
to set the port of the kiwix-server
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.
Display the "local kiwix server" option in the menu
This option opens a Qdialog that have options to control the server (run, open
in browser, stop).
The KiwixServe::run() method use execvp to run the kiwix-serve binary.
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.
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.
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.
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, ...)
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.
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.
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.
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).