58 Commits

Author SHA1 Message Date
Nikhil Tanwar
8f61b418f9 Replace QWebEngineView with QTreeView for ContentManagerView
We'll be using a QTreeView to display elements of the library.
2023-07-24 13:24:15 +05:30
Nikhil Tanwar
8ba4e8ab85 Stored settings view in settings manager
Deleted some helper functions (browseDownloadDir, confirmDownloadDir, resetDownloadDir) from SettingsManager
Deleted unnecessary settingsManager.js and settingsManager.html
Fixed settingsManager.css code factoring issues
2021-10-19 05:09:07 +02:00
Emmanuel Engelhart
7f03e3eee0 Kiwix-lib has been renamed to Libkiwix 2021-05-18 13:23:49 +02:00
Emmanuel Engelhart
95914e46a8 Use https:// to downlaod the favicon online 2021-02-04 12:57:35 +01:00
Emmanuel Engelhart
0e82bd44a9 About links with https:// if possible 2021-02-04 12:57:35 +01:00
Kelson
e060fec4aa
New SVG logo (#539) 2020-12-05 09:33:19 +01:00
Matthieu Gautier
b91be76815 Fix styling of the settingManager
- Button are not limited in size to contain all the text.
- Zoom factor is correctly positioned.
- Download directory is display without border, left aligned.
2020-07-10 17:42:01 +02:00
luddens
8f1d870553 change download directory setting UX
- remove "apply" button
- kiwixPort and zoomFactor are saved onchange
- download directory has a confirm dialog
2020-07-10 12:11:21 +02:00
Kelson
cc1a664aef
Replace non-free font by Selawik (#485) 2020-07-10 10:52:51 +02:00
Matthieu Gautier
913b5abff6 Better about text for better translation.
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
2020-07-09 11:22:33 +02:00
Matthieu Gautier
3193889dad Do not call date and git describe for reproducible build.
`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
2020-07-06 16:04:18 +02:00
Matthieu Gautier
3ac6a953a6 Remove old translation file. 2020-07-06 16:04:18 +02:00
Kunal Mehta
9b9ff8ab8f
Fix typo in about.html (#475) 2020-07-05 09:06:18 +02:00
luddens
f203eb63e8 local kiwix server page translation 2020-04-07 15:40:08 +02:00
luddens
c113787abb about page translation 2020-04-07 15:40:08 +02: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
luddens
870dba20b0 add the possibility to set the download path in the settings
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.
2020-03-03 15:27:17 +01: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
0289709771 Add a default zoom field in the settings
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.
2019-11-19 18:31:54 +02:00
luddens
8ea9dd3f43 settings page css improvements 2019-11-01 15:59:17 +01:00
luddens
aab3d123a0 kiwix server port can be set
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
2019-11-01 15:59:17 +01:00
luddens
175c46cddf settings page architecture 2019-11-01 15:59:17 +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
785d2c72f3 kiwix-serve integration in kiwix-dekstop
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.
2019-07-24 16:20:38 +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
902ebb3402 Update about.html to correctly list dependencies.
We are using `Mustache` instead of `CTTP2` now
2019-01-23 15:27:38 +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