337 Commits

Author SHA1 Message Date
Matthieu Gautier
b67577ac9a New version 2.0-rc3 2019-09-26 16:09:38 +02:00
Matthieu Gautier
79a1af6964 New version 2.0-rc2 2019-09-11 17:25:02 +02:00
luddens
90b4ce1b19 add windows icon 2019-09-11 12:19:48 +02:00
Kelson
d1cd606a25 Small CSS/icon fixes around top bar 2019-09-03 17:26:05 +02:00
luddens
2d1087a079 hidden tags aren't display
Split the tags into a stringlist to remove tags that start with "_" and then
join them into one string with a space as separator.
Remove the replacement of the commoda points by spaces from the js file
because we do not need it anymore.
2019-09-03 15:52:08 +02:00
Matthieu Gautier
820ebec5ec New version 2.0-rc1 2019-08-01 11:55:41 +02:00
Thierry
a34bb9095c Addition and correction of French translation. 2019-07-31 13:57:47 +02: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
6d53f91103 apply css 2019-07-24 16:20:38 +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
c05d61c766 add new tab button with basic css
add a new tab with a button inside at the start of the app. When this button
is pressed, it inserts a new tab just before this tab.
To avoid that this tab/button can be selected when a tab is closed, the
SelectionBehaviorOnRemove is set to select the left tab if it's the most
right before the tab/button and the right if not
2019-06-26 14:56:21 +02:00
luddens
2022bb2acb Refresh only one book instead of all the library
These changes allow many improvements :
- they fix the infinite refresh of the library due to the multiple
"bookChanged" signal emitted when several operations on books were
performed simultaneously (launch several downloads)
- the scroll isn't reset to the top of the list when starting a download at
the bottom of the list
- (better optimization ?)

Now methods that concern only one book emit the signal "oneBookChanged"
with the id of the book, the JS slot search by id the correspondent book in
its list and replace it with an updated one.
2019-06-25 18:52:05 +02:00
luddens
daad089994 Replace the ";" between tags by " " 2019-06-25 10:31:15 +02:00
luddens
9a2efcb729 Flexbox overflow is hidden
To align vertically the flexboxes of the same column when the window is too
small, set the flexbox property "overflow" to "hidden" allows all these flexboxes
to have the same width no matter what its content
2019-06-24 15:58:06 +02:00
luddens
044aec9689 Pause book's download while dialog to cancel is open
When the download of a book finishes while the cancel's dialog is opened
and then that the user confirms the deletion of the book, the app crashes
because aria2 can't find the active download (which is already complete).
Pause the download before opening the dialog and check the download's status
before cancel it avoid this crash.
2019-06-24 14:33:11 +02:00
luddens
b72dc743a7 play/pause/cancel button new design 2019-06-12 14:46:52 +02:00
luddens
be645832b5 readinglist new design 2019-06-12 14:46:52 +02:00
luddens
d93104584a library new design 2019-06-12 14:46:52 +02:00
luddens
7822bb3037 popup searchbar new design 2019-06-12 14:46:52 +02:00
luddens
3df34feb42 thinner border 2019-06-12 14:46:52 +02:00
luddens
6f10585d7f add alert if there is not enough storage to download
Check the available storage before the start of a download thanks to
QStorageInfo::bytesAvailable(), if the book size is bigger than this value
an alert message appears.
2019-06-12 10:02:00 +02:00
luddens
2436248d22 add a confirmation msg before cancelling download 2019-05-28 17:32:20 +02:00
luddens
df4034ee09 add a confirmation message before deleting 2019-05-28 17:32:19 +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
Quentin Dussieaux
c507f2b5c8 New translated file generated 2019-04-30 14:44:50 +02:00
luddens
7b49f08360 rename zim icon to "org.kiwix.desktop.x-zim"
flatpack doesn't export files that aren't prefixed like the app (org.kiwix.desktop)
so it has to be renamed and to be precised in the mimetype.xml file because it doesn't matched to the mimetype's name anymore
2019-04-15 17:12:54 +02:00
luddens
3cc06729d9 fix zim icon
named the mime icon like the mimetype
and installed it with the .pro file used by qt
2019-04-15 17:12:54 +02:00
Matthieu Gautier
ceab9780a4 Add a filtering by Category.
Categories are static for now.
2019-03-19 16:44:07 +01: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
f1879b5c3f Add a filtering by language.
The current list of available language is a fixed list.
It is generated by the union of languages we have (on library.kiwix.org)
and languages Qt know of. So some languages for which we have content
are not available.

For now, the filtering is made only for remote catalog.
This probably have to be changed, but for now it is better to
display all the content the user has.
2019-03-06 18:07:35 +01:00
Matthieu Gautier
79b4dd95ab Add screenshots in appdata. 2019-02-05 15:03:15 +01:00
Matthieu Gautier
7e57312f59 Add content rating in appdata. 2019-02-05 15:02:40 +01:00
Matthieu Gautier
3bf03d55d8 Add release tag in appdata. 2019-02-05 15:02:30 +01:00
Matthieu Gautier
8899723480 Fix typos in appdata description and license. 2019-02-05 15:00:50 +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
16e01bd0e1 Add zim mimetype support.
The will allow a user to simply "double click" on the zim file and
let org.kiwix.desktop being launch automatically.

Fix #99
2019-01-23 11:33:22 +01:00
Matthieu Gautier
2f2d66d45c Udpate style.css
- Add a small margin around the top button
- Change the button background on hover.
2018-12-13 17:41:02 +01:00
Matthieu Gautier
98da59d62b Add a appdata file.
To comply with appstream.
2018-12-12 17:50:18 +01:00
Matthieu Gautier
caae4e8124 Rename the .desktop file to follow recommendation.
We should use the "reverse dns" name : org.kiwix.desktop.
2018-12-12 17:47:05 +01:00
Matthieu Gautier
3f9072f978 Correctly style the first tab (contentManager)
It would be nice to be able to style it using css (QTabBar::tab:first)
but I can't figure how :/

We need to :
- hardcore the size of the tabs using `tabSizeHint`.
- "deactivate" the tab button with `setTabButton`
- set the size of the icons.

Fix #73
2018-12-11 18:03:03 +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