1113 Commits

Author SHA1 Message Date
Nikhil Tanwar
0f24892294 New settings entry: Move files to trash
Added a new settings entry to toggle if deleted files should move to trash/recycle bin.
2023-08-11 22:04:52 +05:30
Kelson
95fd133ef0
Merge pull request #981 from kiwix/ctrlW
Fix CloseTab related weakness
2023-08-10 15:08:02 +02:00
Nikhil Tanwar
a6fbf6d10d Get currentIndex from stackedWidget while closing
Earlier, we got the index from cursor's position this led to the close functionality to only work when cursor is hovered over tab title
We get the index straight from the stacked widget now.
2023-08-09 20:33:30 +02:00
Nikhil Tanwar
59d1ff759b Explicitly put Ctrl+F4 and Ctrl+W as shortcuts to close tab
Earlier, we used the Qt::Close key sequence but it's not following what other browswers do
On windows, Close button was mapped to Ctrl+f4 and ctrl+W
but on Gnome and KDE, it was only mapped to Ctrl+W
This change puts Ctrl+F4 and Ctrl+W explicitly as shortcuts to close tab.
2023-08-09 20:33:30 +02:00
Kelson
eda055597e
Merge pull request #980 from kiwix/renameFilters
Rename "All files" to "Online files"
2023-08-09 20:32:47 +02:00
Nikhil Tanwar
1eb87c522d Rename "All files" to "Online files"
Changed the name of all files filter to online files.
2023-08-08 10:21:14 +05:30
Matthieu Gautier
5f349cb79f
Merge pull request #942 from kiwix/translatewiki 2023-08-04 11:08:33 +02:00
Matthieu Gautier
6bdb8bdf23 Add new translations in translations.qrc 2023-08-04 11:03:01 +02:00
translatewiki.net
3fd6fc173c Localisation updates from https://translatewiki.net. 2023-08-04 11:03:01 +02:00
Matthieu Gautier
8fa06343e7
Merge pull request #970 from kiwix/openFolder 2023-08-04 11:02:32 +02:00
Nikhil Tanwar
63b9de9585 Do index check before access in contextmenu
Fix #971
2023-08-03 10:35:48 +05:30
Nikhil Tanwar
274aa4d39a Add "Open Folder" context menu option
Added an option to open the zim's location in the OS's file manager
2023-08-03 10:35:48 +05:30
Nikhil Tanwar
08b2f25828 Add translations for context menu
Added translations for context menu options:
Delete book
Download book
Open Book
Resume Download
Pause Download
Cancel download
2023-08-02 21:37:41 +05:30
Nikhil Tanwar
2eb90bda0b Show correct context menu options in All files view
Earlier, context menu showed "Open"/"Delete" options only in local library.
This doesn't make sense when browsing the remote library - already downloaded files should show "Open"/"Delete" instead of "Download book"
2023-08-02 21:37:41 +05:30
Kelson
7c4cd1d412
Merge pull request #960 from kiwix/opdsLanguages
OPDS based languages and categories
2023-08-02 14:50:41 +02:00
Nikhil Tanwar
5da7609cde So long, static_content.h/cpp
Removed references to static_content, now that it has been replaced by libkiwix API
2023-08-02 18:11:24 +05:30
Nikhil Tanwar
2cf40eccde Don't do unnecessary opds requests
Added checks to not let unnecessary requests to remote library happen.
2023-08-02 18:11:24 +05:30
Nikhil Tanwar
71f8c2f8f4 Dynamic languages in selector
Similar to categories, Languages in the selector are now shown based on the library.
2023-08-02 18:11:24 +05:30
Nikhil Tanwar
574d1e2a29 Dynamic category values
The category values are not static after this change.
If local library is displayed, we get the categories from local library
If remote library is displayed, we send a request to /catalog/v2/categories
2023-08-02 18:11:24 +05:30
Nikhil Tanwar
ce140d2aa5 set language and category functions
ContentManager now keeps a list of current categories and languages.
Added functions to change this based on local or remote libary
2023-08-02 18:11:24 +05:30
Nikhil Tanwar
28532d5dca Added functions to get languages and categories from OPDS feed
Done necessary refactoring in OpdsRequestManager to allow different types of requests.
Added functions to provide languages and categories from an OPDS feed.
2023-08-02 18:11:24 +05:30
Kelson
be760126e7
Merge pull request #946 from kiwix/qtlibrary
Remove Vue.js, replaced by Qt in the library
2023-08-01 12:31:45 +02:00
Emmanuel Engelhart
fe7d9f5ad5
Remove Ubuntu Kinetic from the CI 2023-08-01 12:26:05 +02:00
Nikhil Tanwar
ddb2410628 Move away from using raw pointers
Removed the raw pointers and replaced them with std::shared_ptr
2023-07-31 20:19:36 +05:30
Nikhil Tanwar
bf1c317f10 Split view nodes into RowNode and DescriptionNode
Splitted the views into RowNode and DescriptionNode for consistency
RowNode represents one row with thumbnail, name, data, size, etc.
DescriptionNode shows the description
2023-07-31 20:03:56 +05:30
Nikhil Tanwar
75132af396 Move searcher to filter area
The search function is now moved to filters area for more consistency
Fix #554
2023-07-31 20:00:54 +05:30
Nikhil Tanwar
512af3cdc2 Show dialog box when storage isn't available for download
Shows a dialog box informing the user that the file size is too large to be downloaded on current system.
2023-07-31 20:00:53 +05:30
Nikhil Tanwar
db5b69b034 Generalised confirm box
When the confirm box is initialised with isDialog=true, Ok button is showed instead of yes/no
2023-07-31 20:00:53 +05:30
Nikhil Tanwar
797aceebbe Hide sort indicator for icons column, put it on left for other columns
created ContentManagerHeader, inherited from QHeaderView, to implement not showing the sort indicator for first column.
Changed sort indicator position to left of text
2023-07-31 20:00:53 +05:30
Nikhil Tanwar
078dd8ebe4 Open book on double & middle click in library
Fix #410
2023-07-31 20:00:53 +05:30
Nikhil Tanwar
d2061a69a5 do remote library update in a different thread
Put updateRemoteLibrary in a new thread so it doesn't block the main UI, particularly the loader widget
2023-07-31 20:00:53 +05:30
Nikhil Tanwar
3abb4b4b4c Loader widget is shown while catalog is being downloaded
Added a new widget (KiwixLoader) which is displayed when the catalog is being downloaded.
2023-07-28 17:45:13 +05:30
Nikhil Tanwar
3431fd38da Minor improvements to view
When an item is hovered, colour changes to grey.
Change cursor to HandPointer in treeview
Open book description when item is clicked
Increase description box width
2023-07-28 17:45:12 +05:30
Nikhil Tanwar
d90158b789 Confirmation dialog box for delete book and cancel download
Added a new custom dialog box for confirmations.
Currently, it popups when a book is deleted or a download has to be cancelled
2023-07-28 17:43:10 +05:30
Nikhil Tanwar
cb49cb6a1a Replace library-icon.svg with kiwix logo
The designs use kiwix logo as library icon
2023-07-28 17:43:09 +05:30
Nikhil Tanwar
d2d0c18929 Download stats and pause, resume functions
Revamped download function as per design guidelines.
While downloading, it shows download speed and completed length along with button to pause
When paused, it shows the button to resume download or cancel it.
2023-07-28 17:43:08 +05:30
Nikhil Tanwar
ff5f022cd6 Icon downloader util for all files view
Added an icon downloader to display icons for remote library.
While the icons are being downloaded, a placeholder icon is shown.
2023-07-28 17:41:15 +05:30
Nikhil Tanwar
ef0227b08c Downloading indicator in book list
If a book is downloading, it now shows "Downloading"
2023-07-28 17:13:57 +05:30
Nikhil Tanwar
3f72af494e updateDownloadInfos now returns a map
updateDownloadInfos will now return a map - QMap<QString, QVariant> - same as getBookInfos.
This helps to easier get the required fields
2023-07-28 17:13:57 +05:30
Nikhil Tanwar
20f082f73b Search books function
Added a search book function in the library
2023-07-28 17:13:56 +05:30
Nikhil Tanwar
24117ea581 Context menu for book rows on right click
Added a menu on right click to show options.
Current actions supported:
1. Open Book (if the library is showing local files)
2. Download Book (if the library is showing remote files)
3. Delete Book
2023-07-28 17:09:10 +05:30
Nikhil Tanwar
d95347fc88 Styles for headers
Added new styles for headers
2023-07-28 17:08:33 +05:30
Nikhil Tanwar
5f4e7f95b8 Implement sorting
The books can now be sorted by clicking the headers.
2023-07-28 17:07:06 +05:30
Nikhil Tanwar
9e5f187f9e Implemented dynamic row adding
The view only adds as many rows as they can be displayed now.
Only scrolling, it adds more
2023-07-28 17:05:49 +05:30
Nikhil Tanwar
b0e3bf8daf Icon is now displayed
Used delegate to display the icon
If the icon is not available, icons/placeholder-icon.png is displayed
2023-07-28 17:05:42 +05:30
Nikhil Tanwar
1f33d86340 Delegate for ContentManagerView
Added a new delegate to style the view.
Added the following things:
1. Button styling and click to open book
2. Increased size of rows
2023-07-28 17:03:11 +05:30
Nikhil Tanwar
bddda5cb2b Description field in view
Added the description field in the view. It is shown when the expand button is pressed.
Fixed widths for all columns except Name, which takes up the remaining space.
2023-07-24 13:24:17 +05:30
Nikhil Tanwar
f968a24adc Real book data in library
Adds the book data from library
2023-07-24 13:24:16 +05:30
Nikhil Tanwar
e5c8a31ec0 Basic model implemented for TreeView
This implements a basic model for QTreeModel
Currently, it only shows 1 row with some random data.
In future commits, data from ContentManager::getBookInfos will be taken
2023-07-24 13:24:16 +05:30
Nikhil Tanwar
3c69c1a5c1 getBookInfos now returns a map
getBookInfos will now return a QMap<QString, QVariant>
This will be used to get book data based on key in the TreeView model
2023-07-24 13:24:15 +05:30